diff --git a/src/apis/abusiveexperiencereport/v1.ts b/src/apis/abusiveexperiencereport/v1.ts
index e34ff51e44f..482619b78a3 100644
--- a/src/apis/abusiveexperiencereport/v1.ts
+++ b/src/apis/abusiveexperiencereport/v1.ts
@@ -167,6 +167,55 @@ export namespace abusiveexperiencereport_v1 {
/**
* abusiveexperiencereport.sites.get
* @desc Gets a site's Abusive Experience Report summary.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/abusiveexperiencereport.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const abusiveexperiencereport = google.abusiveexperiencereport('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await abusiveexperiencereport.sites.get({
+ * // Required. The name of the site whose summary to get, e.g.
+ * // `sites/http%3A%2F%2Fwww.google.com%2F`.
+ * //
+ * // Format: `sites/{site}`
+ * name: 'sites/my-site',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "abusiveStatus": "my_abusiveStatus",
+ * // "enforcementTime": "my_enforcementTime",
+ * // "filterStatus": "my_filterStatus",
+ * // "lastChangeTime": "my_lastChangeTime",
+ * // "reportUrl": "my_reportUrl",
+ * // "reviewedSite": "my_reviewedSite",
+ * // "underReview": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias abusiveexperiencereport.sites.get
* @memberOf! ()
*
@@ -257,6 +306,43 @@ export namespace abusiveexperiencereport_v1 {
/**
* abusiveexperiencereport.violatingSites.list
* @desc Lists sites that are failing in the Abusive Experience Report.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/abusiveexperiencereport.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const abusiveexperiencereport = google.abusiveexperiencereport('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await abusiveexperiencereport.violatingSites.list({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "violatingSites": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias abusiveexperiencereport.violatingSites.list
* @memberOf! ()
*
diff --git a/src/apis/acceleratedmobilepageurl/v1.ts b/src/apis/acceleratedmobilepageurl/v1.ts
index 8c6981a2454..58e382d5aa1 100644
--- a/src/apis/acceleratedmobilepageurl/v1.ts
+++ b/src/apis/acceleratedmobilepageurl/v1.ts
@@ -183,6 +183,53 @@ export namespace acceleratedmobilepageurl_v1 {
/**
* acceleratedmobilepageurl.ampUrls.batchGet
* @desc Returns AMP URL(s) and equivalent [AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/acceleratedmobilepageurl.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const acceleratedmobilepageurl = google.acceleratedmobilepageurl('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await acceleratedmobilepageurl.ampUrls.batchGet({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "lookupStrategy": "my_lookupStrategy",
+ * // "urls": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "ampUrls": [],
+ * // "urlErrors": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias acceleratedmobilepageurl.ampUrls.batchGet
* @memberOf! ()
*
diff --git a/src/apis/accessapproval/v1.ts b/src/apis/accessapproval/v1.ts
index b216f40c6ef..c6616686131 100644
--- a/src/apis/accessapproval/v1.ts
+++ b/src/apis/accessapproval/v1.ts
@@ -290,6 +290,44 @@ export namespace accessapproval_v1 {
/**
* accessapproval.folders.deleteAccessApprovalSettings
* @desc Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.folders.deleteAccessApprovalSettings({
+ * // Name of the AccessApprovalSettings to delete.
+ * name: 'folders/my-folder/accessApprovalSettings',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.folders.deleteAccessApprovalSettings
* @memberOf! ()
*
@@ -362,6 +400,49 @@ export namespace accessapproval_v1 {
/**
* accessapproval.folders.getAccessApprovalSettings
* @desc Gets the settings associated with a project, folder, or organization.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.folders.getAccessApprovalSettings({
+ * // Name of the AccessApprovalSettings to retrieve.
+ * name: 'folders/my-folder/accessApprovalSettings',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.folders.getAccessApprovalSettings
* @memberOf! ()
*
@@ -438,6 +519,76 @@ export namespace accessapproval_v1 {
/**
* accessapproval.folders.updateAccessApprovalSettings
* @desc Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.folders.updateAccessApprovalSettings({
+ * // The resource name of the settings. Format is one of:
+ * //
+ * // - "projects/{project_id}/accessApprovalSettings"
+ * // - "folders/{folder_id}/accessApprovalSettings"
+ * // - "organizations/{organization_id}/accessApprovalSettings"
+ * //
+ * name: 'folders/my-folder/accessApprovalSettings',
+ * // The update mask applies to the settings. Only the top level fields of
+ * // AccessApprovalSettings (notification_emails & enrolled_services) are
+ * // supported. For each field, if it is included, the currently stored value
+ * // will be entirely overwritten with the value of the field passed in this
+ * // request.
+ * //
+ * // For the `FieldMask` definition, see
+ * // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
+ * // If this field is left unset, only the notification_emails field will be
+ * // updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.folders.updateAccessApprovalSettings
* @memberOf! ()
*
@@ -569,6 +720,62 @@ export namespace accessapproval_v1 {
/**
* accessapproval.folders.approvalRequests.approve
* @desc Approves a request and returns the updated ApprovalRequest. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.folders.approvalRequests.approve({
+ * // Name of the approval request to approve.
+ * name: 'folders/my-folder/approvalRequests/my-approvalRequest',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "expireTime": "my_expireTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.folders.approvalRequests.approve
* @memberOf! ()
*
@@ -645,6 +852,60 @@ export namespace accessapproval_v1 {
/**
* accessapproval.folders.approvalRequests.dismiss
* @desc Dismisses a request. Returns the updated ApprovalRequest. NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.folders.approvalRequests.dismiss({
+ * // Name of the ApprovalRequest to dismiss.
+ * name: 'folders/my-folder/approvalRequests/my-approvalRequest',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.folders.approvalRequests.dismiss
* @memberOf! ()
*
@@ -721,6 +982,54 @@ export namespace accessapproval_v1 {
/**
* accessapproval.folders.approvalRequests.get
* @desc Gets an approval request. Returns NOT_FOUND if the request does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.folders.approvalRequests.get({
+ * // Name of the approval request to retrieve.
+ * name: 'folders/my-folder/approvalRequests/my-approvalRequest',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.folders.approvalRequests.get
* @memberOf! ()
*
@@ -793,6 +1102,62 @@ export namespace accessapproval_v1 {
/**
* accessapproval.folders.approvalRequests.list
* @desc Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.folders.approvalRequests.list({
+ * // A filter on the type of approval requests to retrieve. Must be one of the
+ * // following values:
+ * //
+ * // - [not set]: Requests that are pending or have active approvals.
+ * // - ALL: All requests.
+ * // - PENDING: Only pending requests.
+ * // - ACTIVE: Only active (i.e. currently approved) requests.
+ * // - DISMISSED: Only dismissed (including expired) requests.
+ * //
+ * filter: 'placeholder-value',
+ * // Requested page size.
+ * pageSize: 'placeholder-value',
+ * // A token identifying the page of results to return.
+ * pageToken: 'placeholder-value',
+ * // The parent resource. This may be "projects/{project_id}",
+ * // "folders/{folder_id}", or "organizations/{organization_id}".
+ * parent: 'folders/my-folder',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approvalRequests": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.folders.approvalRequests.list
* @memberOf! ()
*
@@ -962,6 +1327,44 @@ export namespace accessapproval_v1 {
/**
* accessapproval.organizations.deleteAccessApprovalSettings
* @desc Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.organizations.deleteAccessApprovalSettings({
+ * // Name of the AccessApprovalSettings to delete.
+ * name: 'organizations/my-organization/accessApprovalSettings',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.organizations.deleteAccessApprovalSettings
* @memberOf! ()
*
@@ -1034,6 +1437,49 @@ export namespace accessapproval_v1 {
/**
* accessapproval.organizations.getAccessApprovalSettings
* @desc Gets the settings associated with a project, folder, or organization.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.organizations.getAccessApprovalSettings({
+ * // Name of the AccessApprovalSettings to retrieve.
+ * name: 'organizations/my-organization/accessApprovalSettings',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.organizations.getAccessApprovalSettings
* @memberOf! ()
*
@@ -1110,6 +1556,76 @@ export namespace accessapproval_v1 {
/**
* accessapproval.organizations.updateAccessApprovalSettings
* @desc Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.organizations.updateAccessApprovalSettings({
+ * // The resource name of the settings. Format is one of:
+ * //
+ * // - "projects/{project_id}/accessApprovalSettings"
+ * // - "folders/{folder_id}/accessApprovalSettings"
+ * // - "organizations/{organization_id}/accessApprovalSettings"
+ * //
+ * name: 'organizations/my-organization/accessApprovalSettings',
+ * // The update mask applies to the settings. Only the top level fields of
+ * // AccessApprovalSettings (notification_emails & enrolled_services) are
+ * // supported. For each field, if it is included, the currently stored value
+ * // will be entirely overwritten with the value of the field passed in this
+ * // request.
+ * //
+ * // For the `FieldMask` definition, see
+ * // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
+ * // If this field is left unset, only the notification_emails field will be
+ * // updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.organizations.updateAccessApprovalSettings
* @memberOf! ()
*
@@ -1241,6 +1757,62 @@ export namespace accessapproval_v1 {
/**
* accessapproval.organizations.approvalRequests.approve
* @desc Approves a request and returns the updated ApprovalRequest. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.organizations.approvalRequests.approve({
+ * // Name of the approval request to approve.
+ * name: 'organizations/my-organization/approvalRequests/my-approvalRequest',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "expireTime": "my_expireTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.organizations.approvalRequests.approve
* @memberOf! ()
*
@@ -1317,6 +1889,60 @@ export namespace accessapproval_v1 {
/**
* accessapproval.organizations.approvalRequests.dismiss
* @desc Dismisses a request. Returns the updated ApprovalRequest. NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.organizations.approvalRequests.dismiss({
+ * // Name of the ApprovalRequest to dismiss.
+ * name: 'organizations/my-organization/approvalRequests/my-approvalRequest',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.organizations.approvalRequests.dismiss
* @memberOf! ()
*
@@ -1393,6 +2019,54 @@ export namespace accessapproval_v1 {
/**
* accessapproval.organizations.approvalRequests.get
* @desc Gets an approval request. Returns NOT_FOUND if the request does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.organizations.approvalRequests.get({
+ * // Name of the approval request to retrieve.
+ * name: 'organizations/my-organization/approvalRequests/my-approvalRequest',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.organizations.approvalRequests.get
* @memberOf! ()
*
@@ -1465,6 +2139,62 @@ export namespace accessapproval_v1 {
/**
* accessapproval.organizations.approvalRequests.list
* @desc Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.organizations.approvalRequests.list({
+ * // A filter on the type of approval requests to retrieve. Must be one of the
+ * // following values:
+ * //
+ * // - [not set]: Requests that are pending or have active approvals.
+ * // - ALL: All requests.
+ * // - PENDING: Only pending requests.
+ * // - ACTIVE: Only active (i.e. currently approved) requests.
+ * // - DISMISSED: Only dismissed (including expired) requests.
+ * //
+ * filter: 'placeholder-value',
+ * // Requested page size.
+ * pageSize: 'placeholder-value',
+ * // A token identifying the page of results to return.
+ * pageToken: 'placeholder-value',
+ * // The parent resource. This may be "projects/{project_id}",
+ * // "folders/{folder_id}", or "organizations/{organization_id}".
+ * parent: 'organizations/my-organization',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approvalRequests": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.organizations.approvalRequests.list
* @memberOf! ()
*
@@ -1634,6 +2364,44 @@ export namespace accessapproval_v1 {
/**
* accessapproval.projects.deleteAccessApprovalSettings
* @desc Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.projects.deleteAccessApprovalSettings({
+ * // Name of the AccessApprovalSettings to delete.
+ * name: 'projects/my-project/accessApprovalSettings',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.projects.deleteAccessApprovalSettings
* @memberOf! ()
*
@@ -1706,6 +2474,49 @@ export namespace accessapproval_v1 {
/**
* accessapproval.projects.getAccessApprovalSettings
* @desc Gets the settings associated with a project, folder, or organization.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.projects.getAccessApprovalSettings({
+ * // Name of the AccessApprovalSettings to retrieve.
+ * name: 'projects/my-project/accessApprovalSettings',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.projects.getAccessApprovalSettings
* @memberOf! ()
*
@@ -1782,6 +2593,76 @@ export namespace accessapproval_v1 {
/**
* accessapproval.projects.updateAccessApprovalSettings
* @desc Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.projects.updateAccessApprovalSettings({
+ * // The resource name of the settings. Format is one of:
+ * //
+ * // - "projects/{project_id}/accessApprovalSettings"
+ * // - "folders/{folder_id}/accessApprovalSettings"
+ * // - "organizations/{organization_id}/accessApprovalSettings"
+ * //
+ * name: 'projects/my-project/accessApprovalSettings',
+ * // The update mask applies to the settings. Only the top level fields of
+ * // AccessApprovalSettings (notification_emails & enrolled_services) are
+ * // supported. For each field, if it is included, the currently stored value
+ * // will be entirely overwritten with the value of the field passed in this
+ * // request.
+ * //
+ * // For the `FieldMask` definition, see
+ * // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
+ * // If this field is left unset, only the notification_emails field will be
+ * // updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.projects.updateAccessApprovalSettings
* @memberOf! ()
*
@@ -1913,6 +2794,62 @@ export namespace accessapproval_v1 {
/**
* accessapproval.projects.approvalRequests.approve
* @desc Approves a request and returns the updated ApprovalRequest. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.projects.approvalRequests.approve({
+ * // Name of the approval request to approve.
+ * name: 'projects/my-project/approvalRequests/my-approvalRequest',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "expireTime": "my_expireTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.projects.approvalRequests.approve
* @memberOf! ()
*
@@ -1989,6 +2926,60 @@ export namespace accessapproval_v1 {
/**
* accessapproval.projects.approvalRequests.dismiss
* @desc Dismisses a request. Returns the updated ApprovalRequest. NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.projects.approvalRequests.dismiss({
+ * // Name of the ApprovalRequest to dismiss.
+ * name: 'projects/my-project/approvalRequests/my-approvalRequest',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.projects.approvalRequests.dismiss
* @memberOf! ()
*
@@ -2065,6 +3056,54 @@ export namespace accessapproval_v1 {
/**
* accessapproval.projects.approvalRequests.get
* @desc Gets an approval request. Returns NOT_FOUND if the request does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.projects.approvalRequests.get({
+ * // Name of the approval request to retrieve.
+ * name: 'projects/my-project/approvalRequests/my-approvalRequest',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.projects.approvalRequests.get
* @memberOf! ()
*
@@ -2137,6 +3176,62 @@ export namespace accessapproval_v1 {
/**
* accessapproval.projects.approvalRequests.list
* @desc Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.projects.approvalRequests.list({
+ * // A filter on the type of approval requests to retrieve. Must be one of the
+ * // following values:
+ * //
+ * // - [not set]: Requests that are pending or have active approvals.
+ * // - ALL: All requests.
+ * // - PENDING: Only pending requests.
+ * // - ACTIVE: Only active (i.e. currently approved) requests.
+ * // - DISMISSED: Only dismissed (including expired) requests.
+ * //
+ * filter: 'placeholder-value',
+ * // Requested page size.
+ * pageSize: 'placeholder-value',
+ * // A token identifying the page of results to return.
+ * pageToken: 'placeholder-value',
+ * // The parent resource. This may be "projects/{project_id}",
+ * // "folders/{folder_id}", or "organizations/{organization_id}".
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approvalRequests": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.projects.approvalRequests.list
* @memberOf! ()
*
diff --git a/src/apis/accessapproval/v1beta1.ts b/src/apis/accessapproval/v1beta1.ts
index acb12f084da..e9334003d08 100644
--- a/src/apis/accessapproval/v1beta1.ts
+++ b/src/apis/accessapproval/v1beta1.ts
@@ -290,6 +290,44 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.folders.deleteAccessApprovalSettings
* @desc Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.folders.deleteAccessApprovalSettings({
+ * // Name of the AccessApprovalSettings to delete.
+ * name: 'folders/my-folder/accessApprovalSettings',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.folders.deleteAccessApprovalSettings
* @memberOf! ()
*
@@ -362,6 +400,49 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.folders.getAccessApprovalSettings
* @desc Gets the settings associated with a project, folder, or organization.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.folders.getAccessApprovalSettings({
+ * // Name of the AccessApprovalSettings to retrieve.
+ * name: 'folders/my-folder/accessApprovalSettings',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.folders.getAccessApprovalSettings
* @memberOf! ()
*
@@ -438,6 +519,70 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.folders.updateAccessApprovalSettings
* @desc Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.folders.updateAccessApprovalSettings({
+ * // The resource name of the settings. Format is one of:
+ * //
+ * // - "projects/{project_id}/accessApprovalSettings"
+ * // - "folders/{folder_id}/accessApprovalSettings"
+ * // - "organizations/{organization_id}/accessApprovalSettings"
+ * //
+ * name: 'folders/my-folder/accessApprovalSettings',
+ * // For the `FieldMask` definition, see
+ * // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
+ * // If this field is left unset, only the notification_emails field will be
+ * // updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.folders.updateAccessApprovalSettings
* @memberOf! ()
*
@@ -569,6 +714,62 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.folders.approvalRequests.approve
* @desc Approves a request and returns the updated ApprovalRequest. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.folders.approvalRequests.approve({
+ * // Name of the approval request to approve.
+ * name: 'folders/my-folder/approvalRequests/my-approvalRequest',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "expireTime": "my_expireTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.folders.approvalRequests.approve
* @memberOf! ()
*
@@ -645,6 +846,60 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.folders.approvalRequests.dismiss
* @desc Dismisses a request. Returns the updated ApprovalRequest. NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.folders.approvalRequests.dismiss({
+ * // Name of the ApprovalRequest to dismiss.
+ * name: 'folders/my-folder/approvalRequests/my-approvalRequest',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.folders.approvalRequests.dismiss
* @memberOf! ()
*
@@ -721,6 +976,54 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.folders.approvalRequests.get
* @desc Gets an approval request. Returns NOT_FOUND if the request does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.folders.approvalRequests.get({
+ * // Name of the approval request to retrieve.
+ * name: 'folders/my-folder/approvalRequests/my-approvalRequest',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.folders.approvalRequests.get
* @memberOf! ()
*
@@ -793,6 +1096,62 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.folders.approvalRequests.list
* @desc Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.folders.approvalRequests.list({
+ * // A filter on the type of approval requests to retrieve. Must be one of the
+ * // following values:
+ * //
+ * // - [not set]: Requests that are pending or have active approvals.
+ * // - ALL: All requests.
+ * // - PENDING: Only pending requests.
+ * // - ACTIVE: Only active (i.e. currently approved) requests.
+ * // - DISMISSED: Only dismissed (including expired) requests.
+ * //
+ * filter: 'placeholder-value',
+ * // Requested page size.
+ * pageSize: 'placeholder-value',
+ * // A token identifying the page of results to return.
+ * pageToken: 'placeholder-value',
+ * // The parent resource. This may be "projects/{project_id}",
+ * // "folders/{folder_id}", or "organizations/{organization_id}".
+ * parent: 'folders/my-folder',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approvalRequests": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.folders.approvalRequests.list
* @memberOf! ()
*
@@ -962,6 +1321,44 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.organizations.deleteAccessApprovalSettings
* @desc Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.organizations.deleteAccessApprovalSettings({
+ * // Name of the AccessApprovalSettings to delete.
+ * name: 'organizations/my-organization/accessApprovalSettings',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.organizations.deleteAccessApprovalSettings
* @memberOf! ()
*
@@ -1034,6 +1431,49 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.organizations.getAccessApprovalSettings
* @desc Gets the settings associated with a project, folder, or organization.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.organizations.getAccessApprovalSettings({
+ * // Name of the AccessApprovalSettings to retrieve.
+ * name: 'organizations/my-organization/accessApprovalSettings',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.organizations.getAccessApprovalSettings
* @memberOf! ()
*
@@ -1110,6 +1550,70 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.organizations.updateAccessApprovalSettings
* @desc Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.organizations.updateAccessApprovalSettings({
+ * // The resource name of the settings. Format is one of:
+ * //
+ * // - "projects/{project_id}/accessApprovalSettings"
+ * // - "folders/{folder_id}/accessApprovalSettings"
+ * // - "organizations/{organization_id}/accessApprovalSettings"
+ * //
+ * name: 'organizations/my-organization/accessApprovalSettings',
+ * // For the `FieldMask` definition, see
+ * // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
+ * // If this field is left unset, only the notification_emails field will be
+ * // updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.organizations.updateAccessApprovalSettings
* @memberOf! ()
*
@@ -1241,6 +1745,62 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.organizations.approvalRequests.approve
* @desc Approves a request and returns the updated ApprovalRequest. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.organizations.approvalRequests.approve({
+ * // Name of the approval request to approve.
+ * name: 'organizations/my-organization/approvalRequests/my-approvalRequest',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "expireTime": "my_expireTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.organizations.approvalRequests.approve
* @memberOf! ()
*
@@ -1317,6 +1877,60 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.organizations.approvalRequests.dismiss
* @desc Dismisses a request. Returns the updated ApprovalRequest. NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.organizations.approvalRequests.dismiss({
+ * // Name of the ApprovalRequest to dismiss.
+ * name: 'organizations/my-organization/approvalRequests/my-approvalRequest',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.organizations.approvalRequests.dismiss
* @memberOf! ()
*
@@ -1393,6 +2007,54 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.organizations.approvalRequests.get
* @desc Gets an approval request. Returns NOT_FOUND if the request does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.organizations.approvalRequests.get({
+ * // Name of the approval request to retrieve.
+ * name: 'organizations/my-organization/approvalRequests/my-approvalRequest',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.organizations.approvalRequests.get
* @memberOf! ()
*
@@ -1465,6 +2127,62 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.organizations.approvalRequests.list
* @desc Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.organizations.approvalRequests.list({
+ * // A filter on the type of approval requests to retrieve. Must be one of the
+ * // following values:
+ * //
+ * // - [not set]: Requests that are pending or have active approvals.
+ * // - ALL: All requests.
+ * // - PENDING: Only pending requests.
+ * // - ACTIVE: Only active (i.e. currently approved) requests.
+ * // - DISMISSED: Only dismissed (including expired) requests.
+ * //
+ * filter: 'placeholder-value',
+ * // Requested page size.
+ * pageSize: 'placeholder-value',
+ * // A token identifying the page of results to return.
+ * pageToken: 'placeholder-value',
+ * // The parent resource. This may be "projects/{project_id}",
+ * // "folders/{folder_id}", or "organizations/{organization_id}".
+ * parent: 'organizations/my-organization',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approvalRequests": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.organizations.approvalRequests.list
* @memberOf! ()
*
@@ -1634,6 +2352,44 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.projects.deleteAccessApprovalSettings
* @desc Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.projects.deleteAccessApprovalSettings({
+ * // Name of the AccessApprovalSettings to delete.
+ * name: 'projects/my-project/accessApprovalSettings',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.projects.deleteAccessApprovalSettings
* @memberOf! ()
*
@@ -1706,6 +2462,49 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.projects.getAccessApprovalSettings
* @desc Gets the settings associated with a project, folder, or organization.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.projects.getAccessApprovalSettings({
+ * // Name of the AccessApprovalSettings to retrieve.
+ * name: 'projects/my-project/accessApprovalSettings',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.projects.getAccessApprovalSettings
* @memberOf! ()
*
@@ -1782,6 +2581,70 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.projects.updateAccessApprovalSettings
* @desc Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.projects.updateAccessApprovalSettings({
+ * // The resource name of the settings. Format is one of:
+ * //
+ * // - "projects/{project_id}/accessApprovalSettings"
+ * // - "folders/{folder_id}/accessApprovalSettings"
+ * // - "organizations/{organization_id}/accessApprovalSettings"
+ * //
+ * name: 'projects/my-project/accessApprovalSettings',
+ * // For the `FieldMask` definition, see
+ * // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
+ * // If this field is left unset, only the notification_emails field will be
+ * // updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "enrolledAncestor": false,
+ * // "enrolledServices": [],
+ * // "name": "my_name",
+ * // "notificationEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.projects.updateAccessApprovalSettings
* @memberOf! ()
*
@@ -1913,6 +2776,62 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.projects.approvalRequests.approve
* @desc Approves a request and returns the updated ApprovalRequest. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.projects.approvalRequests.approve({
+ * // Name of the approval request to approve.
+ * name: 'projects/my-project/approvalRequests/my-approvalRequest',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "expireTime": "my_expireTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.projects.approvalRequests.approve
* @memberOf! ()
*
@@ -1989,6 +2908,60 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.projects.approvalRequests.dismiss
* @desc Dismisses a request. Returns the updated ApprovalRequest. NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.projects.approvalRequests.dismiss({
+ * // Name of the ApprovalRequest to dismiss.
+ * name: 'projects/my-project/approvalRequests/my-approvalRequest',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.projects.approvalRequests.dismiss
* @memberOf! ()
*
@@ -2065,6 +3038,54 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.projects.approvalRequests.get
* @desc Gets an approval request. Returns NOT_FOUND if the request does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.projects.approvalRequests.get({
+ * // Name of the approval request to retrieve.
+ * name: 'projects/my-project/approvalRequests/my-approvalRequest',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approve": {},
+ * // "dismiss": {},
+ * // "name": "my_name",
+ * // "requestTime": "my_requestTime",
+ * // "requestedExpiration": "my_requestedExpiration",
+ * // "requestedLocations": {},
+ * // "requestedReason": {},
+ * // "requestedResourceName": "my_requestedResourceName",
+ * // "requestedResourceProperties": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.projects.approvalRequests.get
* @memberOf! ()
*
@@ -2137,6 +3158,62 @@ export namespace accessapproval_v1beta1 {
/**
* accessapproval.projects.approvalRequests.list
* @desc Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accessapproval.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accessapproval = google.accessapproval('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accessapproval.projects.approvalRequests.list({
+ * // A filter on the type of approval requests to retrieve. Must be one of the
+ * // following values:
+ * //
+ * // - [not set]: Requests that are pending or have active approvals.
+ * // - ALL: All requests.
+ * // - PENDING: Only pending requests.
+ * // - ACTIVE: Only active (i.e. currently approved) requests.
+ * // - DISMISSED: Only dismissed (including expired) requests.
+ * //
+ * filter: 'placeholder-value',
+ * // Requested page size.
+ * pageSize: 'placeholder-value',
+ * // A token identifying the page of results to return.
+ * pageToken: 'placeholder-value',
+ * // The parent resource. This may be "projects/{project_id}",
+ * // "folders/{folder_id}", or "organizations/{organization_id}".
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "approvalRequests": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accessapproval.projects.approvalRequests.list
* @memberOf! ()
*
diff --git a/src/apis/accesscontextmanager/v1.ts b/src/apis/accesscontextmanager/v1.ts
index 6c0aaa1ce49..cb2cfe7ed38 100644
--- a/src/apis/accesscontextmanager/v1.ts
+++ b/src/apis/accesscontextmanager/v1.ts
@@ -528,6 +528,58 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.create
* @desc Create an `AccessPolicy`. Fails if this organization already has a `AccessPolicy`. The longrunning Operation will have a successful status once the `AccessPolicy` has propagated to long-lasting storage. Syntactic and basic semantic errors will be returned in `metadata` as a BadRequest proto.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.create({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "etag": "my_etag",
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "title": "my_title"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.create
* @memberOf! ()
*
@@ -600,6 +652,52 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.delete
* @desc Delete an AccessPolicy by resource name. The longrunning Operation will have a successful status once the AccessPolicy has been removed from long-lasting storage.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.delete({
+ * // Required. Resource name for the access policy to delete.
+ * //
+ * // Format `accessPolicies/{policy_id}`
+ * name: 'accessPolicies/my-accessPolicie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.delete
* @memberOf! ()
*
@@ -672,6 +770,51 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.get
* @desc Get an AccessPolicy by name.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.get({
+ * // Required. Resource name for the access policy to get.
+ * //
+ * // Format `accessPolicies/{policy_id}`
+ * name: 'accessPolicies/my-accessPolicie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "title": "my_title"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.get
* @memberOf! ()
*
@@ -744,6 +887,56 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.list
* @desc List all AccessPolicies under a container.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.list({
+ * // Number of AccessPolicy instances to include in the list. Default 100.
+ * pageSize: 'placeholder-value',
+ * // Next page token for the next batch of AccessPolicy instances. Defaults to
+ * // the first page of results.
+ * pageToken: 'placeholder-value',
+ * // Required. Resource name for the container to list AccessPolicy instances
+ * // from.
+ * //
+ * // Format:
+ * // `organizations/{org_id}`
+ * parent: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accessPolicies": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.list
* @memberOf! ()
*
@@ -825,6 +1018,64 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.patch
* @desc Update an AccessPolicy. The longrunning Operation from this RPC will have a successful status once the changes to the AccessPolicy have propagated to long-lasting storage. Syntactic and basic semantic errors will be returned in `metadata` as a BadRequest proto.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.patch({
+ * // Output only. Resource name of the `AccessPolicy`. Format:
+ * // `accessPolicies/{policy_id}`
+ * name: 'accessPolicies/my-accessPolicie',
+ * // Required. Mask to control which fields get updated. Must be non-empty.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "etag": "my_etag",
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "title": "my_title"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.patch
* @memberOf! ()
*
@@ -984,6 +1235,65 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.accessLevels.create
* @desc Create an Access Level. The longrunning operation from this RPC will have a successful status once the Access Level has propagated to long-lasting storage. Access Levels containing errors will result in an error response for the first error encountered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.accessLevels.create({
+ * // Required. Resource name for the access policy which owns this Access
+ * // Level.
+ * //
+ * // Format: `accessPolicies/{policy_id}`
+ * parent: 'accessPolicies/my-accessPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "basic": {},
+ * // "custom": {},
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "title": "my_title"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.accessLevels.create
* @memberOf! ()
*
@@ -1060,6 +1370,53 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.accessLevels.delete
* @desc Delete an Access Level by resource name. The longrunning operation from this RPC will have a successful status once the Access Level has been removed from long-lasting storage.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.accessLevels.delete({
+ * // Required. Resource name for the Access Level.
+ * //
+ * // Format:
+ * // `accessPolicies/{policy_id}/accessLevels/{access_level_id}`
+ * name: 'accessPolicies/my-accessPolicie/accessLevels/my-accessLevel',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.accessLevels.delete
* @memberOf! ()
*
@@ -1132,6 +1489,61 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.accessLevels.get
* @desc Get an Access Level by resource name.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.accessLevels.get({
+ * // Whether to return `BasicLevels` in the Cloud Common Expression
+ * // Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where
+ * // Access Levels
+ * // are returned as `BasicLevels` or `CustomLevels` based on how they were
+ * // created. If set to CEL, all Access Levels are returned as
+ * // `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent
+ * // `CustomLevels`.
+ * accessLevelFormat: 'placeholder-value',
+ * // Required. Resource name for the Access Level.
+ * //
+ * // Format:
+ * // `accessPolicies/{policy_id}/accessLevels/{access_level_id}`
+ * name: 'accessPolicies/my-accessPolicie/accessLevels/my-accessLevel',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "basic": {},
+ * // "custom": {},
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "title": "my_title"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.accessLevels.get
* @memberOf! ()
*
@@ -1205,6 +1617,60 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.accessLevels.list
* @desc List all Access Levels for an access policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.accessLevels.list({
+ * // Whether to return `BasicLevels` in the Cloud Common Expression language, as
+ * // `CustomLevels`, rather than as `BasicLevels`. Defaults to returning
+ * // `AccessLevels` in the format they were defined.
+ * accessLevelFormat: 'placeholder-value',
+ * // Number of Access Levels to include in
+ * // the list. Default 100.
+ * pageSize: 'placeholder-value',
+ * // Next page token for the next batch of Access Level instances.
+ * // Defaults to the first page of results.
+ * pageToken: 'placeholder-value',
+ * // Required. Resource name for the access policy to list Access Levels from.
+ * //
+ * // Format:
+ * // `accessPolicies/{policy_id}`
+ * parent: 'accessPolicies/my-accessPolicie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accessLevels": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.accessLevels.list
* @memberOf! ()
*
@@ -1285,6 +1751,67 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.accessLevels.patch
* @desc Update an Access Level. The longrunning operation from this RPC will have a successful status once the changes to the Access Level have propagated to long-lasting storage. Access Levels containing errors will result in an error response for the first error encountered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.accessLevels.patch({
+ * // Required. Resource name for the Access Level. The `short_name` component
+ * // must begin with a letter and only include alphanumeric and '_'. Format:
+ * // `accessPolicies/{policy_id}/accessLevels/{short_name}`. The maximum length
+ * // of the `short_name` component is 50 characters.
+ * name: 'accessPolicies/my-accessPolicie/accessLevels/my-accessLevel',
+ * // Required. Mask to control which fields get updated. Must be non-empty.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "basic": {},
+ * // "custom": {},
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "title": "my_title"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.accessLevels.patch
* @memberOf! ()
*
@@ -1359,6 +1886,64 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.accessLevels.replaceAll
* @desc Replace all existing Access Levels in an Access Policy with the Access Levels provided. This is done atomically. The longrunning operation from this RPC will have a successful status once all replacements have propagated to long-lasting storage. Replacements containing errors will result in an error response for the first error encountered. Replacement will be cancelled on error, existing Access Levels will not be affected. Operation.response field will contain ReplaceAccessLevelsResponse. Removing Access Levels contained in existing Service Perimeters will result in error.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.accessLevels.replaceAll(
+ * {
+ * // Required. Resource name for the access policy which owns these
+ * // Access Levels.
+ * //
+ * // Format: `accessPolicies/{policy_id}`
+ * parent: 'accessPolicies/my-accessPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accessLevels": [],
+ * // "etag": "my_etag"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.accessLevels.replaceAll
* @memberOf! ()
*
@@ -1550,6 +2135,64 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.servicePerimeters.commit
* @desc Commit the dry-run spec for all the Service Perimeters in an Access Policy. A commit operation on a Service Perimeter involves copying its `spec` field to that Service Perimeter's `status` field. Only Service Perimeters with `use_explicit_dry_run_spec` field set to true are affected by a commit operation. The longrunning operation from this RPC will have a successful status once the dry-run specs for all the Service Perimeters have been committed. If a commit fails, it will cause the longrunning operation to return an error response and the entire commit operation will be cancelled. When successful, Operation.response field will contain CommitServicePerimetersResponse. The `dry_run` and the `spec` fields will be cleared after a successful commit operation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.servicePerimeters.commit(
+ * {
+ * // Required. Resource name for the parent Access Policy which owns all
+ * // Service Perimeters in scope for
+ * // the commit operation.
+ * //
+ * // Format: `accessPolicies/{policy_id}`
+ * parent: 'accessPolicies/my-accessPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "etag": "my_etag"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.servicePerimeters.commit
* @memberOf! ()
*
@@ -1626,6 +2269,69 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.servicePerimeters.create
* @desc Create a Service Perimeter. The longrunning operation from this RPC will have a successful status once the Service Perimeter has propagated to long-lasting storage. Service Perimeters containing errors will result in an error response for the first error encountered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.servicePerimeters.create(
+ * {
+ * // Required. Resource name for the access policy which owns this Service
+ * // Perimeter.
+ * //
+ * // Format: `accessPolicies/{policy_id}`
+ * parent: 'accessPolicies/my-accessPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "perimeterType": "my_perimeterType",
+ * // "spec": {},
+ * // "status": {},
+ * // "title": "my_title",
+ * // "useExplicitDryRunSpec": false
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.servicePerimeters.create
* @memberOf! ()
*
@@ -1702,6 +2408,56 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.servicePerimeters.delete
* @desc Delete a Service Perimeter by resource name. The longrunning operation from this RPC will have a successful status once the Service Perimeter has been removed from long-lasting storage.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.servicePerimeters.delete(
+ * {
+ * // Required. Resource name for the Service Perimeter.
+ * //
+ * // Format:
+ * // `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}`
+ * name:
+ * 'accessPolicies/my-accessPolicie/servicePerimeters/my-servicePerimeter',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.servicePerimeters.delete
* @memberOf! ()
*
@@ -1774,6 +2530,56 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.servicePerimeters.get
* @desc Get a Service Perimeter by resource name.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.servicePerimeters.get({
+ * // Required. Resource name for the Service Perimeter.
+ * //
+ * // Format:
+ * // `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}`
+ * name:
+ * 'accessPolicies/my-accessPolicie/servicePerimeters/my-servicePerimeter',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "perimeterType": "my_perimeterType",
+ * // "spec": {},
+ * // "status": {},
+ * // "title": "my_title",
+ * // "useExplicitDryRunSpec": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.servicePerimeters.get
* @memberOf! ()
*
@@ -1846,6 +2652,56 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.servicePerimeters.list
* @desc List all Service Perimeters for an access policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.servicePerimeters.list({
+ * // Number of Service Perimeters to include
+ * // in the list. Default 100.
+ * pageSize: 'placeholder-value',
+ * // Next page token for the next batch of Service Perimeter instances.
+ * // Defaults to the first page of results.
+ * pageToken: 'placeholder-value',
+ * // Required. Resource name for the access policy to list Service Perimeters from.
+ * //
+ * // Format:
+ * // `accessPolicies/{policy_id}`
+ * parent: 'accessPolicies/my-accessPolicie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "servicePerimeters": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.servicePerimeters.list
* @memberOf! ()
*
@@ -1932,6 +2788,71 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.servicePerimeters.patch
* @desc Update a Service Perimeter. The longrunning operation from this RPC will have a successful status once the changes to the Service Perimeter have propagated to long-lasting storage. Service Perimeter containing errors will result in an error response for the first error encountered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.servicePerimeters.patch(
+ * {
+ * // Required. Resource name for the ServicePerimeter. The `short_name`
+ * // component must begin with a letter and only include alphanumeric and '_'.
+ * // Format: `accessPolicies/{policy_id}/servicePerimeters/{short_name}`
+ * name:
+ * 'accessPolicies/my-accessPolicie/servicePerimeters/my-servicePerimeter',
+ * // Required. Mask to control which fields get updated. Must be non-empty.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "perimeterType": "my_perimeterType",
+ * // "spec": {},
+ * // "status": {},
+ * // "title": "my_title",
+ * // "useExplicitDryRunSpec": false
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.servicePerimeters.patch
* @memberOf! ()
*
@@ -2006,6 +2927,64 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.accessPolicies.servicePerimeters.replaceAll
* @desc Replace all existing Service Perimeters in an Access Policy with the Service Perimeters provided. This is done atomically. The longrunning operation from this RPC will have a successful status once all replacements have propagated to long-lasting storage. Replacements containing errors will result in an error response for the first error encountered. Replacement will be cancelled on error, existing Service Perimeters will not be affected. Operation.response field will contain ReplaceServicePerimetersResponse.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.servicePerimeters.replaceAll(
+ * {
+ * // Required. Resource name for the access policy which owns these
+ * // Service Perimeters.
+ * //
+ * // Format: `accessPolicies/{policy_id}`
+ * parent: 'accessPolicies/my-accessPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "etag": "my_etag",
+ * // "servicePerimeters": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.servicePerimeters.replaceAll
* @memberOf! ()
*
@@ -2205,6 +3184,50 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.operations.cancel
* @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.operations.cancel({
+ * // The name of the operation resource to be cancelled.
+ * name: 'operations/.*',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.operations.cancel
* @memberOf! ()
*
@@ -2276,6 +3299,44 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.operations.delete
* @desc Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.operations.delete({
+ * // The name of the operation resource to be deleted.
+ * name: 'operations/.*',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.operations.delete
* @memberOf! ()
*
@@ -2346,6 +3407,50 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.operations.get({
+ * // The name of the operation resource.
+ * name: 'operations/.*',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.operations.get
* @memberOf! ()
*
@@ -2417,6 +3522,53 @@ export namespace accesscontextmanager_v1 {
/**
* accesscontextmanager.operations.list
* @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.operations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The name of the operation's parent resource.
+ * name: 'operations',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.operations.list
* @memberOf! ()
*
diff --git a/src/apis/accesscontextmanager/v1beta.ts b/src/apis/accesscontextmanager/v1beta.ts
index 58aa62c5a89..90420e67df5 100644
--- a/src/apis/accesscontextmanager/v1beta.ts
+++ b/src/apis/accesscontextmanager/v1beta.ts
@@ -437,6 +437,57 @@ export namespace accesscontextmanager_v1beta {
/**
* accesscontextmanager.accessPolicies.create
* @desc Create an `AccessPolicy`. Fails if this organization already has a `AccessPolicy`. The longrunning Operation will have a successful status once the `AccessPolicy` has propagated to long-lasting storage. Syntactic and basic semantic errors will be returned in `metadata` as a BadRequest proto.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.create({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "title": "my_title"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.create
* @memberOf! ()
*
@@ -512,6 +563,52 @@ export namespace accesscontextmanager_v1beta {
/**
* accesscontextmanager.accessPolicies.delete
* @desc Delete an AccessPolicy by resource name. The longrunning Operation will have a successful status once the AccessPolicy has been removed from long-lasting storage.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.delete({
+ * // Required. Resource name for the access policy to delete.
+ * //
+ * // Format `accessPolicies/{policy_id}`
+ * name: 'accessPolicies/my-accessPolicie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.delete
* @memberOf! ()
*
@@ -584,6 +681,50 @@ export namespace accesscontextmanager_v1beta {
/**
* accesscontextmanager.accessPolicies.get
* @desc Get an AccessPolicy by name.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.get({
+ * // Required. Resource name for the access policy to get.
+ * //
+ * // Format `accessPolicies/{policy_id}`
+ * name: 'accessPolicies/my-accessPolicie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "title": "my_title"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.get
* @memberOf! ()
*
@@ -656,6 +797,56 @@ export namespace accesscontextmanager_v1beta {
/**
* accesscontextmanager.accessPolicies.list
* @desc List all AccessPolicies under a container.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.list({
+ * // Number of AccessPolicy instances to include in the list. Default 100.
+ * pageSize: 'placeholder-value',
+ * // Next page token for the next batch of AccessPolicy instances. Defaults to
+ * // the first page of results.
+ * pageToken: 'placeholder-value',
+ * // Required. Resource name for the container to list AccessPolicy instances
+ * // from.
+ * //
+ * // Format:
+ * // `organizations/{org_id}`
+ * parent: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accessPolicies": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.list
* @memberOf! ()
*
@@ -740,6 +931,63 @@ export namespace accesscontextmanager_v1beta {
/**
* accesscontextmanager.accessPolicies.patch
* @desc Update an AccessPolicy. The longrunning Operation from this RPC will have a successful status once the changes to the AccessPolicy have propagated to long-lasting storage. Syntactic and basic semantic errors will be returned in `metadata` as a BadRequest proto.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.patch({
+ * // Output only. Resource name of the `AccessPolicy`. Format:
+ * // `accessPolicies/{policy_id}`
+ * name: 'accessPolicies/my-accessPolicie',
+ * // Required. Mask to control which fields get updated. Must be non-empty.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "title": "my_title"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.patch
* @memberOf! ()
*
@@ -899,6 +1147,65 @@ export namespace accesscontextmanager_v1beta {
/**
* accesscontextmanager.accessPolicies.accessLevels.create
* @desc Create an Access Level. The longrunning operation from this RPC will have a successful status once the Access Level has propagated to long-lasting storage. Access Levels containing errors will result in an error response for the first error encountered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.accessLevels.create({
+ * // Required. Resource name for the access policy which owns this Access
+ * // Level.
+ * //
+ * // Format: `accessPolicies/{policy_id}`
+ * parent: 'accessPolicies/my-accessPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "basic": {},
+ * // "custom": {},
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "title": "my_title"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.accessLevels.create
* @memberOf! ()
*
@@ -975,6 +1282,53 @@ export namespace accesscontextmanager_v1beta {
/**
* accesscontextmanager.accessPolicies.accessLevels.delete
* @desc Delete an Access Level by resource name. The longrunning operation from this RPC will have a successful status once the Access Level has been removed from long-lasting storage.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.accessLevels.delete({
+ * // Required. Resource name for the Access Level.
+ * //
+ * // Format:
+ * // `accessPolicies/{policy_id}/accessLevels/{access_level_id}`
+ * name: 'accessPolicies/my-accessPolicie/accessLevels/my-accessLevel',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.accessLevels.delete
* @memberOf! ()
*
@@ -1047,6 +1401,61 @@ export namespace accesscontextmanager_v1beta {
/**
* accesscontextmanager.accessPolicies.accessLevels.get
* @desc Get an Access Level by resource name.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.accessLevels.get({
+ * // Whether to return `BasicLevels` in the Cloud Common Expression
+ * // Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where
+ * // Access Levels
+ * // are returned as `BasicLevels` or `CustomLevels` based on how they were
+ * // created. If set to CEL, all Access Levels are returned as
+ * // `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent
+ * // `CustomLevels`.
+ * accessLevelFormat: 'placeholder-value',
+ * // Required. Resource name for the Access Level.
+ * //
+ * // Format:
+ * // `accessPolicies/{policy_id}/accessLevels/{access_level_id}`
+ * name: 'accessPolicies/my-accessPolicie/accessLevels/my-accessLevel',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "basic": {},
+ * // "custom": {},
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "title": "my_title"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.accessLevels.get
* @memberOf! ()
*
@@ -1120,6 +1529,60 @@ export namespace accesscontextmanager_v1beta {
/**
* accesscontextmanager.accessPolicies.accessLevels.list
* @desc List all Access Levels for an access policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.accessLevels.list({
+ * // Whether to return `BasicLevels` in the Cloud Common Expression language, as
+ * // `CustomLevels`, rather than as `BasicLevels`. Defaults to returning
+ * // `AccessLevels` in the format they were defined.
+ * accessLevelFormat: 'placeholder-value',
+ * // Number of Access Levels to include in
+ * // the list. Default 100.
+ * pageSize: 'placeholder-value',
+ * // Next page token for the next batch of Access Level instances.
+ * // Defaults to the first page of results.
+ * pageToken: 'placeholder-value',
+ * // Required. Resource name for the access policy to list Access Levels from.
+ * //
+ * // Format:
+ * // `accessPolicies/{policy_id}`
+ * parent: 'accessPolicies/my-accessPolicie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accessLevels": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.accessLevels.list
* @memberOf! ()
*
@@ -1200,6 +1663,67 @@ export namespace accesscontextmanager_v1beta {
/**
* accesscontextmanager.accessPolicies.accessLevels.patch
* @desc Update an Access Level. The longrunning operation from this RPC will have a successful status once the changes to the Access Level have propagated to long-lasting storage. Access Levels containing errors will result in an error response for the first error encountered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.accessLevels.patch({
+ * // Required. Resource name for the Access Level. The `short_name` component
+ * // must begin with a letter and only include alphanumeric and '_'. Format:
+ * // `accessPolicies/{policy_id}/accessLevels/{short_name}`. The maximum length
+ * // // of the `short_name` component is 50 characters.
+ * name: 'accessPolicies/my-accessPolicie/accessLevels/my-accessLevel',
+ * // Required. Mask to control which fields get updated. Must be non-empty.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "basic": {},
+ * // "custom": {},
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "title": "my_title"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.accessLevels.patch
* @memberOf! ()
*
@@ -1372,6 +1896,67 @@ export namespace accesscontextmanager_v1beta {
/**
* accesscontextmanager.accessPolicies.servicePerimeters.create
* @desc Create a Service Perimeter. The longrunning operation from this RPC will have a successful status once the Service Perimeter has propagated to long-lasting storage. Service Perimeters containing errors will result in an error response for the first error encountered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.servicePerimeters.create(
+ * {
+ * // Required. Resource name for the access policy which owns this Service
+ * // Perimeter.
+ * //
+ * // Format: `accessPolicies/{policy_id}`
+ * parent: 'accessPolicies/my-accessPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "perimeterType": "my_perimeterType",
+ * // "status": {},
+ * // "title": "my_title"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.servicePerimeters.create
* @memberOf! ()
*
@@ -1448,6 +2033,56 @@ export namespace accesscontextmanager_v1beta {
/**
* accesscontextmanager.accessPolicies.servicePerimeters.delete
* @desc Delete a Service Perimeter by resource name. The longrunning operation from this RPC will have a successful status once the Service Perimeter has been removed from long-lasting storage.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.servicePerimeters.delete(
+ * {
+ * // Required. Resource name for the Service Perimeter.
+ * //
+ * // Format:
+ * // `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}`
+ * name:
+ * 'accessPolicies/my-accessPolicie/servicePerimeters/my-servicePerimeter',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.servicePerimeters.delete
* @memberOf! ()
*
@@ -1520,6 +2155,54 @@ export namespace accesscontextmanager_v1beta {
/**
* accesscontextmanager.accessPolicies.servicePerimeters.get
* @desc Get a Service Perimeter by resource name.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.servicePerimeters.get({
+ * // Required. Resource name for the Service Perimeter.
+ * //
+ * // Format:
+ * // `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}`
+ * name:
+ * 'accessPolicies/my-accessPolicie/servicePerimeters/my-servicePerimeter',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "perimeterType": "my_perimeterType",
+ * // "status": {},
+ * // "title": "my_title"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.servicePerimeters.get
* @memberOf! ()
*
@@ -1592,6 +2275,56 @@ export namespace accesscontextmanager_v1beta {
/**
* accesscontextmanager.accessPolicies.servicePerimeters.list
* @desc List all Service Perimeters for an access policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.servicePerimeters.list({
+ * // Number of Service Perimeters to include
+ * // in the list. Default 100.
+ * pageSize: 'placeholder-value',
+ * // Next page token for the next batch of Service Perimeter instances.
+ * // Defaults to the first page of results.
+ * pageToken: 'placeholder-value',
+ * // Required. Resource name for the access policy to list Service Perimeters from.
+ * //
+ * // Format:
+ * // `accessPolicies/{policy_id}`
+ * parent: 'accessPolicies/my-accessPolicie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "servicePerimeters": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.servicePerimeters.list
* @memberOf! ()
*
@@ -1678,6 +2411,69 @@ export namespace accesscontextmanager_v1beta {
/**
* accesscontextmanager.accessPolicies.servicePerimeters.patch
* @desc Update a Service Perimeter. The longrunning operation from this RPC will have a successful status once the changes to the Service Perimeter have propagated to long-lasting storage. Service Perimeter containing errors will result in an error response for the first error encountered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.accessPolicies.servicePerimeters.patch(
+ * {
+ * // Required. Resource name for the ServicePerimeter. The `short_name`
+ * // component must begin with a letter and only include alphanumeric and '_'.
+ * // Format: `accessPolicies/{policy_id}/servicePerimeters/{short_name}`
+ * name:
+ * 'accessPolicies/my-accessPolicie/servicePerimeters/my-servicePerimeter',
+ * // Required. Mask to control which fields get updated. Must be non-empty.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "perimeterType": "my_perimeterType",
+ * // "status": {},
+ * // "title": "my_title"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.accessPolicies.servicePerimeters.patch
* @memberOf! ()
*
@@ -1842,6 +2638,50 @@ export namespace accesscontextmanager_v1beta {
/**
* accesscontextmanager.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/accesscontextmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const accesscontextmanager = google.accesscontextmanager('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await accesscontextmanager.operations.get({
+ * // The name of the operation resource.
+ * name: 'operations/.*',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias accesscontextmanager.operations.get
* @memberOf! ()
*
diff --git a/src/apis/adexchangebuyer/v1.2.ts b/src/apis/adexchangebuyer/v1.2.ts
index dd6190abb7f..eb1ef48c6f2 100644
--- a/src/apis/adexchangebuyer/v1.2.ts
+++ b/src/apis/adexchangebuyer/v1.2.ts
@@ -280,6 +280,53 @@ export namespace adexchangebuyer_v1_2 {
/**
* adexchangebuyer.accounts.get
* @desc Gets one account by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.accounts.get({
+ * // The account id
+ * id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bidderLocation": [],
+ * // "cookieMatchingNid": "my_cookieMatchingNid",
+ * // "cookieMatchingUrl": "my_cookieMatchingUrl",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "maximumActiveCreatives": 0,
+ * // "maximumTotalQps": 0,
+ * // "numberActiveCreatives": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.accounts.get
* @memberOf! ()
*
@@ -351,6 +398,44 @@ export namespace adexchangebuyer_v1_2 {
/**
* adexchangebuyer.accounts.list
* @desc Retrieves the authenticated user's list of accounts.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.accounts.list({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.accounts.list
* @memberOf! ()
*
@@ -423,6 +508,68 @@ export namespace adexchangebuyer_v1_2 {
/**
* adexchangebuyer.accounts.patch
* @desc Updates an existing account. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.accounts.patch({
+ * // The account id
+ * id: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bidderLocation": [],
+ * // "cookieMatchingNid": "my_cookieMatchingNid",
+ * // "cookieMatchingUrl": "my_cookieMatchingUrl",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "maximumActiveCreatives": 0,
+ * // "maximumTotalQps": 0,
+ * // "numberActiveCreatives": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bidderLocation": [],
+ * // "cookieMatchingNid": "my_cookieMatchingNid",
+ * // "cookieMatchingUrl": "my_cookieMatchingUrl",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "maximumActiveCreatives": 0,
+ * // "maximumTotalQps": 0,
+ * // "numberActiveCreatives": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.accounts.patch
* @memberOf! ()
*
@@ -495,6 +642,68 @@ export namespace adexchangebuyer_v1_2 {
/**
* adexchangebuyer.accounts.update
* @desc Updates an existing account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.accounts.update({
+ * // The account id
+ * id: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bidderLocation": [],
+ * // "cookieMatchingNid": "my_cookieMatchingNid",
+ * // "cookieMatchingUrl": "my_cookieMatchingUrl",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "maximumActiveCreatives": 0,
+ * // "maximumTotalQps": 0,
+ * // "numberActiveCreatives": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bidderLocation": [],
+ * // "cookieMatchingNid": "my_cookieMatchingNid",
+ * // "cookieMatchingUrl": "my_cookieMatchingUrl",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "maximumActiveCreatives": 0,
+ * // "maximumTotalQps": 0,
+ * // "numberActiveCreatives": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.accounts.update
* @memberOf! ()
*
@@ -624,6 +833,70 @@ export namespace adexchangebuyer_v1_2 {
/**
* adexchangebuyer.creatives.get
* @desc Gets the status for a single creative. A creative will be available 30-40 minutes after submission.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.creatives.get({
+ * // The id for the account that will serve this creative.
+ * accountId: 'placeholder-value',
+ * // The buyer-specific id for this creative.
+ * buyerCreativeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "HTMLSnippet": "my_HTMLSnippet",
+ * // "accountId": 0,
+ * // "advertiserId": [],
+ * // "advertiserName": "my_advertiserName",
+ * // "agencyId": "my_agencyId",
+ * // "apiUploadTimestamp": "my_apiUploadTimestamp",
+ * // "attribute": [],
+ * // "buyerCreativeId": "my_buyerCreativeId",
+ * // "clickThroughUrl": [],
+ * // "corrections": [],
+ * // "disapprovalReasons": [],
+ * // "filteringReasons": {},
+ * // "height": 0,
+ * // "impressionTrackingUrl": [],
+ * // "kind": "my_kind",
+ * // "productCategories": [],
+ * // "restrictedCategories": [],
+ * // "sensitiveCategories": [],
+ * // "status": "my_status",
+ * // "vendorType": [],
+ * // "version": 0,
+ * // "videoURL": "my_videoURL",
+ * // "width": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.creatives.get
* @memberOf! ()
*
@@ -696,6 +969,95 @@ export namespace adexchangebuyer_v1_2 {
/**
* adexchangebuyer.creatives.insert
* @desc Submit a new creative.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.creatives.insert({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "HTMLSnippet": "my_HTMLSnippet",
+ * // "accountId": 0,
+ * // "advertiserId": [],
+ * // "advertiserName": "my_advertiserName",
+ * // "agencyId": "my_agencyId",
+ * // "apiUploadTimestamp": "my_apiUploadTimestamp",
+ * // "attribute": [],
+ * // "buyerCreativeId": "my_buyerCreativeId",
+ * // "clickThroughUrl": [],
+ * // "corrections": [],
+ * // "disapprovalReasons": [],
+ * // "filteringReasons": {},
+ * // "height": 0,
+ * // "impressionTrackingUrl": [],
+ * // "kind": "my_kind",
+ * // "productCategories": [],
+ * // "restrictedCategories": [],
+ * // "sensitiveCategories": [],
+ * // "status": "my_status",
+ * // "vendorType": [],
+ * // "version": 0,
+ * // "videoURL": "my_videoURL",
+ * // "width": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "HTMLSnippet": "my_HTMLSnippet",
+ * // "accountId": 0,
+ * // "advertiserId": [],
+ * // "advertiserName": "my_advertiserName",
+ * // "agencyId": "my_agencyId",
+ * // "apiUploadTimestamp": "my_apiUploadTimestamp",
+ * // "attribute": [],
+ * // "buyerCreativeId": "my_buyerCreativeId",
+ * // "clickThroughUrl": [],
+ * // "corrections": [],
+ * // "disapprovalReasons": [],
+ * // "filteringReasons": {},
+ * // "height": 0,
+ * // "impressionTrackingUrl": [],
+ * // "kind": "my_kind",
+ * // "productCategories": [],
+ * // "restrictedCategories": [],
+ * // "sensitiveCategories": [],
+ * // "status": "my_status",
+ * // "vendorType": [],
+ * // "version": 0,
+ * // "videoURL": "my_videoURL",
+ * // "width": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.creatives.insert
* @memberOf! ()
*
@@ -767,6 +1129,52 @@ export namespace adexchangebuyer_v1_2 {
/**
* adexchangebuyer.creatives.list
* @desc Retrieves a list of the authenticated user's active creatives. A creative will be available 30-40 minutes after submission.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.creatives.list({
+ * // Maximum number of entries returned on one result page. If not set, the default is 100. Optional.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. Optional.
+ * pageToken: 'placeholder-value',
+ * // When specified, only creatives having the given status are returned.
+ * statusFilter: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.creatives.list
* @memberOf! ()
*
diff --git a/src/apis/adexchangebuyer/v1.3.ts b/src/apis/adexchangebuyer/v1.3.ts
index d5405109c60..7c2c9b545c2 100644
--- a/src/apis/adexchangebuyer/v1.3.ts
+++ b/src/apis/adexchangebuyer/v1.3.ts
@@ -665,6 +665,53 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.accounts.get
* @desc Gets one account by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.accounts.get({
+ * // The account id
+ * id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bidderLocation": [],
+ * // "cookieMatchingNid": "my_cookieMatchingNid",
+ * // "cookieMatchingUrl": "my_cookieMatchingUrl",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "maximumActiveCreatives": 0,
+ * // "maximumTotalQps": 0,
+ * // "numberActiveCreatives": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.accounts.get
* @memberOf! ()
*
@@ -736,6 +783,44 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.accounts.list
* @desc Retrieves the authenticated user's list of accounts.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.accounts.list({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.accounts.list
* @memberOf! ()
*
@@ -808,6 +893,68 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.accounts.patch
* @desc Updates an existing account. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.accounts.patch({
+ * // The account id
+ * id: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bidderLocation": [],
+ * // "cookieMatchingNid": "my_cookieMatchingNid",
+ * // "cookieMatchingUrl": "my_cookieMatchingUrl",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "maximumActiveCreatives": 0,
+ * // "maximumTotalQps": 0,
+ * // "numberActiveCreatives": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bidderLocation": [],
+ * // "cookieMatchingNid": "my_cookieMatchingNid",
+ * // "cookieMatchingUrl": "my_cookieMatchingUrl",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "maximumActiveCreatives": 0,
+ * // "maximumTotalQps": 0,
+ * // "numberActiveCreatives": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.accounts.patch
* @memberOf! ()
*
@@ -880,6 +1027,68 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.accounts.update
* @desc Updates an existing account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.accounts.update({
+ * // The account id
+ * id: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bidderLocation": [],
+ * // "cookieMatchingNid": "my_cookieMatchingNid",
+ * // "cookieMatchingUrl": "my_cookieMatchingUrl",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "maximumActiveCreatives": 0,
+ * // "maximumTotalQps": 0,
+ * // "numberActiveCreatives": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bidderLocation": [],
+ * // "cookieMatchingNid": "my_cookieMatchingNid",
+ * // "cookieMatchingUrl": "my_cookieMatchingUrl",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "maximumActiveCreatives": 0,
+ * // "maximumTotalQps": 0,
+ * // "numberActiveCreatives": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.accounts.update
* @memberOf! ()
*
@@ -1009,6 +1218,49 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.billingInfo.get
* @desc Returns the billing information for one account specified by account ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.billingInfo.get({
+ * // The account id.
+ * accountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": 0,
+ * // "accountName": "my_accountName",
+ * // "billingId": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.billingInfo.get
* @memberOf! ()
*
@@ -1081,6 +1333,44 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.billingInfo.list
* @desc Retrieves a list of billing information for all accounts of the authenticated user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.billingInfo.list({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.billingInfo.list
* @memberOf! ()
*
@@ -1178,6 +1468,53 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.budget.get
* @desc Returns the budget information for the adgroup specified by the accountId and billingId.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.budget.get({
+ * // The account id to get the budget information for.
+ * accountId: 'placeholder-value',
+ * // The billing id to get the budget information for.
+ * billingId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "billingId": "my_billingId",
+ * // "budgetAmount": "my_budgetAmount",
+ * // "currencyCode": "my_currencyCode",
+ * // "id": "my_id",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.budget.get
* @memberOf! ()
*
@@ -1250,6 +1587,66 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.budget.patch
* @desc Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.budget.patch({
+ * // The account id associated with the budget being updated.
+ * accountId: 'placeholder-value',
+ * // The billing id associated with the budget being updated.
+ * billingId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "billingId": "my_billingId",
+ * // "budgetAmount": "my_budgetAmount",
+ * // "currencyCode": "my_currencyCode",
+ * // "id": "my_id",
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "billingId": "my_billingId",
+ * // "budgetAmount": "my_budgetAmount",
+ * // "currencyCode": "my_currencyCode",
+ * // "id": "my_id",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.budget.patch
* @memberOf! ()
*
@@ -1323,6 +1720,66 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.budget.update
* @desc Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.budget.update({
+ * // The account id associated with the budget being updated.
+ * accountId: 'placeholder-value',
+ * // The billing id associated with the budget being updated.
+ * billingId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "billingId": "my_billingId",
+ * // "budgetAmount": "my_budgetAmount",
+ * // "currencyCode": "my_currencyCode",
+ * // "id": "my_id",
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "billingId": "my_billingId",
+ * // "budgetAmount": "my_budgetAmount",
+ * // "currencyCode": "my_currencyCode",
+ * // "id": "my_id",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.budget.update
* @memberOf! ()
*
@@ -1459,6 +1916,72 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.creatives.get
* @desc Gets the status for a single creative. A creative will be available 30-40 minutes after submission.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.creatives.get({
+ * // The id for the account that will serve this creative.
+ * accountId: 'placeholder-value',
+ * // The buyer-specific id for this creative.
+ * buyerCreativeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "HTMLSnippet": "my_HTMLSnippet",
+ * // "accountId": 0,
+ * // "adTechnologyProviders": {},
+ * // "advertiserId": [],
+ * // "advertiserName": "my_advertiserName",
+ * // "agencyId": "my_agencyId",
+ * // "apiUploadTimestamp": "my_apiUploadTimestamp",
+ * // "attribute": [],
+ * // "buyerCreativeId": "my_buyerCreativeId",
+ * // "clickThroughUrl": [],
+ * // "corrections": [],
+ * // "disapprovalReasons": [],
+ * // "filteringReasons": {},
+ * // "height": 0,
+ * // "impressionTrackingUrl": [],
+ * // "kind": "my_kind",
+ * // "nativeAd": {},
+ * // "productCategories": [],
+ * // "restrictedCategories": [],
+ * // "sensitiveCategories": [],
+ * // "status": "my_status",
+ * // "vendorType": [],
+ * // "version": 0,
+ * // "videoURL": "my_videoURL",
+ * // "width": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.creatives.get
* @memberOf! ()
*
@@ -1531,6 +2054,99 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.creatives.insert
* @desc Submit a new creative.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.creatives.insert({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "HTMLSnippet": "my_HTMLSnippet",
+ * // "accountId": 0,
+ * // "adTechnologyProviders": {},
+ * // "advertiserId": [],
+ * // "advertiserName": "my_advertiserName",
+ * // "agencyId": "my_agencyId",
+ * // "apiUploadTimestamp": "my_apiUploadTimestamp",
+ * // "attribute": [],
+ * // "buyerCreativeId": "my_buyerCreativeId",
+ * // "clickThroughUrl": [],
+ * // "corrections": [],
+ * // "disapprovalReasons": [],
+ * // "filteringReasons": {},
+ * // "height": 0,
+ * // "impressionTrackingUrl": [],
+ * // "kind": "my_kind",
+ * // "nativeAd": {},
+ * // "productCategories": [],
+ * // "restrictedCategories": [],
+ * // "sensitiveCategories": [],
+ * // "status": "my_status",
+ * // "vendorType": [],
+ * // "version": 0,
+ * // "videoURL": "my_videoURL",
+ * // "width": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "HTMLSnippet": "my_HTMLSnippet",
+ * // "accountId": 0,
+ * // "adTechnologyProviders": {},
+ * // "advertiserId": [],
+ * // "advertiserName": "my_advertiserName",
+ * // "agencyId": "my_agencyId",
+ * // "apiUploadTimestamp": "my_apiUploadTimestamp",
+ * // "attribute": [],
+ * // "buyerCreativeId": "my_buyerCreativeId",
+ * // "clickThroughUrl": [],
+ * // "corrections": [],
+ * // "disapprovalReasons": [],
+ * // "filteringReasons": {},
+ * // "height": 0,
+ * // "impressionTrackingUrl": [],
+ * // "kind": "my_kind",
+ * // "nativeAd": {},
+ * // "productCategories": [],
+ * // "restrictedCategories": [],
+ * // "sensitiveCategories": [],
+ * // "status": "my_status",
+ * // "vendorType": [],
+ * // "version": 0,
+ * // "videoURL": "my_videoURL",
+ * // "width": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.creatives.insert
* @memberOf! ()
*
@@ -1602,6 +2218,56 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.creatives.list
* @desc Retrieves a list of the authenticated user's active creatives. A creative will be available 30-40 minutes after submission.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.creatives.list({
+ * // When specified, only creatives for the given account ids are returned.
+ * accountId: 'placeholder-value',
+ * // When specified, only creatives for the given buyer creative ids are returned.
+ * buyerCreativeId: 'placeholder-value',
+ * // Maximum number of entries returned on one result page. If not set, the default is 100. Optional.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. Optional.
+ * pageToken: 'placeholder-value',
+ * // When specified, only creatives having the given status are returned.
+ * statusFilter: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.creatives.list
* @memberOf! ()
*
@@ -1740,6 +2406,60 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.directDeals.get
* @desc Gets one direct deal by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.directDeals.get({
+ * // The direct deal id
+ * id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": 0,
+ * // "advertiser": "my_advertiser",
+ * // "allowsAlcohol": false,
+ * // "buyerAccountId": "my_buyerAccountId",
+ * // "currencyCode": "my_currencyCode",
+ * // "dealTier": "my_dealTier",
+ * // "endTime": "my_endTime",
+ * // "fixedCpm": "my_fixedCpm",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "privateExchangeMinCpm": "my_privateExchangeMinCpm",
+ * // "publisherBlocksOverriden": false,
+ * // "sellerNetwork": "my_sellerNetwork",
+ * // "startTime": "my_startTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.directDeals.get
* @memberOf! ()
*
@@ -1813,6 +2533,44 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.directDeals.list
* @desc Retrieves the authenticated user's list of direct deals.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.directDeals.list({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "directDeals": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.directDeals.list
* @memberOf! ()
*
@@ -1910,6 +2668,55 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.performanceReport.list
* @desc Retrieves the authenticated user's list of performance metrics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.performanceReport.list({
+ * // The account id to get the reports.
+ * accountId: 'placeholder-value',
+ * // The end time of the report in ISO 8601 timestamp format using UTC.
+ * endDateTime: 'placeholder-value',
+ * // Maximum number of entries returned on one result page. If not set, the default is 100. Optional.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through performance reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. Optional.
+ * pageToken: 'placeholder-value',
+ * // The start time of the report in ISO 8601 timestamp format using UTC.
+ * startDateTime: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "performanceReport": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.performanceReport.list
* @memberOf! ()
*
@@ -2026,6 +2833,43 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.pretargetingConfig.delete
* @desc Deletes an existing pretargeting config.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.pretargetingConfig.delete({
+ * // The account id to delete the pretargeting config for.
+ * accountId: 'placeholder-value',
+ * // The specific id of the configuration to delete.
+ * configId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.pretargetingConfig.delete
* @memberOf! ()
*
@@ -2099,6 +2943,71 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.pretargetingConfig.get
* @desc Gets a specific pretargeting configuration
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.pretargetingConfig.get({
+ * // The account id to get the pretargeting config for.
+ * accountId: 'placeholder-value',
+ * // The specific id of the configuration to retrieve.
+ * configId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billingId": "my_billingId",
+ * // "configId": "my_configId",
+ * // "configName": "my_configName",
+ * // "creativeType": [],
+ * // "dimensions": [],
+ * // "excludedContentLabels": [],
+ * // "excludedGeoCriteriaIds": [],
+ * // "excludedPlacements": [],
+ * // "excludedUserLists": [],
+ * // "excludedVerticals": [],
+ * // "geoCriteriaIds": [],
+ * // "isActive": false,
+ * // "kind": "my_kind",
+ * // "languages": [],
+ * // "maximumQps": "my_maximumQps",
+ * // "mobileCarriers": [],
+ * // "mobileDevices": [],
+ * // "mobileOperatingSystemVersions": [],
+ * // "placements": [],
+ * // "platforms": [],
+ * // "supportedCreativeAttributes": [],
+ * // "userLists": [],
+ * // "vendorTypes": [],
+ * // "verticals": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.pretargetingConfig.get
* @memberOf! ()
*
@@ -2174,6 +3083,100 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.pretargetingConfig.insert
* @desc Inserts a new pretargeting configuration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.pretargetingConfig.insert({
+ * // The account id to insert the pretargeting config for.
+ * accountId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "billingId": "my_billingId",
+ * // "configId": "my_configId",
+ * // "configName": "my_configName",
+ * // "creativeType": [],
+ * // "dimensions": [],
+ * // "excludedContentLabels": [],
+ * // "excludedGeoCriteriaIds": [],
+ * // "excludedPlacements": [],
+ * // "excludedUserLists": [],
+ * // "excludedVerticals": [],
+ * // "geoCriteriaIds": [],
+ * // "isActive": false,
+ * // "kind": "my_kind",
+ * // "languages": [],
+ * // "maximumQps": "my_maximumQps",
+ * // "mobileCarriers": [],
+ * // "mobileDevices": [],
+ * // "mobileOperatingSystemVersions": [],
+ * // "placements": [],
+ * // "platforms": [],
+ * // "supportedCreativeAttributes": [],
+ * // "userLists": [],
+ * // "vendorTypes": [],
+ * // "verticals": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billingId": "my_billingId",
+ * // "configId": "my_configId",
+ * // "configName": "my_configName",
+ * // "creativeType": [],
+ * // "dimensions": [],
+ * // "excludedContentLabels": [],
+ * // "excludedGeoCriteriaIds": [],
+ * // "excludedPlacements": [],
+ * // "excludedUserLists": [],
+ * // "excludedVerticals": [],
+ * // "geoCriteriaIds": [],
+ * // "isActive": false,
+ * // "kind": "my_kind",
+ * // "languages": [],
+ * // "maximumQps": "my_maximumQps",
+ * // "mobileCarriers": [],
+ * // "mobileDevices": [],
+ * // "mobileOperatingSystemVersions": [],
+ * // "placements": [],
+ * // "platforms": [],
+ * // "supportedCreativeAttributes": [],
+ * // "userLists": [],
+ * // "vendorTypes": [],
+ * // "verticals": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.pretargetingConfig.insert
* @memberOf! ()
*
@@ -2248,6 +3251,47 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.pretargetingConfig.list
* @desc Retrieves a list of the authenticated user's pretargeting configurations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.pretargetingConfig.list({
+ * // The account id to get the pretargeting configs for.
+ * accountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.pretargetingConfig.list
* @memberOf! ()
*
@@ -2323,6 +3367,102 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.pretargetingConfig.patch
* @desc Updates an existing pretargeting config. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.pretargetingConfig.patch({
+ * // The account id to update the pretargeting config for.
+ * accountId: 'placeholder-value',
+ * // The specific id of the configuration to update.
+ * configId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "billingId": "my_billingId",
+ * // "configId": "my_configId",
+ * // "configName": "my_configName",
+ * // "creativeType": [],
+ * // "dimensions": [],
+ * // "excludedContentLabels": [],
+ * // "excludedGeoCriteriaIds": [],
+ * // "excludedPlacements": [],
+ * // "excludedUserLists": [],
+ * // "excludedVerticals": [],
+ * // "geoCriteriaIds": [],
+ * // "isActive": false,
+ * // "kind": "my_kind",
+ * // "languages": [],
+ * // "maximumQps": "my_maximumQps",
+ * // "mobileCarriers": [],
+ * // "mobileDevices": [],
+ * // "mobileOperatingSystemVersions": [],
+ * // "placements": [],
+ * // "platforms": [],
+ * // "supportedCreativeAttributes": [],
+ * // "userLists": [],
+ * // "vendorTypes": [],
+ * // "verticals": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billingId": "my_billingId",
+ * // "configId": "my_configId",
+ * // "configName": "my_configName",
+ * // "creativeType": [],
+ * // "dimensions": [],
+ * // "excludedContentLabels": [],
+ * // "excludedGeoCriteriaIds": [],
+ * // "excludedPlacements": [],
+ * // "excludedUserLists": [],
+ * // "excludedVerticals": [],
+ * // "geoCriteriaIds": [],
+ * // "isActive": false,
+ * // "kind": "my_kind",
+ * // "languages": [],
+ * // "maximumQps": "my_maximumQps",
+ * // "mobileCarriers": [],
+ * // "mobileDevices": [],
+ * // "mobileOperatingSystemVersions": [],
+ * // "placements": [],
+ * // "platforms": [],
+ * // "supportedCreativeAttributes": [],
+ * // "userLists": [],
+ * // "vendorTypes": [],
+ * // "verticals": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.pretargetingConfig.patch
* @memberOf! ()
*
@@ -2399,6 +3539,102 @@ export namespace adexchangebuyer_v1_3 {
/**
* adexchangebuyer.pretargetingConfig.update
* @desc Updates an existing pretargeting config.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.pretargetingConfig.update({
+ * // The account id to update the pretargeting config for.
+ * accountId: 'placeholder-value',
+ * // The specific id of the configuration to update.
+ * configId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "billingId": "my_billingId",
+ * // "configId": "my_configId",
+ * // "configName": "my_configName",
+ * // "creativeType": [],
+ * // "dimensions": [],
+ * // "excludedContentLabels": [],
+ * // "excludedGeoCriteriaIds": [],
+ * // "excludedPlacements": [],
+ * // "excludedUserLists": [],
+ * // "excludedVerticals": [],
+ * // "geoCriteriaIds": [],
+ * // "isActive": false,
+ * // "kind": "my_kind",
+ * // "languages": [],
+ * // "maximumQps": "my_maximumQps",
+ * // "mobileCarriers": [],
+ * // "mobileDevices": [],
+ * // "mobileOperatingSystemVersions": [],
+ * // "placements": [],
+ * // "platforms": [],
+ * // "supportedCreativeAttributes": [],
+ * // "userLists": [],
+ * // "vendorTypes": [],
+ * // "verticals": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billingId": "my_billingId",
+ * // "configId": "my_configId",
+ * // "configName": "my_configName",
+ * // "creativeType": [],
+ * // "dimensions": [],
+ * // "excludedContentLabels": [],
+ * // "excludedGeoCriteriaIds": [],
+ * // "excludedPlacements": [],
+ * // "excludedUserLists": [],
+ * // "excludedVerticals": [],
+ * // "geoCriteriaIds": [],
+ * // "isActive": false,
+ * // "kind": "my_kind",
+ * // "languages": [],
+ * // "maximumQps": "my_maximumQps",
+ * // "mobileCarriers": [],
+ * // "mobileDevices": [],
+ * // "mobileOperatingSystemVersions": [],
+ * // "placements": [],
+ * // "platforms": [],
+ * // "supportedCreativeAttributes": [],
+ * // "userLists": [],
+ * // "vendorTypes": [],
+ * // "verticals": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.pretargetingConfig.update
* @memberOf! ()
*
diff --git a/src/apis/adexchangebuyer/v1.4.ts b/src/apis/adexchangebuyer/v1.4.ts
index a3a2862ad62..9efc91a41f1 100644
--- a/src/apis/adexchangebuyer/v1.4.ts
+++ b/src/apis/adexchangebuyer/v1.4.ts
@@ -1632,6 +1632,54 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.accounts.get
* @desc Gets one account by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.accounts.get({
+ * // The account id
+ * id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "applyPretargetingToNonGuaranteedDeals": false,
+ * // "bidderLocation": [],
+ * // "cookieMatchingNid": "my_cookieMatchingNid",
+ * // "cookieMatchingUrl": "my_cookieMatchingUrl",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "maximumActiveCreatives": 0,
+ * // "maximumTotalQps": 0,
+ * // "numberActiveCreatives": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.accounts.get
* @memberOf! ()
*
@@ -1703,6 +1751,44 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.accounts.list
* @desc Retrieves the authenticated user's list of accounts.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.accounts.list({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.accounts.list
* @memberOf! ()
*
@@ -1775,6 +1861,72 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.accounts.patch
* @desc Updates an existing account. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.accounts.patch({
+ * // Confirmation for erasing bidder and cookie matching urls.
+ * confirmUnsafeAccountChange: 'placeholder-value',
+ * // The account id
+ * id: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "applyPretargetingToNonGuaranteedDeals": false,
+ * // "bidderLocation": [],
+ * // "cookieMatchingNid": "my_cookieMatchingNid",
+ * // "cookieMatchingUrl": "my_cookieMatchingUrl",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "maximumActiveCreatives": 0,
+ * // "maximumTotalQps": 0,
+ * // "numberActiveCreatives": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "applyPretargetingToNonGuaranteedDeals": false,
+ * // "bidderLocation": [],
+ * // "cookieMatchingNid": "my_cookieMatchingNid",
+ * // "cookieMatchingUrl": "my_cookieMatchingUrl",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "maximumActiveCreatives": 0,
+ * // "maximumTotalQps": 0,
+ * // "numberActiveCreatives": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.accounts.patch
* @memberOf! ()
*
@@ -1848,6 +2000,72 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.accounts.update
* @desc Updates an existing account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.accounts.update({
+ * // Confirmation for erasing bidder and cookie matching urls.
+ * confirmUnsafeAccountChange: 'placeholder-value',
+ * // The account id
+ * id: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "applyPretargetingToNonGuaranteedDeals": false,
+ * // "bidderLocation": [],
+ * // "cookieMatchingNid": "my_cookieMatchingNid",
+ * // "cookieMatchingUrl": "my_cookieMatchingUrl",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "maximumActiveCreatives": 0,
+ * // "maximumTotalQps": 0,
+ * // "numberActiveCreatives": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "applyPretargetingToNonGuaranteedDeals": false,
+ * // "bidderLocation": [],
+ * // "cookieMatchingNid": "my_cookieMatchingNid",
+ * // "cookieMatchingUrl": "my_cookieMatchingUrl",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "maximumActiveCreatives": 0,
+ * // "maximumTotalQps": 0,
+ * // "numberActiveCreatives": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.accounts.update
* @memberOf! ()
*
@@ -1986,6 +2204,49 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.billingInfo.get
* @desc Returns the billing information for one account specified by account ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.billingInfo.get({
+ * // The account id.
+ * accountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": 0,
+ * // "accountName": "my_accountName",
+ * // "billingId": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.billingInfo.get
* @memberOf! ()
*
@@ -2058,6 +2319,44 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.billingInfo.list
* @desc Retrieves a list of billing information for all accounts of the authenticated user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.billingInfo.list({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.billingInfo.list
* @memberOf! ()
*
@@ -2155,6 +2454,53 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.budget.get
* @desc Returns the budget information for the adgroup specified by the accountId and billingId.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.budget.get({
+ * // The account id to get the budget information for.
+ * accountId: 'placeholder-value',
+ * // The billing id to get the budget information for.
+ * billingId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "billingId": "my_billingId",
+ * // "budgetAmount": "my_budgetAmount",
+ * // "currencyCode": "my_currencyCode",
+ * // "id": "my_id",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.budget.get
* @memberOf! ()
*
@@ -2227,6 +2573,66 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.budget.patch
* @desc Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.budget.patch({
+ * // The account id associated with the budget being updated.
+ * accountId: 'placeholder-value',
+ * // The billing id associated with the budget being updated.
+ * billingId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "billingId": "my_billingId",
+ * // "budgetAmount": "my_budgetAmount",
+ * // "currencyCode": "my_currencyCode",
+ * // "id": "my_id",
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "billingId": "my_billingId",
+ * // "budgetAmount": "my_budgetAmount",
+ * // "currencyCode": "my_currencyCode",
+ * // "id": "my_id",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.budget.patch
* @memberOf! ()
*
@@ -2300,6 +2706,66 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.budget.update
* @desc Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.budget.update({
+ * // The account id associated with the budget being updated.
+ * accountId: 'placeholder-value',
+ * // The billing id associated with the budget being updated.
+ * billingId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "billingId": "my_billingId",
+ * // "budgetAmount": "my_budgetAmount",
+ * // "currencyCode": "my_currencyCode",
+ * // "id": "my_id",
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "billingId": "my_billingId",
+ * // "budgetAmount": "my_budgetAmount",
+ * // "currencyCode": "my_currencyCode",
+ * // "id": "my_id",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.budget.update
* @memberOf! ()
*
@@ -2436,6 +2902,45 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.creatives.addDeal
* @desc Add a deal id association for the creative.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.creatives.addDeal({
+ * // The id for the account that will serve this creative.
+ * accountId: 'placeholder-value',
+ * // The buyer-specific id for this creative.
+ * buyerCreativeId: 'placeholder-value',
+ * // The id of the deal id to associate with this creative.
+ * dealId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.creatives.addDeal
* @memberOf! ()
*
@@ -2510,6 +3015,78 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.creatives.get
* @desc Gets the status for a single creative. A creative will be available 30-40 minutes after submission.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.creatives.get({
+ * // The id for the account that will serve this creative.
+ * accountId: 'placeholder-value',
+ * // The buyer-specific id for this creative.
+ * buyerCreativeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "HTMLSnippet": "my_HTMLSnippet",
+ * // "accountId": 0,
+ * // "adChoicesDestinationUrl": "my_adChoicesDestinationUrl",
+ * // "adTechnologyProviders": {},
+ * // "advertiserId": [],
+ * // "advertiserName": "my_advertiserName",
+ * // "agencyId": "my_agencyId",
+ * // "apiUploadTimestamp": "my_apiUploadTimestamp",
+ * // "attribute": [],
+ * // "buyerCreativeId": "my_buyerCreativeId",
+ * // "clickThroughUrl": [],
+ * // "corrections": [],
+ * // "creativeStatusIdentityType": "my_creativeStatusIdentityType",
+ * // "dealsStatus": "my_dealsStatus",
+ * // "detectedDomains": [],
+ * // "filteringReasons": {},
+ * // "height": 0,
+ * // "impressionTrackingUrl": [],
+ * // "kind": "my_kind",
+ * // "languages": [],
+ * // "nativeAd": {},
+ * // "openAuctionStatus": "my_openAuctionStatus",
+ * // "productCategories": [],
+ * // "restrictedCategories": [],
+ * // "sensitiveCategories": [],
+ * // "servingRestrictions": [],
+ * // "vendorType": [],
+ * // "version": 0,
+ * // "videoURL": "my_videoURL",
+ * // "videoVastXML": "my_videoVastXML",
+ * // "width": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.creatives.get
* @memberOf! ()
*
@@ -2582,6 +3159,111 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.creatives.insert
* @desc Submit a new creative.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.creatives.insert({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "HTMLSnippet": "my_HTMLSnippet",
+ * // "accountId": 0,
+ * // "adChoicesDestinationUrl": "my_adChoicesDestinationUrl",
+ * // "adTechnologyProviders": {},
+ * // "advertiserId": [],
+ * // "advertiserName": "my_advertiserName",
+ * // "agencyId": "my_agencyId",
+ * // "apiUploadTimestamp": "my_apiUploadTimestamp",
+ * // "attribute": [],
+ * // "buyerCreativeId": "my_buyerCreativeId",
+ * // "clickThroughUrl": [],
+ * // "corrections": [],
+ * // "creativeStatusIdentityType": "my_creativeStatusIdentityType",
+ * // "dealsStatus": "my_dealsStatus",
+ * // "detectedDomains": [],
+ * // "filteringReasons": {},
+ * // "height": 0,
+ * // "impressionTrackingUrl": [],
+ * // "kind": "my_kind",
+ * // "languages": [],
+ * // "nativeAd": {},
+ * // "openAuctionStatus": "my_openAuctionStatus",
+ * // "productCategories": [],
+ * // "restrictedCategories": [],
+ * // "sensitiveCategories": [],
+ * // "servingRestrictions": [],
+ * // "vendorType": [],
+ * // "version": 0,
+ * // "videoURL": "my_videoURL",
+ * // "videoVastXML": "my_videoVastXML",
+ * // "width": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "HTMLSnippet": "my_HTMLSnippet",
+ * // "accountId": 0,
+ * // "adChoicesDestinationUrl": "my_adChoicesDestinationUrl",
+ * // "adTechnologyProviders": {},
+ * // "advertiserId": [],
+ * // "advertiserName": "my_advertiserName",
+ * // "agencyId": "my_agencyId",
+ * // "apiUploadTimestamp": "my_apiUploadTimestamp",
+ * // "attribute": [],
+ * // "buyerCreativeId": "my_buyerCreativeId",
+ * // "clickThroughUrl": [],
+ * // "corrections": [],
+ * // "creativeStatusIdentityType": "my_creativeStatusIdentityType",
+ * // "dealsStatus": "my_dealsStatus",
+ * // "detectedDomains": [],
+ * // "filteringReasons": {},
+ * // "height": 0,
+ * // "impressionTrackingUrl": [],
+ * // "kind": "my_kind",
+ * // "languages": [],
+ * // "nativeAd": {},
+ * // "openAuctionStatus": "my_openAuctionStatus",
+ * // "productCategories": [],
+ * // "restrictedCategories": [],
+ * // "sensitiveCategories": [],
+ * // "servingRestrictions": [],
+ * // "vendorType": [],
+ * // "version": 0,
+ * // "videoURL": "my_videoURL",
+ * // "videoVastXML": "my_videoVastXML",
+ * // "width": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.creatives.insert
* @memberOf! ()
*
@@ -2653,6 +3335,58 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.creatives.list
* @desc Retrieves a list of the authenticated user's active creatives. A creative will be available 30-40 minutes after submission.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.creatives.list({
+ * // When specified, only creatives for the given account ids are returned.
+ * accountId: 'placeholder-value',
+ * // When specified, only creatives for the given buyer creative ids are returned.
+ * buyerCreativeId: 'placeholder-value',
+ * // When specified, only creatives having the given deals status are returned.
+ * dealsStatusFilter: 'placeholder-value',
+ * // Maximum number of entries returned on one result page. If not set, the default is 100. Optional.
+ * maxResults: 'placeholder-value',
+ * // When specified, only creatives having the given open auction status are returned.
+ * openAuctionStatusFilter: 'placeholder-value',
+ * // A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. Optional.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.creatives.list
* @memberOf! ()
*
@@ -2731,6 +3465,49 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.creatives.listDeals
* @desc Lists the external deal ids associated with the creative.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.creatives.listDeals({
+ * // The id for the account that will serve this creative.
+ * accountId: 'placeholder-value',
+ * // The buyer-specific id for this creative.
+ * buyerCreativeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dealStatuses": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.creatives.listDeals
* @memberOf! ()
*
@@ -2806,6 +3583,45 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.creatives.removeDeal
* @desc Remove a deal id associated with the creative.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.creatives.removeDeal({
+ * // The id for the account that will serve this creative.
+ * accountId: 'placeholder-value',
+ * // The buyer-specific id for this creative.
+ * buyerCreativeId: 'placeholder-value',
+ * // The id of the deal id to disassociate with this creative.
+ * dealId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.creatives.removeDeal
* @memberOf! ()
*
@@ -3001,6 +3817,57 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.marketplacedeals.delete
* @desc Delete the specified deals from the proposal
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.marketplacedeals.delete({
+ * // The proposalId to delete deals from.
+ * proposalId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "dealIds": [],
+ * // "proposalRevisionNumber": "my_proposalRevisionNumber",
+ * // "updateAction": "my_updateAction"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deals": [],
+ * // "proposalRevisionNumber": "my_proposalRevisionNumber"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.marketplacedeals.delete
* @memberOf! ()
*
@@ -3080,6 +3947,57 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.marketplacedeals.insert
* @desc Add new deals for the specified proposal
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.marketplacedeals.insert({
+ * // proposalId for which deals need to be added.
+ * proposalId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deals": [],
+ * // "proposalRevisionNumber": "my_proposalRevisionNumber",
+ * // "updateAction": "my_updateAction"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deals": [],
+ * // "proposalRevisionNumber": "my_proposalRevisionNumber"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.marketplacedeals.insert
* @memberOf! ()
*
@@ -3157,6 +4075,48 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.marketplacedeals.list
* @desc List all the deals for a given proposal
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.marketplacedeals.list({
+ * // Query string to retrieve specific deals.
+ * pqlQuery: 'placeholder-value',
+ * // The proposalId to get deals for. To search across all proposals specify order_id = '-' as part of the URL.
+ * proposalId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deals": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.marketplacedeals.list
* @memberOf! ()
*
@@ -3233,6 +4193,58 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.marketplacedeals.update
* @desc Replaces all the deals in the proposal with the passed in deals
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.marketplacedeals.update({
+ * // The proposalId to edit deals on.
+ * proposalId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deals": [],
+ * // "proposal": {},
+ * // "proposalRevisionNumber": "my_proposalRevisionNumber",
+ * // "updateAction": "my_updateAction"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deals": [],
+ * // "orderRevisionNumber": "my_orderRevisionNumber"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.marketplacedeals.update
* @memberOf! ()
*
@@ -3390,6 +4402,54 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.marketplacenotes.insert
* @desc Add notes to the proposal
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.marketplacenotes.insert({
+ * // The proposalId to add notes for.
+ * proposalId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "notes": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "notes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.marketplacenotes.insert
* @memberOf! ()
*
@@ -3467,6 +4527,48 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.marketplacenotes.list
* @desc Get all the notes associated with a proposal
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.marketplacenotes.list({
+ * // Query string to retrieve specific notes. To search the text contents of notes, please use syntax like "WHERE note.note = "foo" or "WHERE note.note LIKE "%bar%"
+ * pqlQuery: 'placeholder-value',
+ * // The proposalId to get notes for. To search across all proposals specify order_id = '-' as part of the URL.
+ * proposalId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "notes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.marketplacenotes.list
* @memberOf! ()
*
@@ -3584,6 +4686,52 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.marketplaceprivateauction.updateproposal
* @desc Update a given private auction proposal
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.marketplaceprivateauction.updateproposal({
+ * // The private auction id to be updated.
+ * privateAuctionId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "externalDealId": "my_externalDealId",
+ * // "note": {},
+ * // "proposalRevisionNumber": "my_proposalRevisionNumber",
+ * // "updateAction": "my_updateAction"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.marketplaceprivateauction.updateproposal
* @memberOf! ()
*
@@ -3682,6 +4830,55 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.performanceReport.list
* @desc Retrieves the authenticated user's list of performance metrics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.performanceReport.list({
+ * // The account id to get the reports.
+ * accountId: 'placeholder-value',
+ * // The end time of the report in ISO 8601 timestamp format using UTC.
+ * endDateTime: 'placeholder-value',
+ * // Maximum number of entries returned on one result page. If not set, the default is 100. Optional.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through performance reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. Optional.
+ * pageToken: 'placeholder-value',
+ * // The start time of the report in ISO 8601 timestamp format using UTC.
+ * startDateTime: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "performanceReport": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.performanceReport.list
* @memberOf! ()
*
@@ -3798,6 +4995,43 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.pretargetingConfig.delete
* @desc Deletes an existing pretargeting config.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.pretargetingConfig.delete({
+ * // The account id to delete the pretargeting config for.
+ * accountId: 'placeholder-value',
+ * // The specific id of the configuration to delete.
+ * configId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.pretargetingConfig.delete
* @memberOf! ()
*
@@ -3871,6 +5105,74 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.pretargetingConfig.get
* @desc Gets a specific pretargeting configuration
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.pretargetingConfig.get({
+ * // The account id to get the pretargeting config for.
+ * accountId: 'placeholder-value',
+ * // The specific id of the configuration to retrieve.
+ * configId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billingId": "my_billingId",
+ * // "configId": "my_configId",
+ * // "configName": "my_configName",
+ * // "creativeType": [],
+ * // "dimensions": [],
+ * // "excludedContentLabels": [],
+ * // "excludedGeoCriteriaIds": [],
+ * // "excludedPlacements": [],
+ * // "excludedUserLists": [],
+ * // "excludedVerticals": [],
+ * // "geoCriteriaIds": [],
+ * // "isActive": false,
+ * // "kind": "my_kind",
+ * // "languages": [],
+ * // "maximumQps": "my_maximumQps",
+ * // "minimumViewabilityDecile": 0,
+ * // "mobileCarriers": [],
+ * // "mobileDevices": [],
+ * // "mobileOperatingSystemVersions": [],
+ * // "placements": [],
+ * // "platforms": [],
+ * // "supportedCreativeAttributes": [],
+ * // "userIdentifierDataRequired": [],
+ * // "userLists": [],
+ * // "vendorTypes": [],
+ * // "verticals": [],
+ * // "videoPlayerSizes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.pretargetingConfig.get
* @memberOf! ()
*
@@ -3946,6 +5248,106 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.pretargetingConfig.insert
* @desc Inserts a new pretargeting configuration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.pretargetingConfig.insert({
+ * // The account id to insert the pretargeting config for.
+ * accountId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "billingId": "my_billingId",
+ * // "configId": "my_configId",
+ * // "configName": "my_configName",
+ * // "creativeType": [],
+ * // "dimensions": [],
+ * // "excludedContentLabels": [],
+ * // "excludedGeoCriteriaIds": [],
+ * // "excludedPlacements": [],
+ * // "excludedUserLists": [],
+ * // "excludedVerticals": [],
+ * // "geoCriteriaIds": [],
+ * // "isActive": false,
+ * // "kind": "my_kind",
+ * // "languages": [],
+ * // "maximumQps": "my_maximumQps",
+ * // "minimumViewabilityDecile": 0,
+ * // "mobileCarriers": [],
+ * // "mobileDevices": [],
+ * // "mobileOperatingSystemVersions": [],
+ * // "placements": [],
+ * // "platforms": [],
+ * // "supportedCreativeAttributes": [],
+ * // "userIdentifierDataRequired": [],
+ * // "userLists": [],
+ * // "vendorTypes": [],
+ * // "verticals": [],
+ * // "videoPlayerSizes": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billingId": "my_billingId",
+ * // "configId": "my_configId",
+ * // "configName": "my_configName",
+ * // "creativeType": [],
+ * // "dimensions": [],
+ * // "excludedContentLabels": [],
+ * // "excludedGeoCriteriaIds": [],
+ * // "excludedPlacements": [],
+ * // "excludedUserLists": [],
+ * // "excludedVerticals": [],
+ * // "geoCriteriaIds": [],
+ * // "isActive": false,
+ * // "kind": "my_kind",
+ * // "languages": [],
+ * // "maximumQps": "my_maximumQps",
+ * // "minimumViewabilityDecile": 0,
+ * // "mobileCarriers": [],
+ * // "mobileDevices": [],
+ * // "mobileOperatingSystemVersions": [],
+ * // "placements": [],
+ * // "platforms": [],
+ * // "supportedCreativeAttributes": [],
+ * // "userIdentifierDataRequired": [],
+ * // "userLists": [],
+ * // "vendorTypes": [],
+ * // "verticals": [],
+ * // "videoPlayerSizes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.pretargetingConfig.insert
* @memberOf! ()
*
@@ -4020,6 +5422,47 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.pretargetingConfig.list
* @desc Retrieves a list of the authenticated user's pretargeting configurations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.pretargetingConfig.list({
+ * // The account id to get the pretargeting configs for.
+ * accountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.pretargetingConfig.list
* @memberOf! ()
*
@@ -4095,6 +5538,108 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.pretargetingConfig.patch
* @desc Updates an existing pretargeting config. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.pretargetingConfig.patch({
+ * // The account id to update the pretargeting config for.
+ * accountId: 'placeholder-value',
+ * // The specific id of the configuration to update.
+ * configId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "billingId": "my_billingId",
+ * // "configId": "my_configId",
+ * // "configName": "my_configName",
+ * // "creativeType": [],
+ * // "dimensions": [],
+ * // "excludedContentLabels": [],
+ * // "excludedGeoCriteriaIds": [],
+ * // "excludedPlacements": [],
+ * // "excludedUserLists": [],
+ * // "excludedVerticals": [],
+ * // "geoCriteriaIds": [],
+ * // "isActive": false,
+ * // "kind": "my_kind",
+ * // "languages": [],
+ * // "maximumQps": "my_maximumQps",
+ * // "minimumViewabilityDecile": 0,
+ * // "mobileCarriers": [],
+ * // "mobileDevices": [],
+ * // "mobileOperatingSystemVersions": [],
+ * // "placements": [],
+ * // "platforms": [],
+ * // "supportedCreativeAttributes": [],
+ * // "userIdentifierDataRequired": [],
+ * // "userLists": [],
+ * // "vendorTypes": [],
+ * // "verticals": [],
+ * // "videoPlayerSizes": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billingId": "my_billingId",
+ * // "configId": "my_configId",
+ * // "configName": "my_configName",
+ * // "creativeType": [],
+ * // "dimensions": [],
+ * // "excludedContentLabels": [],
+ * // "excludedGeoCriteriaIds": [],
+ * // "excludedPlacements": [],
+ * // "excludedUserLists": [],
+ * // "excludedVerticals": [],
+ * // "geoCriteriaIds": [],
+ * // "isActive": false,
+ * // "kind": "my_kind",
+ * // "languages": [],
+ * // "maximumQps": "my_maximumQps",
+ * // "minimumViewabilityDecile": 0,
+ * // "mobileCarriers": [],
+ * // "mobileDevices": [],
+ * // "mobileOperatingSystemVersions": [],
+ * // "placements": [],
+ * // "platforms": [],
+ * // "supportedCreativeAttributes": [],
+ * // "userIdentifierDataRequired": [],
+ * // "userLists": [],
+ * // "vendorTypes": [],
+ * // "verticals": [],
+ * // "videoPlayerSizes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.pretargetingConfig.patch
* @memberOf! ()
*
@@ -4171,6 +5716,108 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.pretargetingConfig.update
* @desc Updates an existing pretargeting config.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.pretargetingConfig.update({
+ * // The account id to update the pretargeting config for.
+ * accountId: 'placeholder-value',
+ * // The specific id of the configuration to update.
+ * configId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "billingId": "my_billingId",
+ * // "configId": "my_configId",
+ * // "configName": "my_configName",
+ * // "creativeType": [],
+ * // "dimensions": [],
+ * // "excludedContentLabels": [],
+ * // "excludedGeoCriteriaIds": [],
+ * // "excludedPlacements": [],
+ * // "excludedUserLists": [],
+ * // "excludedVerticals": [],
+ * // "geoCriteriaIds": [],
+ * // "isActive": false,
+ * // "kind": "my_kind",
+ * // "languages": [],
+ * // "maximumQps": "my_maximumQps",
+ * // "minimumViewabilityDecile": 0,
+ * // "mobileCarriers": [],
+ * // "mobileDevices": [],
+ * // "mobileOperatingSystemVersions": [],
+ * // "placements": [],
+ * // "platforms": [],
+ * // "supportedCreativeAttributes": [],
+ * // "userIdentifierDataRequired": [],
+ * // "userLists": [],
+ * // "vendorTypes": [],
+ * // "verticals": [],
+ * // "videoPlayerSizes": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billingId": "my_billingId",
+ * // "configId": "my_configId",
+ * // "configName": "my_configName",
+ * // "creativeType": [],
+ * // "dimensions": [],
+ * // "excludedContentLabels": [],
+ * // "excludedGeoCriteriaIds": [],
+ * // "excludedPlacements": [],
+ * // "excludedUserLists": [],
+ * // "excludedVerticals": [],
+ * // "geoCriteriaIds": [],
+ * // "isActive": false,
+ * // "kind": "my_kind",
+ * // "languages": [],
+ * // "maximumQps": "my_maximumQps",
+ * // "minimumViewabilityDecile": 0,
+ * // "mobileCarriers": [],
+ * // "mobileDevices": [],
+ * // "mobileOperatingSystemVersions": [],
+ * // "placements": [],
+ * // "platforms": [],
+ * // "supportedCreativeAttributes": [],
+ * // "userIdentifierDataRequired": [],
+ * // "userLists": [],
+ * // "vendorTypes": [],
+ * // "verticals": [],
+ * // "videoPlayerSizes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.pretargetingConfig.update
* @memberOf! ()
*
@@ -4358,6 +6005,72 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.products.get
* @desc Gets the requested product by id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.products.get({
+ * // The id for the product to get the head revision for.
+ * productId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billedBuyer": {},
+ * // "buyer": {},
+ * // "creationTimeMs": "my_creationTimeMs",
+ * // "creatorContacts": [],
+ * // "creatorRole": "my_creatorRole",
+ * // "deliveryControl": {},
+ * // "flightEndTimeMs": "my_flightEndTimeMs",
+ * // "flightStartTimeMs": "my_flightStartTimeMs",
+ * // "hasCreatorSignedOff": false,
+ * // "inventorySource": "my_inventorySource",
+ * // "kind": "my_kind",
+ * // "labels": [],
+ * // "lastUpdateTimeMs": "my_lastUpdateTimeMs",
+ * // "legacyOfferId": "my_legacyOfferId",
+ * // "marketplacePublisherProfileId": "my_marketplacePublisherProfileId",
+ * // "name": "my_name",
+ * // "privateAuctionId": "my_privateAuctionId",
+ * // "productId": "my_productId",
+ * // "publisherProfileId": "my_publisherProfileId",
+ * // "publisherProvidedForecast": {},
+ * // "revisionNumber": "my_revisionNumber",
+ * // "seller": {},
+ * // "sharedTargetings": [],
+ * // "state": "my_state",
+ * // "syndicationProduct": "my_syndicationProduct",
+ * // "terms": {},
+ * // "webPropertyCode": "my_webPropertyCode"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.products.get
* @memberOf! ()
*
@@ -4428,6 +6141,46 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.products.search
* @desc Gets the requested product.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.products.search({
+ * // The pql query used to query for products.
+ * pqlQuery: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "products": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.products.search
* @memberOf! ()
*
@@ -4531,6 +6284,68 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.proposals.get
* @desc Get a proposal given its id
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.proposals.get({
+ * // Id of the proposal to retrieve.
+ * proposalId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billedBuyer": {},
+ * // "buyer": {},
+ * // "buyerContacts": [],
+ * // "buyerPrivateData": {},
+ * // "dbmAdvertiserIds": [],
+ * // "hasBuyerSignedOff": false,
+ * // "hasSellerSignedOff": false,
+ * // "inventorySource": "my_inventorySource",
+ * // "isRenegotiating": false,
+ * // "isSetupComplete": false,
+ * // "kind": "my_kind",
+ * // "labels": [],
+ * // "lastUpdaterOrCommentorRole": "my_lastUpdaterOrCommentorRole",
+ * // "name": "my_name",
+ * // "negotiationId": "my_negotiationId",
+ * // "originatorRole": "my_originatorRole",
+ * // "privateAuctionId": "my_privateAuctionId",
+ * // "proposalId": "my_proposalId",
+ * // "proposalState": "my_proposalState",
+ * // "revisionNumber": "my_revisionNumber",
+ * // "revisionTimeMs": "my_revisionTimeMs",
+ * // "seller": {},
+ * // "sellerContacts": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.proposals.get
* @memberOf! ()
*
@@ -4601,6 +6416,52 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.proposals.insert
* @desc Create the given list of proposals
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.proposals.insert({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "proposals": [],
+ * // "webPropertyCode": "my_webPropertyCode"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "proposals": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.proposals.insert
* @memberOf! ()
*
@@ -4676,6 +6537,102 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.proposals.patch
* @desc Update the given proposal. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.proposals.patch({
+ * // The proposal id to update.
+ * proposalId: 'placeholder-value',
+ * // The last known revision number to update. If the head revision in the marketplace database has since changed, an error will be thrown. The caller should then fetch the latest proposal at head revision and retry the update at that revision.
+ * revisionNumber: 'placeholder-value',
+ * // The proposed action to take on the proposal. This field is required and it must be set when updating a proposal.
+ * updateAction: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "billedBuyer": {},
+ * // "buyer": {},
+ * // "buyerContacts": [],
+ * // "buyerPrivateData": {},
+ * // "dbmAdvertiserIds": [],
+ * // "hasBuyerSignedOff": false,
+ * // "hasSellerSignedOff": false,
+ * // "inventorySource": "my_inventorySource",
+ * // "isRenegotiating": false,
+ * // "isSetupComplete": false,
+ * // "kind": "my_kind",
+ * // "labels": [],
+ * // "lastUpdaterOrCommentorRole": "my_lastUpdaterOrCommentorRole",
+ * // "name": "my_name",
+ * // "negotiationId": "my_negotiationId",
+ * // "originatorRole": "my_originatorRole",
+ * // "privateAuctionId": "my_privateAuctionId",
+ * // "proposalId": "my_proposalId",
+ * // "proposalState": "my_proposalState",
+ * // "revisionNumber": "my_revisionNumber",
+ * // "revisionTimeMs": "my_revisionTimeMs",
+ * // "seller": {},
+ * // "sellerContacts": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billedBuyer": {},
+ * // "buyer": {},
+ * // "buyerContacts": [],
+ * // "buyerPrivateData": {},
+ * // "dbmAdvertiserIds": [],
+ * // "hasBuyerSignedOff": false,
+ * // "hasSellerSignedOff": false,
+ * // "inventorySource": "my_inventorySource",
+ * // "isRenegotiating": false,
+ * // "isSetupComplete": false,
+ * // "kind": "my_kind",
+ * // "labels": [],
+ * // "lastUpdaterOrCommentorRole": "my_lastUpdaterOrCommentorRole",
+ * // "name": "my_name",
+ * // "negotiationId": "my_negotiationId",
+ * // "originatorRole": "my_originatorRole",
+ * // "privateAuctionId": "my_privateAuctionId",
+ * // "proposalId": "my_proposalId",
+ * // "proposalState": "my_proposalState",
+ * // "revisionNumber": "my_revisionNumber",
+ * // "revisionTimeMs": "my_revisionTimeMs",
+ * // "seller": {},
+ * // "sellerContacts": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.proposals.patch
* @memberOf! ()
*
@@ -4750,6 +6707,46 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.proposals.search
* @desc Search for proposals using pql query
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.proposals.search({
+ * // Query string to retrieve specific proposals.
+ * pqlQuery: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "proposals": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.proposals.search
* @memberOf! ()
*
@@ -4823,6 +6820,41 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.proposals.setupcomplete
* @desc Update the given proposal to indicate that setup has been completed.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.proposals.setupcomplete({
+ * // The proposal id for which the setup is complete
+ * proposalId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.proposals.setupcomplete
* @memberOf! ()
*
@@ -4895,6 +6927,102 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.proposals.update
* @desc Update the given proposal
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.proposals.update({
+ * // The proposal id to update.
+ * proposalId: 'placeholder-value',
+ * // The last known revision number to update. If the head revision in the marketplace database has since changed, an error will be thrown. The caller should then fetch the latest proposal at head revision and retry the update at that revision.
+ * revisionNumber: 'placeholder-value',
+ * // The proposed action to take on the proposal. This field is required and it must be set when updating a proposal.
+ * updateAction: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "billedBuyer": {},
+ * // "buyer": {},
+ * // "buyerContacts": [],
+ * // "buyerPrivateData": {},
+ * // "dbmAdvertiserIds": [],
+ * // "hasBuyerSignedOff": false,
+ * // "hasSellerSignedOff": false,
+ * // "inventorySource": "my_inventorySource",
+ * // "isRenegotiating": false,
+ * // "isSetupComplete": false,
+ * // "kind": "my_kind",
+ * // "labels": [],
+ * // "lastUpdaterOrCommentorRole": "my_lastUpdaterOrCommentorRole",
+ * // "name": "my_name",
+ * // "negotiationId": "my_negotiationId",
+ * // "originatorRole": "my_originatorRole",
+ * // "privateAuctionId": "my_privateAuctionId",
+ * // "proposalId": "my_proposalId",
+ * // "proposalState": "my_proposalState",
+ * // "revisionNumber": "my_revisionNumber",
+ * // "revisionTimeMs": "my_revisionTimeMs",
+ * // "seller": {},
+ * // "sellerContacts": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billedBuyer": {},
+ * // "buyer": {},
+ * // "buyerContacts": [],
+ * // "buyerPrivateData": {},
+ * // "dbmAdvertiserIds": [],
+ * // "hasBuyerSignedOff": false,
+ * // "hasSellerSignedOff": false,
+ * // "inventorySource": "my_inventorySource",
+ * // "isRenegotiating": false,
+ * // "isSetupComplete": false,
+ * // "kind": "my_kind",
+ * // "labels": [],
+ * // "lastUpdaterOrCommentorRole": "my_lastUpdaterOrCommentorRole",
+ * // "name": "my_name",
+ * // "negotiationId": "my_negotiationId",
+ * // "originatorRole": "my_originatorRole",
+ * // "privateAuctionId": "my_privateAuctionId",
+ * // "proposalId": "my_proposalId",
+ * // "proposalState": "my_proposalState",
+ * // "revisionNumber": "my_revisionNumber",
+ * // "revisionTimeMs": "my_revisionTimeMs",
+ * // "seller": {},
+ * // "sellerContacts": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.proposals.update
* @memberOf! ()
*
@@ -5070,6 +7198,46 @@ export namespace adexchangebuyer_v1_4 {
/**
* adexchangebuyer.pubprofiles.list
* @desc Gets the requested publisher profile(s) by publisher accountId.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer = google.adexchangebuyer('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer.pubprofiles.list({
+ * // The accountId of the publisher to get profiles for.
+ * accountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "profiles": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer.pubprofiles.list
* @memberOf! ()
*
diff --git a/src/apis/adexchangebuyer2/v2beta1.ts b/src/apis/adexchangebuyer2/v2beta1.ts
index 456d05212cd..99b158dc2b4 100644
--- a/src/apis/adexchangebuyer2/v2beta1.ts
+++ b/src/apis/adexchangebuyer2/v2beta1.ts
@@ -2130,6 +2130,71 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.clients.create
* @desc Creates a new client buyer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.clients.create({
+ * // Unique numerical account ID for the buyer of which the client buyer
+ * // is a customer; the sponsor buyer to create a client for. (required)
+ * accountId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clientAccountId": "my_clientAccountId",
+ * // "clientName": "my_clientName",
+ * // "entityId": "my_entityId",
+ * // "entityName": "my_entityName",
+ * // "entityType": "my_entityType",
+ * // "partnerClientId": "my_partnerClientId",
+ * // "role": "my_role",
+ * // "status": "my_status",
+ * // "visibleToSeller": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientAccountId": "my_clientAccountId",
+ * // "clientName": "my_clientName",
+ * // "entityId": "my_entityId",
+ * // "entityName": "my_entityName",
+ * // "entityType": "my_entityType",
+ * // "partnerClientId": "my_partnerClientId",
+ * // "role": "my_role",
+ * // "status": "my_status",
+ * // "visibleToSeller": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.clients.create
* @memberOf! ()
*
@@ -2204,6 +2269,56 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.clients.get
* @desc Gets a client buyer with a given client account ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.clients.get({
+ * // Numerical account ID of the client's sponsor buyer. (required)
+ * accountId: 'placeholder-value',
+ * // Numerical account ID of the client buyer to retrieve. (required)
+ * clientAccountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientAccountId": "my_clientAccountId",
+ * // "clientName": "my_clientName",
+ * // "entityId": "my_entityId",
+ * // "entityName": "my_entityName",
+ * // "entityType": "my_entityType",
+ * // "partnerClientId": "my_partnerClientId",
+ * // "role": "my_role",
+ * // "status": "my_status",
+ * // "visibleToSeller": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.clients.get
* @memberOf! ()
*
@@ -2278,6 +2393,61 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.clients.list
* @desc Lists all the clients for the current sponsor buyer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.clients.list({
+ * // Unique numerical account ID of the sponsor buyer to list the clients for.
+ * accountId: 'placeholder-value',
+ * // Requested page size. The server may return fewer clients than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListClientsResponse.nextPageToken
+ * // returned from the previous call to the
+ * // accounts.clients.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * // Optional unique identifier (from the standpoint of an Ad Exchange sponsor
+ * // buyer partner) of the client to return.
+ * // If specified, at most one client will be returned in the response.
+ * partnerClientId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clients": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.clients.list
* @memberOf! ()
*
@@ -2356,6 +2526,73 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.clients.update
* @desc Updates an existing client buyer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.clients.update({
+ * // Unique numerical account ID for the buyer of which the client buyer
+ * // is a customer; the sponsor buyer to update a client for. (required)
+ * accountId: 'placeholder-value',
+ * // Unique numerical account ID of the client to update. (required)
+ * clientAccountId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clientAccountId": "my_clientAccountId",
+ * // "clientName": "my_clientName",
+ * // "entityId": "my_entityId",
+ * // "entityName": "my_entityName",
+ * // "entityType": "my_entityType",
+ * // "partnerClientId": "my_partnerClientId",
+ * // "role": "my_role",
+ * // "status": "my_status",
+ * // "visibleToSeller": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientAccountId": "my_clientAccountId",
+ * // "clientName": "my_clientName",
+ * // "entityId": "my_entityId",
+ * // "entityName": "my_entityName",
+ * // "entityType": "my_entityType",
+ * // "partnerClientId": "my_partnerClientId",
+ * // "role": "my_role",
+ * // "status": "my_status",
+ * // "visibleToSeller": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.clients.update
* @memberOf! ()
*
@@ -2517,6 +2754,61 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.clients.invitations.create
* @desc Creates and sends out an email invitation to access an Ad Exchange client buyer account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.clients.invitations.create({
+ * // Numerical account ID of the client's sponsor buyer. (required)
+ * accountId: 'placeholder-value',
+ * // Numerical account ID of the client buyer that the user
+ * // should be associated with. (required)
+ * clientAccountId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clientAccountId": "my_clientAccountId",
+ * // "email": "my_email",
+ * // "invitationId": "my_invitationId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientAccountId": "my_clientAccountId",
+ * // "email": "my_email",
+ * // "invitationId": "my_invitationId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.clients.invitations.create
* @memberOf! ()
*
@@ -2596,6 +2888,53 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.clients.invitations.get
* @desc Retrieves an existing client user invitation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.clients.invitations.get({
+ * // Numerical account ID of the client's sponsor buyer. (required)
+ * accountId: 'placeholder-value',
+ * // Numerical account ID of the client buyer that the user invitation
+ * // to be retrieved is associated with. (required)
+ * clientAccountId: 'placeholder-value',
+ * // Numerical identifier of the user invitation to retrieve. (required)
+ * invitationId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientAccountId": "my_clientAccountId",
+ * // "email": "my_email",
+ * // "invitationId": "my_invitationId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.clients.invitations.get
* @memberOf! ()
*
@@ -2675,6 +3014,64 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.clients.invitations.list
* @desc Lists all the client users invitations for a client with a given account ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.clients.invitations.list({
+ * // Numerical account ID of the client's sponsor buyer. (required)
+ * accountId: 'placeholder-value',
+ * // Numerical account ID of the client buyer to list invitations for.
+ * // (required)
+ * // You must either specify a string representation of a
+ * // numerical account identifier or the `-` character
+ * // to list all the invitations for all the clients
+ * // of a given sponsor buyer.
+ * clientAccountId: 'placeholder-value',
+ * // Requested page size. Server may return fewer clients than requested.
+ * // If unspecified, server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListClientUserInvitationsResponse.nextPageToken
+ * // returned from the previous call to the
+ * // clients.invitations.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "invitations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.clients.invitations.list
* @memberOf! ()
*
@@ -2835,6 +3232,54 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.clients.users.get
* @desc Retrieves an existing client user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.clients.users.get({
+ * // Numerical account ID of the client's sponsor buyer. (required)
+ * accountId: 'placeholder-value',
+ * // Numerical account ID of the client buyer
+ * // that the user to be retrieved is associated with. (required)
+ * clientAccountId: 'placeholder-value',
+ * // Numerical identifier of the user to retrieve. (required)
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientAccountId": "my_clientAccountId",
+ * // "email": "my_email",
+ * // "status": "my_status",
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.clients.users.get
* @memberOf! ()
*
@@ -2912,6 +3357,64 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.clients.users.list
* @desc Lists all the known client users for a specified sponsor buyer account ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.clients.users.list({
+ * // Numerical account ID of the sponsor buyer of the client to list users for.
+ * // (required)
+ * accountId: 'placeholder-value',
+ * // The account ID of the client buyer to list users for. (required)
+ * // You must specify either a string representation of a
+ * // numerical account identifier or the `-` character
+ * // to list all the client users for all the clients
+ * // of a given sponsor buyer.
+ * clientAccountId: 'placeholder-value',
+ * // Requested page size. The server may return fewer clients than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListClientUsersResponse.nextPageToken
+ * // returned from the previous call to the
+ * // accounts.clients.users.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "users": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.clients.users.list
* @memberOf! ()
*
@@ -2992,6 +3495,65 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.clients.users.update
* @desc Updates an existing client user. Only the user status can be changed on update.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.clients.users.update({
+ * // Numerical account ID of the client's sponsor buyer. (required)
+ * accountId: 'placeholder-value',
+ * // Numerical account ID of the client buyer that the user to be retrieved
+ * // is associated with. (required)
+ * clientAccountId: 'placeholder-value',
+ * // Numerical identifier of the user to retrieve. (required)
+ * userId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clientAccountId": "my_clientAccountId",
+ * // "email": "my_email",
+ * // "status": "my_status",
+ * // "userId": "my_userId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientAccountId": "my_clientAccountId",
+ * // "email": "my_email",
+ * // "status": "my_status",
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.clients.users.update
* @memberOf! ()
*
@@ -3151,6 +3713,110 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.creatives.create
* @desc Creates a creative.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.creatives.create({
+ * // The account that this creative belongs to.
+ * // Can be used to filter the response of the
+ * // creatives.list
+ * // method.
+ * accountId: 'placeholder-value',
+ * // Indicates if multiple creatives can share an ID or not. Default is
+ * // NO_DUPLICATES (one ID per creative).
+ * duplicateIdMode: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adChoicesDestinationUrl": "my_adChoicesDestinationUrl",
+ * // "adTechnologyProviders": {},
+ * // "advertiserName": "my_advertiserName",
+ * // "agencyId": "my_agencyId",
+ * // "apiUpdateTime": "my_apiUpdateTime",
+ * // "attributes": [],
+ * // "clickThroughUrls": [],
+ * // "corrections": [],
+ * // "creativeId": "my_creativeId",
+ * // "dealsStatus": "my_dealsStatus",
+ * // "declaredClickThroughUrls": [],
+ * // "detectedAdvertiserIds": [],
+ * // "detectedDomains": [],
+ * // "detectedLanguages": [],
+ * // "detectedProductCategories": [],
+ * // "detectedSensitiveCategories": [],
+ * // "html": {},
+ * // "impressionTrackingUrls": [],
+ * // "native": {},
+ * // "openAuctionStatus": "my_openAuctionStatus",
+ * // "restrictedCategories": [],
+ * // "servingRestrictions": [],
+ * // "vendorIds": [],
+ * // "version": 0,
+ * // "video": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adChoicesDestinationUrl": "my_adChoicesDestinationUrl",
+ * // "adTechnologyProviders": {},
+ * // "advertiserName": "my_advertiserName",
+ * // "agencyId": "my_agencyId",
+ * // "apiUpdateTime": "my_apiUpdateTime",
+ * // "attributes": [],
+ * // "clickThroughUrls": [],
+ * // "corrections": [],
+ * // "creativeId": "my_creativeId",
+ * // "dealsStatus": "my_dealsStatus",
+ * // "declaredClickThroughUrls": [],
+ * // "detectedAdvertiserIds": [],
+ * // "detectedDomains": [],
+ * // "detectedLanguages": [],
+ * // "detectedProductCategories": [],
+ * // "detectedSensitiveCategories": [],
+ * // "html": {},
+ * // "impressionTrackingUrls": [],
+ * // "native": {},
+ * // "openAuctionStatus": "my_openAuctionStatus",
+ * // "restrictedCategories": [],
+ * // "servingRestrictions": [],
+ * // "vendorIds": [],
+ * // "version": 0,
+ * // "video": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.creatives.create
* @memberOf! ()
*
@@ -3226,6 +3892,73 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.creatives.get
* @desc Gets a creative.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.creatives.get({
+ * // The account the creative belongs to.
+ * accountId: 'placeholder-value',
+ * // The ID of the creative to retrieve.
+ * creativeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adChoicesDestinationUrl": "my_adChoicesDestinationUrl",
+ * // "adTechnologyProviders": {},
+ * // "advertiserName": "my_advertiserName",
+ * // "agencyId": "my_agencyId",
+ * // "apiUpdateTime": "my_apiUpdateTime",
+ * // "attributes": [],
+ * // "clickThroughUrls": [],
+ * // "corrections": [],
+ * // "creativeId": "my_creativeId",
+ * // "dealsStatus": "my_dealsStatus",
+ * // "declaredClickThroughUrls": [],
+ * // "detectedAdvertiserIds": [],
+ * // "detectedDomains": [],
+ * // "detectedLanguages": [],
+ * // "detectedProductCategories": [],
+ * // "detectedSensitiveCategories": [],
+ * // "html": {},
+ * // "impressionTrackingUrls": [],
+ * // "native": {},
+ * // "openAuctionStatus": "my_openAuctionStatus",
+ * // "restrictedCategories": [],
+ * // "servingRestrictions": [],
+ * // "vendorIds": [],
+ * // "version": 0,
+ * // "video": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.creatives.get
* @memberOf! ()
*
@@ -3299,6 +4032,75 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.creatives.list
* @desc Lists creatives.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.creatives.list({
+ * // The account to list the creatives from.
+ * // Specify "-" to list all creatives the current user has access to.
+ * accountId: 'placeholder-value',
+ * // Requested page size. The server may return fewer creatives than requested
+ * // (due to timeout constraint) even if more are available via another call.
+ * // If unspecified, server will pick an appropriate default.
+ * // Acceptable values are 1 to 1000, inclusive.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListCreativesResponse.next_page_token
+ * // returned from the previous call to 'ListCreatives' method.
+ * pageToken: 'placeholder-value',
+ * // An optional query string to filter creatives. If no filter is specified,
+ * // all active creatives will be returned.
+ * // Supported queries are:
+ * //
+ * // - accountId=account_id_string
+ * //
- creativeId=creative_id_string
+ * //
- dealsStatus: {approved, conditionally_approved, disapproved,
+ * // not_checked}
+ * //
- openAuctionStatus: {approved, conditionally_approved, disapproved,
+ * // not_checked}
+ * //
- attribute: {a numeric attribute from the list of attributes}
+ * //
- disapprovalReason: {a reason from
+ * // DisapprovalReason}
+ * //
+ * // Example: 'accountId=12345 AND (dealsStatus:disapproved AND
+ * // disapprovalReason:unacceptable_content) OR attribute:47'
+ * query: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creatives": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.creatives.list
* @memberOf! ()
*
@@ -3379,6 +4181,53 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.creatives.stopWatching
* @desc Stops watching a creative. Will stop push notifications being sent to the topics when the creative changes status.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.creatives.stopWatching({
+ * // The account of the creative to stop notifications for.
+ * accountId: 'placeholder-value',
+ * // The creative ID of the creative to stop notifications for.
+ * // Specify "-" to specify stopping account level notifications.
+ * creativeId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.creatives.stopWatching
* @memberOf! ()
*
@@ -3454,6 +4303,112 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.creatives.update
* @desc Updates a creative.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.creatives.update({
+ * // The account that this creative belongs to.
+ * // Can be used to filter the response of the
+ * // creatives.list
+ * // method.
+ * accountId: 'placeholder-value',
+ * // The buyer-defined creative ID of this creative.
+ * // Can be used to filter the response of the
+ * // creatives.list
+ * // method.
+ * creativeId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adChoicesDestinationUrl": "my_adChoicesDestinationUrl",
+ * // "adTechnologyProviders": {},
+ * // "advertiserName": "my_advertiserName",
+ * // "agencyId": "my_agencyId",
+ * // "apiUpdateTime": "my_apiUpdateTime",
+ * // "attributes": [],
+ * // "clickThroughUrls": [],
+ * // "corrections": [],
+ * // "creativeId": "my_creativeId",
+ * // "dealsStatus": "my_dealsStatus",
+ * // "declaredClickThroughUrls": [],
+ * // "detectedAdvertiserIds": [],
+ * // "detectedDomains": [],
+ * // "detectedLanguages": [],
+ * // "detectedProductCategories": [],
+ * // "detectedSensitiveCategories": [],
+ * // "html": {},
+ * // "impressionTrackingUrls": [],
+ * // "native": {},
+ * // "openAuctionStatus": "my_openAuctionStatus",
+ * // "restrictedCategories": [],
+ * // "servingRestrictions": [],
+ * // "vendorIds": [],
+ * // "version": 0,
+ * // "video": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adChoicesDestinationUrl": "my_adChoicesDestinationUrl",
+ * // "adTechnologyProviders": {},
+ * // "advertiserName": "my_advertiserName",
+ * // "agencyId": "my_agencyId",
+ * // "apiUpdateTime": "my_apiUpdateTime",
+ * // "attributes": [],
+ * // "clickThroughUrls": [],
+ * // "corrections": [],
+ * // "creativeId": "my_creativeId",
+ * // "dealsStatus": "my_dealsStatus",
+ * // "declaredClickThroughUrls": [],
+ * // "detectedAdvertiserIds": [],
+ * // "detectedDomains": [],
+ * // "detectedLanguages": [],
+ * // "detectedProductCategories": [],
+ * // "detectedSensitiveCategories": [],
+ * // "html": {},
+ * // "impressionTrackingUrls": [],
+ * // "native": {},
+ * // "openAuctionStatus": "my_openAuctionStatus",
+ * // "restrictedCategories": [],
+ * // "servingRestrictions": [],
+ * // "vendorIds": [],
+ * // "version": 0,
+ * // "video": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.creatives.update
* @memberOf! ()
*
@@ -3528,6 +4483,58 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.creatives.watch
* @desc Watches a creative. Will result in push notifications being sent to the topic when the creative changes status.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.creatives.watch({
+ * // The account of the creative to watch.
+ * accountId: 'placeholder-value',
+ * // The creative ID to watch for status changes.
+ * // Specify "-" to watch all creatives under the above account.
+ * // If both creative-level and account-level notifications are
+ * // sent, only a single notification will be sent to the
+ * // creative-level notification topic.
+ * creativeId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "topic": "my_topic"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.creatives.watch
* @memberOf! ()
*
@@ -3735,6 +4742,54 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.creatives.dealAssociations.add
* @desc Associate an existing deal with a creative.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.creatives.dealAssociations.add({
+ * // The account the creative belongs to.
+ * accountId: 'placeholder-value',
+ * // The ID of the creative associated with the deal.
+ * creativeId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "association": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.creatives.dealAssociations.add
* @memberOf! ()
*
@@ -3810,6 +4865,73 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.creatives.dealAssociations.list
* @desc List all creative-deal associations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.creatives.dealAssociations.list({
+ * // The account to list the associations from.
+ * // Specify "-" to list all creatives the current user has access to.
+ * accountId: 'placeholder-value',
+ * // The creative ID to list the associations from.
+ * // Specify "-" to list all creatives under the above account.
+ * creativeId: 'placeholder-value',
+ * // Requested page size. Server may return fewer associations than requested.
+ * // If unspecified, server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListDealAssociationsResponse.next_page_token
+ * // returned from the previous call to 'ListDealAssociations' method.
+ * pageToken: 'placeholder-value',
+ * // An optional query string to filter deal associations. If no filter is
+ * // specified, all associations will be returned.
+ * // Supported queries are:
+ * //
+ * // - accountId=account_id_string
+ * //
- creativeId=creative_id_string
+ * //
- dealsId=deals_id_string
+ * //
- dealsStatus:{approved, conditionally_approved, disapproved,
+ * // not_checked}
+ * //
- openAuctionStatus:{approved, conditionally_approved, disapproved,
+ * // not_checked}
+ * //
+ * // Example: 'dealsId=12345 AND dealsStatus:disapproved'
+ * query: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "associations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.creatives.dealAssociations.list
* @memberOf! ()
*
@@ -3898,6 +5020,56 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.creatives.dealAssociations.remove
* @desc Remove the association between a deal and a creative.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.creatives.dealAssociations.remove(
+ * {
+ * // The account the creative belongs to.
+ * accountId: 'placeholder-value',
+ * // The ID of the creative associated with the deal.
+ * creativeId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "association": {}
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.creatives.dealAssociations.remove
* @memberOf! ()
*
@@ -4051,6 +5223,60 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.finalizedProposals.list
* @desc List finalized proposals, regardless if a proposal is being renegotiated. A filter expression (PQL query) may be specified to filter the results. The notes will not be returned.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.finalizedProposals.list({
+ * // Account ID of the buyer.
+ * accountId: 'placeholder-value',
+ * // An optional PQL filter query used to query for proposals.
+ * //
+ * // Nested repeated fields, such as proposal.deals.targetingCriterion,
+ * // cannot be filtered.
+ * filter: 'placeholder-value',
+ * // Syntax the filter is written in. Current implementation defaults to PQL
+ * // but in the future it will be LIST_FILTER.
+ * filterSyntax: 'placeholder-value',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // The page token as returned from ListProposalsResponse.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "proposals": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.finalizedProposals.list
* @memberOf! ()
*
@@ -4167,6 +5393,62 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.products.get
* @desc Gets the requested product by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.products.get({
+ * // Account ID of the buyer.
+ * accountId: 'placeholder-value',
+ * // The ID for the product to get the head revision for.
+ * productId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "availableEndTime": "my_availableEndTime",
+ * // "availableStartTime": "my_availableStartTime",
+ * // "createTime": "my_createTime",
+ * // "creatorContacts": [],
+ * // "displayName": "my_displayName",
+ * // "hasCreatorSignedOff": false,
+ * // "productId": "my_productId",
+ * // "productRevision": "my_productRevision",
+ * // "publisherProfileId": "my_publisherProfileId",
+ * // "seller": {},
+ * // "syndicationProduct": "my_syndicationProduct",
+ * // "targetingCriterion": [],
+ * // "terms": {},
+ * // "updateTime": "my_updateTime",
+ * // "webPropertyCode": "my_webPropertyCode"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.products.get
* @memberOf! ()
*
@@ -4240,6 +5522,59 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.products.list
* @desc List all products visible to the buyer (optionally filtered by the specified PQL query).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.products.list({
+ * // Account ID of the buyer.
+ * accountId: 'placeholder-value',
+ * // An optional PQL query used to query for products. See
+ * // https://developers.google.com/ad-manager/docs/pqlreference
+ * // for documentation about PQL and examples.
+ * //
+ * // Nested repeated fields, such as product.targetingCriterion.inclusions,
+ * // cannot be filtered.
+ * filter: 'placeholder-value',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // The page token as returned from ListProductsResponse.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "products": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.products.list
* @memberOf! ()
*
@@ -4368,6 +5703,73 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.proposals.accept
* @desc Mark the proposal as accepted at the given revision number. If the number does not match the server's revision number an `ABORTED` error message will be returned. This call updates the proposal_state from `PROPOSED` to `BUYER_ACCEPTED`, or from `SELLER_ACCEPTED` to `FINALIZED`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.proposals.accept({
+ * // Account ID of the buyer.
+ * accountId: 'placeholder-value',
+ * // The ID of the proposal to accept.
+ * proposalId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "proposalRevision": "my_proposalRevision"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billedBuyer": {},
+ * // "buyer": {},
+ * // "buyerContacts": [],
+ * // "buyerPrivateData": {},
+ * // "deals": [],
+ * // "displayName": "my_displayName",
+ * // "isRenegotiating": false,
+ * // "isSetupComplete": false,
+ * // "lastUpdaterOrCommentorRole": "my_lastUpdaterOrCommentorRole",
+ * // "notes": [],
+ * // "originatorRole": "my_originatorRole",
+ * // "privateAuctionId": "my_privateAuctionId",
+ * // "proposalId": "my_proposalId",
+ * // "proposalRevision": "my_proposalRevision",
+ * // "proposalState": "my_proposalState",
+ * // "seller": {},
+ * // "sellerContacts": [],
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.proposals.accept
* @memberOf! ()
*
@@ -4443,6 +5845,60 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.proposals.addNote
* @desc Create a new note and attach it to the proposal. The note is assigned a unique ID by the server. The proposal revision number will not increase when associated with a new note.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.proposals.addNote({
+ * // Account ID of the buyer.
+ * accountId: 'placeholder-value',
+ * // The ID of the proposal to attach the note to.
+ * proposalId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "note": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "creatorRole": "my_creatorRole",
+ * // "note": "my_note",
+ * // "noteId": "my_noteId",
+ * // "proposalRevision": "my_proposalRevision"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.proposals.addNote
* @memberOf! ()
*
@@ -4518,6 +5974,71 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.proposals.cancelNegotiation
* @desc Cancel an ongoing negotiation on a proposal. This does not cancel or end serving for the deals if the proposal has been finalized, but only cancels a negotiation unilaterally.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.proposals.cancelNegotiation({
+ * // Account ID of the buyer.
+ * accountId: 'placeholder-value',
+ * // The ID of the proposal to cancel negotiation for.
+ * proposalId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billedBuyer": {},
+ * // "buyer": {},
+ * // "buyerContacts": [],
+ * // "buyerPrivateData": {},
+ * // "deals": [],
+ * // "displayName": "my_displayName",
+ * // "isRenegotiating": false,
+ * // "isSetupComplete": false,
+ * // "lastUpdaterOrCommentorRole": "my_lastUpdaterOrCommentorRole",
+ * // "notes": [],
+ * // "originatorRole": "my_originatorRole",
+ * // "privateAuctionId": "my_privateAuctionId",
+ * // "proposalId": "my_proposalId",
+ * // "proposalRevision": "my_proposalRevision",
+ * // "proposalState": "my_proposalState",
+ * // "seller": {},
+ * // "sellerContacts": [],
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.proposals.cancelNegotiation
* @memberOf! ()
*
@@ -4593,6 +6114,71 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.proposals.completeSetup
* @desc Update the given proposal to indicate that setup has been completed. This method is called by the buyer when the line items have been created on their end for a finalized proposal and all the required creatives have been uploaded using the creatives API. This call updates the `is_setup_completed` bit on the proposal and also notifies the seller. The server will advance the revision number of the most recent proposal.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.proposals.completeSetup({
+ * // Account ID of the buyer.
+ * accountId: 'placeholder-value',
+ * // The ID of the proposal to mark as setup completed.
+ * proposalId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billedBuyer": {},
+ * // "buyer": {},
+ * // "buyerContacts": [],
+ * // "buyerPrivateData": {},
+ * // "deals": [],
+ * // "displayName": "my_displayName",
+ * // "isRenegotiating": false,
+ * // "isSetupComplete": false,
+ * // "lastUpdaterOrCommentorRole": "my_lastUpdaterOrCommentorRole",
+ * // "notes": [],
+ * // "originatorRole": "my_originatorRole",
+ * // "privateAuctionId": "my_privateAuctionId",
+ * // "proposalId": "my_proposalId",
+ * // "proposalRevision": "my_proposalRevision",
+ * // "proposalState": "my_proposalState",
+ * // "seller": {},
+ * // "sellerContacts": [],
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.proposals.completeSetup
* @memberOf! ()
*
@@ -4668,6 +6254,88 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.proposals.create
* @desc Create the given proposal. Each created proposal and any deals it contains are assigned a unique ID by the server.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.proposals.create({
+ * // Account ID of the buyer.
+ * accountId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "billedBuyer": {},
+ * // "buyer": {},
+ * // "buyerContacts": [],
+ * // "buyerPrivateData": {},
+ * // "deals": [],
+ * // "displayName": "my_displayName",
+ * // "isRenegotiating": false,
+ * // "isSetupComplete": false,
+ * // "lastUpdaterOrCommentorRole": "my_lastUpdaterOrCommentorRole",
+ * // "notes": [],
+ * // "originatorRole": "my_originatorRole",
+ * // "privateAuctionId": "my_privateAuctionId",
+ * // "proposalId": "my_proposalId",
+ * // "proposalRevision": "my_proposalRevision",
+ * // "proposalState": "my_proposalState",
+ * // "seller": {},
+ * // "sellerContacts": [],
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billedBuyer": {},
+ * // "buyer": {},
+ * // "buyerContacts": [],
+ * // "buyerPrivateData": {},
+ * // "deals": [],
+ * // "displayName": "my_displayName",
+ * // "isRenegotiating": false,
+ * // "isSetupComplete": false,
+ * // "lastUpdaterOrCommentorRole": "my_lastUpdaterOrCommentorRole",
+ * // "notes": [],
+ * // "originatorRole": "my_originatorRole",
+ * // "privateAuctionId": "my_privateAuctionId",
+ * // "proposalId": "my_proposalId",
+ * // "proposalRevision": "my_proposalRevision",
+ * // "proposalState": "my_proposalState",
+ * // "seller": {},
+ * // "sellerContacts": [],
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.proposals.create
* @memberOf! ()
*
@@ -4742,6 +6410,65 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.proposals.get
* @desc Gets a proposal given its ID. The proposal is returned at its head revision.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.proposals.get({
+ * // Account ID of the buyer.
+ * accountId: 'placeholder-value',
+ * // The unique ID of the proposal
+ * proposalId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billedBuyer": {},
+ * // "buyer": {},
+ * // "buyerContacts": [],
+ * // "buyerPrivateData": {},
+ * // "deals": [],
+ * // "displayName": "my_displayName",
+ * // "isRenegotiating": false,
+ * // "isSetupComplete": false,
+ * // "lastUpdaterOrCommentorRole": "my_lastUpdaterOrCommentorRole",
+ * // "notes": [],
+ * // "originatorRole": "my_originatorRole",
+ * // "privateAuctionId": "my_privateAuctionId",
+ * // "proposalId": "my_proposalId",
+ * // "proposalRevision": "my_proposalRevision",
+ * // "proposalState": "my_proposalState",
+ * // "seller": {},
+ * // "sellerContacts": [],
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.proposals.get
* @memberOf! ()
*
@@ -4815,6 +6542,60 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.proposals.list
* @desc List proposals. A filter expression (PQL query) may be specified to filter the results. To retrieve all finalized proposals, regardless if a proposal is being renegotiated, see the FinalizedProposals resource. Note that Bidder/ChildSeat relationships differ from the usual behavior. A Bidder account can only see its child seats' proposals by specifying the ChildSeat's accountId in the request path.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.proposals.list({
+ * // Account ID of the buyer.
+ * accountId: 'placeholder-value',
+ * // An optional PQL filter query used to query for proposals.
+ * //
+ * // Nested repeated fields, such as proposal.deals.targetingCriterion,
+ * // cannot be filtered.
+ * filter: 'placeholder-value',
+ * // Syntax the filter is written in. Current implementation defaults to PQL
+ * // but in the future it will be LIST_FILTER.
+ * filterSyntax: 'placeholder-value',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // The page token as returned from ListProposalsResponse.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "proposals": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.proposals.list
* @memberOf! ()
*
@@ -4896,6 +6677,73 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.proposals.pause
* @desc Update the given proposal to pause serving. This method will set the `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to true for all deals in the proposal. It is a no-op to pause an already-paused proposal. It is an error to call PauseProposal for a proposal that is not finalized or renegotiating.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.proposals.pause({
+ * // Account ID of the buyer.
+ * accountId: 'placeholder-value',
+ * // The ID of the proposal to pause.
+ * proposalId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "reason": "my_reason"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billedBuyer": {},
+ * // "buyer": {},
+ * // "buyerContacts": [],
+ * // "buyerPrivateData": {},
+ * // "deals": [],
+ * // "displayName": "my_displayName",
+ * // "isRenegotiating": false,
+ * // "isSetupComplete": false,
+ * // "lastUpdaterOrCommentorRole": "my_lastUpdaterOrCommentorRole",
+ * // "notes": [],
+ * // "originatorRole": "my_originatorRole",
+ * // "privateAuctionId": "my_privateAuctionId",
+ * // "proposalId": "my_proposalId",
+ * // "proposalRevision": "my_proposalRevision",
+ * // "proposalState": "my_proposalState",
+ * // "seller": {},
+ * // "sellerContacts": [],
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.proposals.pause
* @memberOf! ()
*
@@ -4971,6 +6819,71 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.proposals.resume
* @desc Update the given proposal to resume serving. This method will set the `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to false for all deals in the proposal. Note that if the `has_seller_paused` bit is also set, serving will not resume until the seller also resumes. It is a no-op to resume an already-running proposal. It is an error to call ResumeProposal for a proposal that is not finalized or renegotiating.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.proposals.resume({
+ * // Account ID of the buyer.
+ * accountId: 'placeholder-value',
+ * // The ID of the proposal to resume.
+ * proposalId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billedBuyer": {},
+ * // "buyer": {},
+ * // "buyerContacts": [],
+ * // "buyerPrivateData": {},
+ * // "deals": [],
+ * // "displayName": "my_displayName",
+ * // "isRenegotiating": false,
+ * // "isSetupComplete": false,
+ * // "lastUpdaterOrCommentorRole": "my_lastUpdaterOrCommentorRole",
+ * // "notes": [],
+ * // "originatorRole": "my_originatorRole",
+ * // "privateAuctionId": "my_privateAuctionId",
+ * // "proposalId": "my_proposalId",
+ * // "proposalRevision": "my_proposalRevision",
+ * // "proposalState": "my_proposalState",
+ * // "seller": {},
+ * // "sellerContacts": [],
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.proposals.resume
* @memberOf! ()
*
@@ -5046,6 +6959,90 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.proposals.update
* @desc Update the given proposal at the client known revision number. If the server revision has advanced since the passed-in `proposal.proposal_revision`, an `ABORTED` error message will be returned. Only the buyer-modifiable fields of the proposal will be updated. Note that the deals in the proposal will be updated to match the passed-in copy. If a passed-in deal does not have a `deal_id`, the server will assign a new unique ID and create the deal. If passed-in deal has a `deal_id`, it will be updated to match the passed-in copy. Any existing deals not present in the passed-in proposal will be deleted. It is an error to pass in a deal with a `deal_id` not present at head.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.proposals.update({
+ * // Account ID of the buyer.
+ * accountId: 'placeholder-value',
+ * // The unique ID of the proposal.
+ * proposalId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "billedBuyer": {},
+ * // "buyer": {},
+ * // "buyerContacts": [],
+ * // "buyerPrivateData": {},
+ * // "deals": [],
+ * // "displayName": "my_displayName",
+ * // "isRenegotiating": false,
+ * // "isSetupComplete": false,
+ * // "lastUpdaterOrCommentorRole": "my_lastUpdaterOrCommentorRole",
+ * // "notes": [],
+ * // "originatorRole": "my_originatorRole",
+ * // "privateAuctionId": "my_privateAuctionId",
+ * // "proposalId": "my_proposalId",
+ * // "proposalRevision": "my_proposalRevision",
+ * // "proposalState": "my_proposalState",
+ * // "seller": {},
+ * // "sellerContacts": [],
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billedBuyer": {},
+ * // "buyer": {},
+ * // "buyerContacts": [],
+ * // "buyerPrivateData": {},
+ * // "deals": [],
+ * // "displayName": "my_displayName",
+ * // "isRenegotiating": false,
+ * // "isSetupComplete": false,
+ * // "lastUpdaterOrCommentorRole": "my_lastUpdaterOrCommentorRole",
+ * // "notes": [],
+ * // "originatorRole": "my_originatorRole",
+ * // "privateAuctionId": "my_privateAuctionId",
+ * // "proposalId": "my_proposalId",
+ * // "proposalRevision": "my_proposalRevision",
+ * // "proposalState": "my_proposalState",
+ * // "seller": {},
+ * // "sellerContacts": [],
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.proposals.update
* @memberOf! ()
*
@@ -5336,6 +7333,63 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.publisherProfiles.get
* @desc Gets the requested publisher profile by id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.publisherProfiles.get({
+ * // Account ID of the buyer.
+ * accountId: 'placeholder-value',
+ * // The id for the publisher profile to get.
+ * publisherProfileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "audienceDescription": "my_audienceDescription",
+ * // "buyerPitchStatement": "my_buyerPitchStatement",
+ * // "directDealsContact": "my_directDealsContact",
+ * // "displayName": "my_displayName",
+ * // "domains": [],
+ * // "googlePlusUrl": "my_googlePlusUrl",
+ * // "isParent": false,
+ * // "logoUrl": "my_logoUrl",
+ * // "mediaKitUrl": "my_mediaKitUrl",
+ * // "overview": "my_overview",
+ * // "programmaticDealsContact": "my_programmaticDealsContact",
+ * // "publisherProfileId": "my_publisherProfileId",
+ * // "rateCardInfoUrl": "my_rateCardInfoUrl",
+ * // "samplePageUrl": "my_samplePageUrl",
+ * // "seller": {},
+ * // "topHeadlines": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.publisherProfiles.get
* @memberOf! ()
*
@@ -5412,6 +7466,51 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.accounts.publisherProfiles.list
* @desc List all publisher profiles visible to the buyer
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.accounts.publisherProfiles.list({
+ * // Account ID of the buyer.
+ * accountId: 'placeholder-value',
+ * // Specify the number of results to include per page.
+ * pageSize: 'placeholder-value',
+ * // The page token as return from ListPublisherProfilesResponse.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "publisherProfiles": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.accounts.publisherProfiles.list
* @memberOf! ()
*
@@ -5593,6 +7692,93 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.accounts.filterSets.create
* @desc Creates the specified filter set for the account with the given account ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.accounts.filterSets.create({
+ * // Whether the filter set is transient, or should be persisted indefinitely.
+ * // By default, filter sets are not transient.
+ * // If transient, it will be available for at least 1 hour after creation.
+ * isTransient: 'placeholder-value',
+ * // Name of the owner (bidder or account) of the filter set to be created.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123: `bidders/123`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456`
+ * ownerName: 'bidders/my-bidder/accounts/my-account',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "absoluteDateRange": {},
+ * // "breakdownDimensions": [],
+ * // "creativeId": "my_creativeId",
+ * // "dealId": "my_dealId",
+ * // "environment": "my_environment",
+ * // "format": "my_format",
+ * // "formats": [],
+ * // "name": "my_name",
+ * // "platforms": [],
+ * // "publisherIdentifiers": [],
+ * // "realtimeTimeRange": {},
+ * // "relativeDateRange": {},
+ * // "sellerNetworkIds": [],
+ * // "timeSeriesGranularity": "my_timeSeriesGranularity"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "absoluteDateRange": {},
+ * // "breakdownDimensions": [],
+ * // "creativeId": "my_creativeId",
+ * // "dealId": "my_dealId",
+ * // "environment": "my_environment",
+ * // "format": "my_format",
+ * // "formats": [],
+ * // "name": "my_name",
+ * // "platforms": [],
+ * // "publisherIdentifiers": [],
+ * // "realtimeTimeRange": {},
+ * // "relativeDateRange": {},
+ * // "sellerNetworkIds": [],
+ * // "timeSeriesGranularity": "my_timeSeriesGranularity"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.accounts.filterSets.create
* @memberOf! ()
*
@@ -5670,6 +7856,54 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.accounts.filterSets.delete
* @desc Deletes the requested filter set from the account with the given account ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.accounts.filterSets.delete({
+ * // Full name of the resource to delete.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * name: 'bidders/my-bidder/accounts/my-account/filterSets/my-filterSet',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.accounts.filterSets.delete
* @memberOf! ()
*
@@ -5740,6 +7974,69 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.accounts.filterSets.get
* @desc Retrieves the requested filter set for the account with the given account ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.accounts.filterSets.get({
+ * // Full name of the resource being requested.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * name: 'bidders/my-bidder/accounts/my-account/filterSets/my-filterSet',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "absoluteDateRange": {},
+ * // "breakdownDimensions": [],
+ * // "creativeId": "my_creativeId",
+ * // "dealId": "my_dealId",
+ * // "environment": "my_environment",
+ * // "format": "my_format",
+ * // "formats": [],
+ * // "name": "my_name",
+ * // "platforms": [],
+ * // "publisherIdentifiers": [],
+ * // "realtimeTimeRange": {},
+ * // "relativeDateRange": {},
+ * // "sellerNetworkIds": [],
+ * // "timeSeriesGranularity": "my_timeSeriesGranularity"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.accounts.filterSets.get
* @memberOf! ()
*
@@ -5812,6 +8109,66 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.accounts.filterSets.list
* @desc Lists all filter sets for the account with the given account ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.accounts.filterSets.list({
+ * // Name of the owner (bidder or account) of the filter sets to be listed.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123: `bidders/123`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456`
+ * ownerName: 'bidders/my-bidder/accounts/my-account',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListFilterSetsResponse.nextPageToken
+ * // returned from the previous call to the
+ * // accounts.filterSets.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "filterSets": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.accounts.filterSets.list
* @memberOf! ()
*
@@ -5964,6 +8321,69 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.accounts.filterSets.bidMetrics.list
* @desc Lists all metrics that are measured in terms of number of bids.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.accounts.filterSets.bidMetrics.list(
+ * {
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName:
+ * 'bidders/my-bidder/accounts/my-account/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListBidMetricsResponse.nextPageToken
+ * // returned from the previous call to the bidMetrics.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bidMetricsRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.accounts.filterSets.bidMetrics.list
* @memberOf! ()
*
@@ -6071,6 +8491,69 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.accounts.filterSets.bidResponseErrors.list
* @desc List all errors that occurred in bid responses, with the number of bid responses affected for each reason.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.accounts.filterSets.bidResponseErrors.list(
+ * {
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName:
+ * 'bidders/my-bidder/accounts/my-account/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListBidResponseErrorsResponse.nextPageToken
+ * // returned from the previous call to the bidResponseErrors.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "calloutStatusRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.accounts.filterSets.bidResponseErrors.list
* @memberOf! ()
*
@@ -6184,6 +8667,69 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.accounts.filterSets.bidResponsesWithoutBids.list
* @desc List all reasons for which bid responses were considered to have no applicable bids, with the number of bid responses affected for each reason.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.accounts.filterSets.bidResponsesWithoutBids.list(
+ * {
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName:
+ * 'bidders/my-bidder/accounts/my-account/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListBidResponsesWithoutBidsResponse.nextPageToken
+ * // returned from the previous call to the bidResponsesWithoutBids.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bidResponseWithoutBidsStatusRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.accounts.filterSets.bidResponsesWithoutBids.list
* @memberOf! ()
*
@@ -6299,6 +8845,69 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.accounts.filterSets.filteredBidRequests.list
* @desc List all reasons that caused a bid request not to be sent for an impression, with the number of bid requests not sent for each reason.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.accounts.filterSets.filteredBidRequests.list(
+ * {
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName:
+ * 'bidders/my-bidder/accounts/my-account/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListFilteredBidRequestsResponse.nextPageToken
+ * // returned from the previous call to the filteredBidRequests.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "calloutStatusRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.accounts.filterSets.filteredBidRequests.list
* @memberOf! ()
*
@@ -6420,6 +9029,69 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.accounts.filterSets.filteredBids.list
* @desc List all reasons for which bids were filtered, with the number of bids filtered for each reason.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.accounts.filterSets.filteredBids.list(
+ * {
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName:
+ * 'bidders/my-bidder/accounts/my-account/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListFilteredBidsResponse.nextPageToken
+ * // returned from the previous call to the filteredBids.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creativeStatusRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.accounts.filterSets.filteredBids.list
* @memberOf! ()
*
@@ -6527,6 +9199,74 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.accounts.filterSets.filteredBids.creatives.list
* @desc List all creatives associated with a specific reason for which bids were filtered, with the number of bids filtered for each creative.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.accounts.filterSets.filteredBids.creatives.list(
+ * {
+ * // The ID of the creative status for which to retrieve a breakdown by
+ * // creative.
+ * // See
+ * // [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).
+ * creativeStatusId: 'placeholder-value',
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName:
+ * 'bidders/my-bidder/accounts/my-account/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListCreativeStatusBreakdownByCreativeResponse.nextPageToken
+ * // returned from the previous call to the filteredBids.creatives.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "filteredBidCreativeRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.accounts.filterSets.filteredBids.creatives.list
* @memberOf! ()
*
@@ -6662,6 +9402,75 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.accounts.filterSets.filteredBids.details.list
* @desc List all details associated with a specific reason for which bids were filtered, with the number of bids filtered for each detail.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.accounts.filterSets.filteredBids.details.list(
+ * {
+ * // The ID of the creative status for which to retrieve a breakdown by detail.
+ * // See
+ * // [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).
+ * // Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and 87.
+ * creativeStatusId: 'placeholder-value',
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName:
+ * 'bidders/my-bidder/accounts/my-account/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListCreativeStatusBreakdownByDetailResponse.nextPageToken
+ * // returned from the previous call to the filteredBids.details.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "detailType": "my_detailType",
+ * // "filteredBidDetailRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.accounts.filterSets.filteredBids.details.list
* @memberOf! ()
*
@@ -6797,6 +9606,69 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.accounts.filterSets.impressionMetrics.list
* @desc Lists all metrics that are measured in terms of number of impressions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.accounts.filterSets.impressionMetrics.list(
+ * {
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName:
+ * 'bidders/my-bidder/accounts/my-account/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListImpressionMetricsResponse.nextPageToken
+ * // returned from the previous call to the impressionMetrics.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "impressionMetricsRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.accounts.filterSets.impressionMetrics.list
* @memberOf! ()
*
@@ -6910,6 +9782,69 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.accounts.filterSets.losingBids.list
* @desc List all reasons for which bids lost in the auction, with the number of bids that lost for each reason.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.accounts.filterSets.losingBids.list(
+ * {
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName:
+ * 'bidders/my-bidder/accounts/my-account/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListLosingBidsResponse.nextPageToken
+ * // returned from the previous call to the losingBids.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creativeStatusRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.accounts.filterSets.losingBids.list
* @memberOf! ()
*
@@ -7017,6 +9952,69 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.accounts.filterSets.nonBillableWinningBids.list
* @desc List all reasons for which winning bids were not billable, with the number of bids not billed for each reason.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.accounts.filterSets.nonBillableWinningBids.list(
+ * {
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName:
+ * 'bidders/my-bidder/accounts/my-account/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListNonBillableWinningBidsResponse.nextPageToken
+ * // returned from the previous call to the nonBillableWinningBids.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "nonBillableWinningBidStatusRows": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.accounts.filterSets.nonBillableWinningBids.list
* @memberOf! ()
*
@@ -7162,6 +10160,93 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.filterSets.create
* @desc Creates the specified filter set for the account with the given account ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.filterSets.create({
+ * // Whether the filter set is transient, or should be persisted indefinitely.
+ * // By default, filter sets are not transient.
+ * // If transient, it will be available for at least 1 hour after creation.
+ * isTransient: 'placeholder-value',
+ * // Name of the owner (bidder or account) of the filter set to be created.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123: `bidders/123`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456`
+ * ownerName: 'bidders/my-bidder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "absoluteDateRange": {},
+ * // "breakdownDimensions": [],
+ * // "creativeId": "my_creativeId",
+ * // "dealId": "my_dealId",
+ * // "environment": "my_environment",
+ * // "format": "my_format",
+ * // "formats": [],
+ * // "name": "my_name",
+ * // "platforms": [],
+ * // "publisherIdentifiers": [],
+ * // "realtimeTimeRange": {},
+ * // "relativeDateRange": {},
+ * // "sellerNetworkIds": [],
+ * // "timeSeriesGranularity": "my_timeSeriesGranularity"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "absoluteDateRange": {},
+ * // "breakdownDimensions": [],
+ * // "creativeId": "my_creativeId",
+ * // "dealId": "my_dealId",
+ * // "environment": "my_environment",
+ * // "format": "my_format",
+ * // "formats": [],
+ * // "name": "my_name",
+ * // "platforms": [],
+ * // "publisherIdentifiers": [],
+ * // "realtimeTimeRange": {},
+ * // "relativeDateRange": {},
+ * // "sellerNetworkIds": [],
+ * // "timeSeriesGranularity": "my_timeSeriesGranularity"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.filterSets.create
* @memberOf! ()
*
@@ -7239,6 +10324,54 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.filterSets.delete
* @desc Deletes the requested filter set from the account with the given account ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.filterSets.delete({
+ * // Full name of the resource to delete.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * name: 'bidders/my-bidder/filterSets/my-filterSet',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.filterSets.delete
* @memberOf! ()
*
@@ -7309,6 +10442,69 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.filterSets.get
* @desc Retrieves the requested filter set for the account with the given account ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.filterSets.get({
+ * // Full name of the resource being requested.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * name: 'bidders/my-bidder/filterSets/my-filterSet',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "absoluteDateRange": {},
+ * // "breakdownDimensions": [],
+ * // "creativeId": "my_creativeId",
+ * // "dealId": "my_dealId",
+ * // "environment": "my_environment",
+ * // "format": "my_format",
+ * // "formats": [],
+ * // "name": "my_name",
+ * // "platforms": [],
+ * // "publisherIdentifiers": [],
+ * // "realtimeTimeRange": {},
+ * // "relativeDateRange": {},
+ * // "sellerNetworkIds": [],
+ * // "timeSeriesGranularity": "my_timeSeriesGranularity"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.filterSets.get
* @memberOf! ()
*
@@ -7381,6 +10577,66 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.filterSets.list
* @desc Lists all filter sets for the account with the given account ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.filterSets.list({
+ * // Name of the owner (bidder or account) of the filter sets to be listed.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123: `bidders/123`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456`
+ * ownerName: 'bidders/my-bidder',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListFilterSetsResponse.nextPageToken
+ * // returned from the previous call to the
+ * // accounts.filterSets.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "filterSets": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.filterSets.list
* @memberOf! ()
*
@@ -7533,6 +10789,66 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.filterSets.bidMetrics.list
* @desc Lists all metrics that are measured in terms of number of bids.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.filterSets.bidMetrics.list({
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName: 'bidders/my-bidder/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListBidMetricsResponse.nextPageToken
+ * // returned from the previous call to the bidMetrics.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bidMetricsRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.filterSets.bidMetrics.list
* @memberOf! ()
*
@@ -7640,6 +10956,66 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.filterSets.bidResponseErrors.list
* @desc List all errors that occurred in bid responses, with the number of bid responses affected for each reason.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.filterSets.bidResponseErrors.list({
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName: 'bidders/my-bidder/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListBidResponseErrorsResponse.nextPageToken
+ * // returned from the previous call to the bidResponseErrors.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "calloutStatusRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.filterSets.bidResponseErrors.list
* @memberOf! ()
*
@@ -7753,6 +11129,68 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.filterSets.bidResponsesWithoutBids.list
* @desc List all reasons for which bid responses were considered to have no applicable bids, with the number of bid responses affected for each reason.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.filterSets.bidResponsesWithoutBids.list(
+ * {
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName: 'bidders/my-bidder/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListBidResponsesWithoutBidsResponse.nextPageToken
+ * // returned from the previous call to the bidResponsesWithoutBids.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bidResponseWithoutBidsStatusRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.filterSets.bidResponsesWithoutBids.list
* @memberOf! ()
*
@@ -7868,6 +11306,68 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.filterSets.filteredBidRequests.list
* @desc List all reasons that caused a bid request not to be sent for an impression, with the number of bid requests not sent for each reason.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.filterSets.filteredBidRequests.list(
+ * {
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName: 'bidders/my-bidder/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListFilteredBidRequestsResponse.nextPageToken
+ * // returned from the previous call to the filteredBidRequests.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "calloutStatusRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.filterSets.filteredBidRequests.list
* @memberOf! ()
*
@@ -7989,6 +11489,66 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.filterSets.filteredBids.list
* @desc List all reasons for which bids were filtered, with the number of bids filtered for each reason.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.filterSets.filteredBids.list({
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName: 'bidders/my-bidder/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListFilteredBidsResponse.nextPageToken
+ * // returned from the previous call to the filteredBids.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creativeStatusRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.filterSets.filteredBids.list
* @memberOf! ()
*
@@ -8096,6 +11656,73 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.filterSets.filteredBids.creatives.list
* @desc List all creatives associated with a specific reason for which bids were filtered, with the number of bids filtered for each creative.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.filterSets.filteredBids.creatives.list(
+ * {
+ * // The ID of the creative status for which to retrieve a breakdown by
+ * // creative.
+ * // See
+ * // [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).
+ * creativeStatusId: 'placeholder-value',
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName: 'bidders/my-bidder/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListCreativeStatusBreakdownByCreativeResponse.nextPageToken
+ * // returned from the previous call to the filteredBids.creatives.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "filteredBidCreativeRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.filterSets.filteredBids.creatives.list
* @memberOf! ()
*
@@ -8231,6 +11858,74 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.filterSets.filteredBids.details.list
* @desc List all details associated with a specific reason for which bids were filtered, with the number of bids filtered for each detail.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.filterSets.filteredBids.details.list(
+ * {
+ * // The ID of the creative status for which to retrieve a breakdown by detail.
+ * // See
+ * // [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).
+ * // Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and 87.
+ * creativeStatusId: 'placeholder-value',
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName: 'bidders/my-bidder/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListCreativeStatusBreakdownByDetailResponse.nextPageToken
+ * // returned from the previous call to the filteredBids.details.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "detailType": "my_detailType",
+ * // "filteredBidDetailRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.filterSets.filteredBids.details.list
* @memberOf! ()
*
@@ -8366,6 +12061,66 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.filterSets.impressionMetrics.list
* @desc Lists all metrics that are measured in terms of number of impressions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.filterSets.impressionMetrics.list({
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName: 'bidders/my-bidder/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListImpressionMetricsResponse.nextPageToken
+ * // returned from the previous call to the impressionMetrics.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "impressionMetricsRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.filterSets.impressionMetrics.list
* @memberOf! ()
*
@@ -8479,6 +12234,66 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.filterSets.losingBids.list
* @desc List all reasons for which bids lost in the auction, with the number of bids that lost for each reason.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.filterSets.losingBids.list({
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName: 'bidders/my-bidder/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListLosingBidsResponse.nextPageToken
+ * // returned from the previous call to the losingBids.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creativeStatusRows": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.filterSets.losingBids.list
* @memberOf! ()
*
@@ -8586,6 +12401,68 @@ export namespace adexchangebuyer2_v2beta1 {
/**
* adexchangebuyer2.bidders.filterSets.nonBillableWinningBids.list
* @desc List all reasons for which winning bids were not billable, with the number of bids not billed for each reason.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexchangebuyer2.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexchangebuyer2 = google.adexchangebuyer2('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adexchange.buyer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexchangebuyer2.bidders.filterSets.nonBillableWinningBids.list(
+ * {
+ * // Name of the filter set that should be applied to the requested metrics.
+ * // For example:
+ * //
+ * // - For a bidder-level filter set for bidder 123:
+ * // `bidders/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the buyer account representing bidder
+ * // 123: `bidders/123/accounts/123/filterSets/abc`
+ * //
+ * // - For an account-level filter set for the child seat buyer account 456
+ * // whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`
+ * filterSetName: 'bidders/my-bidder/filterSets/my-filterSet',
+ * // Requested page size. The server may return fewer results than requested.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * // Typically, this is the value of
+ * // ListNonBillableWinningBidsResponse.nextPageToken
+ * // returned from the previous call to the nonBillableWinningBids.list
+ * // method.
+ * pageToken: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "nonBillableWinningBidStatusRows": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexchangebuyer2.bidders.filterSets.nonBillableWinningBids.list
* @memberOf! ()
*
diff --git a/src/apis/adexperiencereport/v1.ts b/src/apis/adexperiencereport/v1.ts
index 742740420ad..6ca737cc9ae 100644
--- a/src/apis/adexperiencereport/v1.ts
+++ b/src/apis/adexperiencereport/v1.ts
@@ -184,6 +184,51 @@ export namespace adexperiencereport_v1 {
/**
* adexperiencereport.sites.get
* @desc Gets a site's Ad Experience Report summary.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexperiencereport.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexperiencereport = google.adexperiencereport('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexperiencereport.sites.get({
+ * // Required. The name of the site whose summary to get, e.g.
+ * // `sites/http%3A%2F%2Fwww.google.com%2F`.
+ * //
+ * // Format: `sites/{site}`
+ * name: 'sites/my-site',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "desktopSummary": {},
+ * // "mobileSummary": {},
+ * // "reviewedSite": "my_reviewedSite"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexperiencereport.sites.get
* @memberOf! ()
*
@@ -274,6 +319,43 @@ export namespace adexperiencereport_v1 {
/**
* adexperiencereport.violatingSites.list
* @desc Lists sites that are failing in the Ad Experience Report on at least one platform.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adexperiencereport.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adexperiencereport = google.adexperiencereport('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adexperiencereport.violatingSites.list({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "violatingSites": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adexperiencereport.violatingSites.list
* @memberOf! ()
*
diff --git a/src/apis/admin/datatransfer_v1.ts b/src/apis/admin/datatransfer_v1.ts
index 58ef0abb53e..32a9d3f970c 100644
--- a/src/apis/admin/datatransfer_v1.ts
+++ b/src/apis/admin/datatransfer_v1.ts
@@ -243,6 +243,53 @@ export namespace admin_datatransfer_v1 {
/**
* datatransfer.applications.get
* @desc Retrieves information about an application for the given application ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('datatransfer_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.datatransfer',
+ * 'https://www.googleapis.com/auth/admin.datatransfer.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datatransfer.applications.get({
+ * // ID of the application resource to be retrieved.
+ * applicationId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "transferParams": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datatransfer.applications.get
* @memberOf! ()
*
@@ -315,6 +362,56 @@ export namespace admin_datatransfer_v1 {
/**
* datatransfer.applications.list
* @desc Lists the applications available for data transfer for a customer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('datatransfer_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.datatransfer',
+ * 'https://www.googleapis.com/auth/admin.datatransfer.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datatransfer.applications.list({
+ * // Immutable ID of the G Suite account.
+ * customerId: 'placeholder-value',
+ * // Maximum number of results to return. Default is 100.
+ * maxResults: 'placeholder-value',
+ * // Token to specify next page in the list.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "applications": [],
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datatransfer.applications.list
* @memberOf! ()
*
@@ -432,6 +529,56 @@ export namespace admin_datatransfer_v1 {
/**
* datatransfer.transfers.get
* @desc Retrieves a data transfer request by its resource ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('datatransfer_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.datatransfer',
+ * 'https://www.googleapis.com/auth/admin.datatransfer.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datatransfer.transfers.get({
+ * // ID of the resource to be retrieved. This is returned in the response from the insert method.
+ * dataTransferId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "applicationDataTransfers": [],
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "newOwnerUserId": "my_newOwnerUserId",
+ * // "oldOwnerUserId": "my_oldOwnerUserId",
+ * // "overallTransferStatusCode": "my_overallTransferStatusCode",
+ * // "requestTime": "my_requestTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datatransfer.transfers.get
* @memberOf! ()
*
@@ -504,6 +651,65 @@ export namespace admin_datatransfer_v1 {
/**
* datatransfer.transfers.insert
* @desc Inserts a data transfer request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('datatransfer_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.datatransfer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datatransfer.transfers.insert({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "applicationDataTransfers": [],
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "newOwnerUserId": "my_newOwnerUserId",
+ * // "oldOwnerUserId": "my_oldOwnerUserId",
+ * // "overallTransferStatusCode": "my_overallTransferStatusCode",
+ * // "requestTime": "my_requestTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "applicationDataTransfers": [],
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "newOwnerUserId": "my_newOwnerUserId",
+ * // "oldOwnerUserId": "my_oldOwnerUserId",
+ * // "overallTransferStatusCode": "my_overallTransferStatusCode",
+ * // "requestTime": "my_requestTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datatransfer.transfers.insert
* @memberOf! ()
*
@@ -577,6 +783,62 @@ export namespace admin_datatransfer_v1 {
/**
* datatransfer.transfers.list
* @desc Lists the transfers for a customer by source user, destination user, or status.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('datatransfer_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.datatransfer',
+ * 'https://www.googleapis.com/auth/admin.datatransfer.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datatransfer.transfers.list({
+ * // Immutable ID of the G Suite account.
+ * customerId: 'placeholder-value',
+ * // Maximum number of results to return. Default is 100.
+ * maxResults: 'placeholder-value',
+ * // Destination user's profile ID.
+ * newOwnerUserId: 'placeholder-value',
+ * // Source user's profile ID.
+ * oldOwnerUserId: 'placeholder-value',
+ * // Token to specify the next page in the list.
+ * pageToken: 'placeholder-value',
+ * // Status of the transfer.
+ * status: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dataTransfers": [],
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datatransfer.transfers.list
* @memberOf! ()
*
diff --git a/src/apis/admin/directory_v1.ts b/src/apis/admin/directory_v1.ts
index 784c3734a3c..a44a8e90601 100644
--- a/src/apis/admin/directory_v1.ts
+++ b/src/apis/admin/directory_v1.ts
@@ -2328,6 +2328,43 @@ export namespace admin_directory_v1 {
/**
* directory.asps.delete
* @desc Delete an ASP issued by a user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user.security'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.asps.delete({
+ * // The unique ID of the ASP to be deleted.
+ * codeId: 'placeholder-value',
+ * // Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.asps.delete
* @memberOf! ()
*
@@ -2399,6 +2436,54 @@ export namespace admin_directory_v1 {
/**
* directory.asps.get
* @desc Get information about an ASP issued by a user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user.security'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.asps.get({
+ * // The unique ID of the ASP.
+ * codeId: 'placeholder-value',
+ * // Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "codeId": 0,
+ * // "creationTime": "my_creationTime",
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "lastTimeUsed": "my_lastTimeUsed",
+ * // "name": "my_name",
+ * // "userKey": "my_userKey"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.asps.get
* @memberOf! ()
*
@@ -2470,6 +2555,48 @@ export namespace admin_directory_v1 {
/**
* directory.asps.list
* @desc List the ASPs issued by a user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user.security'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.asps.list({
+ * // Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.asps.list
* @memberOf! ()
*
@@ -2590,6 +2717,61 @@ export namespace admin_directory_v1 {
/**
* admin.channels.stop
* @desc Stop watching resources through this channel
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.user',
+ * 'https://www.googleapis.com/auth/admin.directory.user.alias',
+ * 'https://www.googleapis.com/auth/admin.directory.user.alias.readonly',
+ * 'https://www.googleapis.com/auth/admin.directory.user.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await admin.channels.stop({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": "my_address",
+ * // "expiration": "my_expiration",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "params": {},
+ * // "payload": false,
+ * // "resourceId": "my_resourceId",
+ * // "resourceUri": "my_resourceUri",
+ * // "token": "my_token",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias admin.channels.stop
* @memberOf! ()
*
@@ -2679,6 +2861,52 @@ export namespace admin_directory_v1 {
/**
* directory.chromeosdevices.action
* @desc Take action on Chrome OS Device
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.device.chromeos'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.chromeosdevices.action({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Immutable ID of Chrome OS Device
+ * resourceId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "deprovisionReason": "my_deprovisionReason"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.chromeosdevices.action
* @memberOf! ()
*
@@ -2753,6 +2981,87 @@ export namespace admin_directory_v1 {
/**
* directory.chromeosdevices.get
* @desc Retrieve Chrome OS Device
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.device.chromeos',
+ * 'https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.chromeosdevices.get({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Immutable ID of Chrome OS Device
+ * deviceId: 'placeholder-value',
+ * // Restrict information returned to a set of selected fields.
+ * projection: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "activeTimeRanges": [],
+ * // "annotatedAssetId": "my_annotatedAssetId",
+ * // "annotatedLocation": "my_annotatedLocation",
+ * // "annotatedUser": "my_annotatedUser",
+ * // "autoUpdateExpiration": "my_autoUpdateExpiration",
+ * // "bootMode": "my_bootMode",
+ * // "cpuStatusReports": [],
+ * // "deviceFiles": [],
+ * // "deviceId": "my_deviceId",
+ * // "diskVolumeReports": [],
+ * // "dockMacAddress": "my_dockMacAddress",
+ * // "etag": "my_etag",
+ * // "ethernetMacAddress": "my_ethernetMacAddress",
+ * // "ethernetMacAddress0": "my_ethernetMacAddress0",
+ * // "firmwareVersion": "my_firmwareVersion",
+ * // "kind": "my_kind",
+ * // "lastEnrollmentTime": "my_lastEnrollmentTime",
+ * // "lastSync": "my_lastSync",
+ * // "macAddress": "my_macAddress",
+ * // "manufactureDate": "my_manufactureDate",
+ * // "meid": "my_meid",
+ * // "model": "my_model",
+ * // "notes": "my_notes",
+ * // "orderNumber": "my_orderNumber",
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "osVersion": "my_osVersion",
+ * // "platformVersion": "my_platformVersion",
+ * // "recentUsers": [],
+ * // "serialNumber": "my_serialNumber",
+ * // "status": "my_status",
+ * // "supportEndDate": "my_supportEndDate",
+ * // "systemRamFreeReports": [],
+ * // "systemRamTotal": "my_systemRamTotal",
+ * // "tpmVersionInfo": {},
+ * // "willAutoRenew": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.chromeosdevices.get
* @memberOf! ()
*
@@ -2829,6 +3138,66 @@ export namespace admin_directory_v1 {
/**
* directory.chromeosdevices.list
* @desc Retrieve all Chrome OS Devices of a customer (paginated)
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.device.chromeos',
+ * 'https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.chromeosdevices.list({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Maximum number of results to return. Max allowed value is 200.
+ * maxResults: 'placeholder-value',
+ * // Column to use for sorting results
+ * orderBy: 'placeholder-value',
+ * // Full path of the organizational unit or its ID
+ * orgUnitPath: 'placeholder-value',
+ * // Token to specify next page in the list
+ * pageToken: 'placeholder-value',
+ * // Restrict information returned to a set of selected fields.
+ * projection: 'placeholder-value',
+ * // Search string in the format given at http://support.google.com/chromeos/a/bin/answer.py?answer=1698333
+ * query: 'placeholder-value',
+ * // Whether to return results in ascending or descending order. Only of use when orderBy is also used
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "chromeosdevices": [],
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.chromeosdevices.list
* @memberOf! ()
*
@@ -2910,6 +3279,51 @@ export namespace admin_directory_v1 {
/**
* directory.chromeosdevices.moveDevicesToOu
* @desc Move or insert multiple Chrome OS Devices to organizational unit
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.device.chromeos'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.chromeosdevices.moveDevicesToOu({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Full path of the target organizational unit or its ID
+ * orgUnitPath: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deviceIds": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.chromeosdevices.moveDevicesToOu
* @memberOf! ()
*
@@ -2984,6 +3398,126 @@ export namespace admin_directory_v1 {
/**
* directory.chromeosdevices.patch
* @desc Update Chrome OS Device. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.device.chromeos'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.chromeosdevices.patch({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Immutable ID of Chrome OS Device
+ * deviceId: 'placeholder-value',
+ * // Restrict information returned to a set of selected fields.
+ * projection: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "activeTimeRanges": [],
+ * // "annotatedAssetId": "my_annotatedAssetId",
+ * // "annotatedLocation": "my_annotatedLocation",
+ * // "annotatedUser": "my_annotatedUser",
+ * // "autoUpdateExpiration": "my_autoUpdateExpiration",
+ * // "bootMode": "my_bootMode",
+ * // "cpuStatusReports": [],
+ * // "deviceFiles": [],
+ * // "deviceId": "my_deviceId",
+ * // "diskVolumeReports": [],
+ * // "dockMacAddress": "my_dockMacAddress",
+ * // "etag": "my_etag",
+ * // "ethernetMacAddress": "my_ethernetMacAddress",
+ * // "ethernetMacAddress0": "my_ethernetMacAddress0",
+ * // "firmwareVersion": "my_firmwareVersion",
+ * // "kind": "my_kind",
+ * // "lastEnrollmentTime": "my_lastEnrollmentTime",
+ * // "lastSync": "my_lastSync",
+ * // "macAddress": "my_macAddress",
+ * // "manufactureDate": "my_manufactureDate",
+ * // "meid": "my_meid",
+ * // "model": "my_model",
+ * // "notes": "my_notes",
+ * // "orderNumber": "my_orderNumber",
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "osVersion": "my_osVersion",
+ * // "platformVersion": "my_platformVersion",
+ * // "recentUsers": [],
+ * // "serialNumber": "my_serialNumber",
+ * // "status": "my_status",
+ * // "supportEndDate": "my_supportEndDate",
+ * // "systemRamFreeReports": [],
+ * // "systemRamTotal": "my_systemRamTotal",
+ * // "tpmVersionInfo": {},
+ * // "willAutoRenew": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "activeTimeRanges": [],
+ * // "annotatedAssetId": "my_annotatedAssetId",
+ * // "annotatedLocation": "my_annotatedLocation",
+ * // "annotatedUser": "my_annotatedUser",
+ * // "autoUpdateExpiration": "my_autoUpdateExpiration",
+ * // "bootMode": "my_bootMode",
+ * // "cpuStatusReports": [],
+ * // "deviceFiles": [],
+ * // "deviceId": "my_deviceId",
+ * // "diskVolumeReports": [],
+ * // "dockMacAddress": "my_dockMacAddress",
+ * // "etag": "my_etag",
+ * // "ethernetMacAddress": "my_ethernetMacAddress",
+ * // "ethernetMacAddress0": "my_ethernetMacAddress0",
+ * // "firmwareVersion": "my_firmwareVersion",
+ * // "kind": "my_kind",
+ * // "lastEnrollmentTime": "my_lastEnrollmentTime",
+ * // "lastSync": "my_lastSync",
+ * // "macAddress": "my_macAddress",
+ * // "manufactureDate": "my_manufactureDate",
+ * // "meid": "my_meid",
+ * // "model": "my_model",
+ * // "notes": "my_notes",
+ * // "orderNumber": "my_orderNumber",
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "osVersion": "my_osVersion",
+ * // "platformVersion": "my_platformVersion",
+ * // "recentUsers": [],
+ * // "serialNumber": "my_serialNumber",
+ * // "status": "my_status",
+ * // "supportEndDate": "my_supportEndDate",
+ * // "systemRamFreeReports": [],
+ * // "systemRamTotal": "my_systemRamTotal",
+ * // "tpmVersionInfo": {},
+ * // "willAutoRenew": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.chromeosdevices.patch
* @memberOf! ()
*
@@ -3061,6 +3595,126 @@ export namespace admin_directory_v1 {
/**
* directory.chromeosdevices.update
* @desc Update Chrome OS Device
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.device.chromeos'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.chromeosdevices.update({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Immutable ID of Chrome OS Device
+ * deviceId: 'placeholder-value',
+ * // Restrict information returned to a set of selected fields.
+ * projection: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "activeTimeRanges": [],
+ * // "annotatedAssetId": "my_annotatedAssetId",
+ * // "annotatedLocation": "my_annotatedLocation",
+ * // "annotatedUser": "my_annotatedUser",
+ * // "autoUpdateExpiration": "my_autoUpdateExpiration",
+ * // "bootMode": "my_bootMode",
+ * // "cpuStatusReports": [],
+ * // "deviceFiles": [],
+ * // "deviceId": "my_deviceId",
+ * // "diskVolumeReports": [],
+ * // "dockMacAddress": "my_dockMacAddress",
+ * // "etag": "my_etag",
+ * // "ethernetMacAddress": "my_ethernetMacAddress",
+ * // "ethernetMacAddress0": "my_ethernetMacAddress0",
+ * // "firmwareVersion": "my_firmwareVersion",
+ * // "kind": "my_kind",
+ * // "lastEnrollmentTime": "my_lastEnrollmentTime",
+ * // "lastSync": "my_lastSync",
+ * // "macAddress": "my_macAddress",
+ * // "manufactureDate": "my_manufactureDate",
+ * // "meid": "my_meid",
+ * // "model": "my_model",
+ * // "notes": "my_notes",
+ * // "orderNumber": "my_orderNumber",
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "osVersion": "my_osVersion",
+ * // "platformVersion": "my_platformVersion",
+ * // "recentUsers": [],
+ * // "serialNumber": "my_serialNumber",
+ * // "status": "my_status",
+ * // "supportEndDate": "my_supportEndDate",
+ * // "systemRamFreeReports": [],
+ * // "systemRamTotal": "my_systemRamTotal",
+ * // "tpmVersionInfo": {},
+ * // "willAutoRenew": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "activeTimeRanges": [],
+ * // "annotatedAssetId": "my_annotatedAssetId",
+ * // "annotatedLocation": "my_annotatedLocation",
+ * // "annotatedUser": "my_annotatedUser",
+ * // "autoUpdateExpiration": "my_autoUpdateExpiration",
+ * // "bootMode": "my_bootMode",
+ * // "cpuStatusReports": [],
+ * // "deviceFiles": [],
+ * // "deviceId": "my_deviceId",
+ * // "diskVolumeReports": [],
+ * // "dockMacAddress": "my_dockMacAddress",
+ * // "etag": "my_etag",
+ * // "ethernetMacAddress": "my_ethernetMacAddress",
+ * // "ethernetMacAddress0": "my_ethernetMacAddress0",
+ * // "firmwareVersion": "my_firmwareVersion",
+ * // "kind": "my_kind",
+ * // "lastEnrollmentTime": "my_lastEnrollmentTime",
+ * // "lastSync": "my_lastSync",
+ * // "macAddress": "my_macAddress",
+ * // "manufactureDate": "my_manufactureDate",
+ * // "meid": "my_meid",
+ * // "model": "my_model",
+ * // "notes": "my_notes",
+ * // "orderNumber": "my_orderNumber",
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "osVersion": "my_osVersion",
+ * // "platformVersion": "my_platformVersion",
+ * // "recentUsers": [],
+ * // "serialNumber": "my_serialNumber",
+ * // "status": "my_status",
+ * // "supportEndDate": "my_supportEndDate",
+ * // "systemRamFreeReports": [],
+ * // "systemRamTotal": "my_systemRamTotal",
+ * // "tpmVersionInfo": {},
+ * // "willAutoRenew": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.chromeosdevices.update
* @memberOf! ()
*
@@ -3298,6 +3952,57 @@ export namespace admin_directory_v1 {
/**
* directory.customers.get
* @desc Retrieves a customer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.customer',
+ * 'https://www.googleapis.com/auth/admin.directory.customer.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.customers.get({
+ * // Id of the customer to be retrieved
+ * customerKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateEmail": "my_alternateEmail",
+ * // "customerCreationTime": "my_customerCreationTime",
+ * // "customerDomain": "my_customerDomain",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "language": "my_language",
+ * // "phoneNumber": "my_phoneNumber",
+ * // "postalAddress": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.customers.get
* @memberOf! ()
*
@@ -3368,6 +4073,70 @@ export namespace admin_directory_v1 {
/**
* directory.customers.patch
* @desc Updates a customer. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.customer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.customers.patch({
+ * // Id of the customer to be updated
+ * customerKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "alternateEmail": "my_alternateEmail",
+ * // "customerCreationTime": "my_customerCreationTime",
+ * // "customerDomain": "my_customerDomain",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "language": "my_language",
+ * // "phoneNumber": "my_phoneNumber",
+ * // "postalAddress": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateEmail": "my_alternateEmail",
+ * // "customerCreationTime": "my_customerCreationTime",
+ * // "customerDomain": "my_customerDomain",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "language": "my_language",
+ * // "phoneNumber": "my_phoneNumber",
+ * // "postalAddress": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.customers.patch
* @memberOf! ()
*
@@ -3439,6 +4208,70 @@ export namespace admin_directory_v1 {
/**
* directory.customers.update
* @desc Updates a customer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.customer'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.customers.update({
+ * // Id of the customer to be updated
+ * customerKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "alternateEmail": "my_alternateEmail",
+ * // "customerCreationTime": "my_customerCreationTime",
+ * // "customerDomain": "my_customerDomain",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "language": "my_language",
+ * // "phoneNumber": "my_phoneNumber",
+ * // "postalAddress": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateEmail": "my_alternateEmail",
+ * // "customerCreationTime": "my_customerCreationTime",
+ * // "customerDomain": "my_customerDomain",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "language": "my_language",
+ * // "phoneNumber": "my_phoneNumber",
+ * // "postalAddress": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.customers.update
* @memberOf! ()
*
@@ -3561,6 +4394,43 @@ export namespace admin_directory_v1 {
/**
* directory.domainAliases.delete
* @desc Deletes a Domain Alias of the customer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.domain'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.domainAliases.delete({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ * // Name of domain alias to be retrieved.
+ * domainAliasName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.domainAliases.delete
* @memberOf! ()
*
@@ -3634,6 +4504,56 @@ export namespace admin_directory_v1 {
/**
* directory.domainAliases.get
* @desc Retrieves a domain alias of the customer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.domain',
+ * 'https://www.googleapis.com/auth/admin.directory.domain.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.domainAliases.get({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ * // Name of domain alias to be retrieved.
+ * domainAliasName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "domainAliasName": "my_domainAliasName",
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "parentDomainName": "my_parentDomainName",
+ * // "verified": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.domainAliases.get
* @memberOf! ()
*
@@ -3709,6 +4629,64 @@ export namespace admin_directory_v1 {
/**
* directory.domainAliases.insert
* @desc Inserts a Domain alias of the customer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.domain'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.domainAliases.insert({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "domainAliasName": "my_domainAliasName",
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "parentDomainName": "my_parentDomainName",
+ * // "verified": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "domainAliasName": "my_domainAliasName",
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "parentDomainName": "my_parentDomainName",
+ * // "verified": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.domainAliases.insert
* @memberOf! ()
*
@@ -3783,6 +4761,53 @@ export namespace admin_directory_v1 {
/**
* directory.domainAliases.list
* @desc Lists the domain aliases of the customer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.domain',
+ * 'https://www.googleapis.com/auth/admin.directory.domain.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.domainAliases.list({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ * // Name of the parent domain for which domain aliases are to be fetched.
+ * parentDomainName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "domainAliases": [],
+ * // "etag": "my_etag",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.domainAliases.list
* @memberOf! ()
*
@@ -3930,6 +4955,43 @@ export namespace admin_directory_v1 {
/**
* directory.domains.delete
* @desc Deletes a domain of the customer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.domain'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.domains.delete({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ * // Name of domain to be deleted
+ * domainName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.domains.delete
* @memberOf! ()
*
@@ -4002,6 +5064,57 @@ export namespace admin_directory_v1 {
/**
* directory.domains.get
* @desc Retrieves a domain of the customer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.domain',
+ * 'https://www.googleapis.com/auth/admin.directory.domain.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.domains.get({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ * // Name of domain to be retrieved
+ * domainName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "domainAliases": [],
+ * // "domainName": "my_domainName",
+ * // "etag": "my_etag",
+ * // "isPrimary": false,
+ * // "kind": "my_kind",
+ * // "verified": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.domains.get
* @memberOf! ()
*
@@ -4074,6 +5187,66 @@ export namespace admin_directory_v1 {
/**
* directory.domains.insert
* @desc Inserts a domain of the customer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.domain'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.domains.insert({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "domainAliases": [],
+ * // "domainName": "my_domainName",
+ * // "etag": "my_etag",
+ * // "isPrimary": false,
+ * // "kind": "my_kind",
+ * // "verified": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "domainAliases": [],
+ * // "domainName": "my_domainName",
+ * // "etag": "my_etag",
+ * // "isPrimary": false,
+ * // "kind": "my_kind",
+ * // "verified": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.domains.insert
* @memberOf! ()
*
@@ -4145,6 +5318,51 @@ export namespace admin_directory_v1 {
/**
* directory.domains.list
* @desc Lists the domains of the customer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.domain',
+ * 'https://www.googleapis.com/auth/admin.directory.domain.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.domains.list({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "domains": [],
+ * // "etag": "my_etag",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.domains.list
* @memberOf! ()
*
@@ -4282,6 +5500,41 @@ export namespace admin_directory_v1 {
/**
* directory.groups.delete
* @desc Delete Group
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.group'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.groups.delete({
+ * // Email or immutable ID of the group
+ * groupKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.groups.delete
* @memberOf! ()
*
@@ -4353,6 +5606,58 @@ export namespace admin_directory_v1 {
/**
* directory.groups.get
* @desc Retrieve Group
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.group',
+ * 'https://www.googleapis.com/auth/admin.directory.group.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.groups.get({
+ * // Email or immutable ID of the group
+ * groupKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adminCreated": false,
+ * // "aliases": [],
+ * // "description": "my_description",
+ * // "directMembersCount": "my_directMembersCount",
+ * // "email": "my_email",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nonEditableAliases": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.groups.get
* @memberOf! ()
*
@@ -4424,6 +5729,69 @@ export namespace admin_directory_v1 {
/**
* directory.groups.insert
* @desc Create Group
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.group'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.groups.insert({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adminCreated": false,
+ * // "aliases": [],
+ * // "description": "my_description",
+ * // "directMembersCount": "my_directMembersCount",
+ * // "email": "my_email",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nonEditableAliases": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adminCreated": false,
+ * // "aliases": [],
+ * // "description": "my_description",
+ * // "directMembersCount": "my_directMembersCount",
+ * // "email": "my_email",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nonEditableAliases": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.groups.insert
* @memberOf! ()
*
@@ -4495,6 +5863,66 @@ export namespace admin_directory_v1 {
/**
* directory.groups.list
* @desc Retrieve all groups of a domain or of a user given a userKey (paginated)
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.group',
+ * 'https://www.googleapis.com/auth/admin.directory.group.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.groups.list({
+ * // Immutable ID of the G Suite account. In case of multi-domain, to fetch all groups for a customer, fill this field instead of domain.
+ * customer: 'placeholder-value',
+ * // Name of the domain. Fill this field to get groups from only this domain. To return all groups in a multi-domain fill customer field instead.
+ * domain: 'placeholder-value',
+ * // Maximum number of results to return. Max allowed value is 200.
+ * maxResults: 'placeholder-value',
+ * // Column to use for sorting results
+ * orderBy: 'placeholder-value',
+ * // Token to specify next page in the list
+ * pageToken: 'placeholder-value',
+ * // Query string search. Should be of the form "". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-groups
+ * query: 'placeholder-value',
+ * // Whether to return results in ascending or descending order. Only of use when orderBy is also used
+ * sortOrder: 'placeholder-value',
+ * // Email or immutable ID of the user if only those groups are to be listed, the given user is a member of. If it's an ID, it should match with the ID of the user object.
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "groups": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.groups.list
* @memberOf! ()
*
@@ -4573,6 +6001,72 @@ export namespace admin_directory_v1 {
/**
* directory.groups.patch
* @desc Update Group. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.group'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.groups.patch({
+ * // Email or immutable ID of the group. If ID, it should match with id of group object
+ * groupKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adminCreated": false,
+ * // "aliases": [],
+ * // "description": "my_description",
+ * // "directMembersCount": "my_directMembersCount",
+ * // "email": "my_email",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nonEditableAliases": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adminCreated": false,
+ * // "aliases": [],
+ * // "description": "my_description",
+ * // "directMembersCount": "my_directMembersCount",
+ * // "email": "my_email",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nonEditableAliases": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.groups.patch
* @memberOf! ()
*
@@ -4645,6 +6139,72 @@ export namespace admin_directory_v1 {
/**
* directory.groups.update
* @desc Update Group
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.group'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.groups.update({
+ * // Email or immutable ID of the group. If ID, it should match with id of group object
+ * groupKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adminCreated": false,
+ * // "aliases": [],
+ * // "description": "my_description",
+ * // "directMembersCount": "my_directMembersCount",
+ * // "email": "my_email",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nonEditableAliases": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adminCreated": false,
+ * // "aliases": [],
+ * // "description": "my_description",
+ * // "directMembersCount": "my_directMembersCount",
+ * // "email": "my_email",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nonEditableAliases": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.groups.update
* @memberOf! ()
*
@@ -4829,6 +6389,43 @@ export namespace admin_directory_v1 {
/**
* directory.groups.aliases.delete
* @desc Remove a alias for the group
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.group'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.groups.aliases.delete({
+ * // The alias to be removed
+ * alias: 'placeholder-value',
+ * // Email or immutable ID of the group
+ * groupKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.groups.aliases.delete
* @memberOf! ()
*
@@ -4901,6 +6498,62 @@ export namespace admin_directory_v1 {
/**
* directory.groups.aliases.insert
* @desc Add a alias for the group
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.group'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.groups.aliases.insert({
+ * // Email or immutable ID of the group
+ * groupKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "alias": "my_alias",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "primaryEmail": "my_primaryEmail"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alias": "my_alias",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "primaryEmail": "my_primaryEmail"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.groups.aliases.insert
* @memberOf! ()
*
@@ -4973,6 +6626,51 @@ export namespace admin_directory_v1 {
/**
* directory.groups.aliases.list
* @desc List all aliases for a group
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.group',
+ * 'https://www.googleapis.com/auth/admin.directory.group.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.groups.aliases.list({
+ * // Email or immutable ID of the group
+ * groupKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "aliases": [],
+ * // "etag": "my_etag",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.groups.aliases.list
* @memberOf! ()
*
@@ -5097,6 +6795,46 @@ export namespace admin_directory_v1 {
/**
* directory.members.delete
* @desc Remove membership.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.group',
+ * 'https://www.googleapis.com/auth/admin.directory.group.member',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.members.delete({
+ * // Email or immutable ID of the group
+ * groupKey: 'placeholder-value',
+ * // Email or immutable ID of the member
+ * memberKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.members.delete
* @memberOf! ()
*
@@ -5169,6 +6907,60 @@ export namespace admin_directory_v1 {
/**
* directory.members.get
* @desc Retrieve Group Member
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.group',
+ * 'https://www.googleapis.com/auth/admin.directory.group.member',
+ * 'https://www.googleapis.com/auth/admin.directory.group.member.readonly',
+ * 'https://www.googleapis.com/auth/admin.directory.group.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.members.get({
+ * // Email or immutable ID of the group
+ * groupKey: 'placeholder-value',
+ * // Email or immutable ID of the member
+ * memberKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "delivery_settings": "my_delivery_settings",
+ * // "email": "my_email",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "role": "my_role",
+ * // "status": "my_status",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.members.get
* @memberOf! ()
*
@@ -5241,6 +7033,53 @@ export namespace admin_directory_v1 {
/**
* directory.members.hasMember
* @desc Checks whether the given user is a member of the group. Membership can be direct or nested.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.group',
+ * 'https://www.googleapis.com/auth/admin.directory.group.member',
+ * 'https://www.googleapis.com/auth/admin.directory.group.member.readonly',
+ * 'https://www.googleapis.com/auth/admin.directory.group.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.members.hasMember({
+ * // Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
+ * groupKey: 'placeholder-value',
+ * // Identifies the user member in the API request. The value can be the user's primary email address, alias, or unique ID.
+ * memberKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "isMember": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.members.hasMember
* @memberOf! ()
*
@@ -5316,6 +7155,71 @@ export namespace admin_directory_v1 {
/**
* directory.members.insert
* @desc Add user to the specified group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.group',
+ * 'https://www.googleapis.com/auth/admin.directory.group.member',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.members.insert({
+ * // Email or immutable ID of the group
+ * groupKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "delivery_settings": "my_delivery_settings",
+ * // "email": "my_email",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "role": "my_role",
+ * // "status": "my_status",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "delivery_settings": "my_delivery_settings",
+ * // "email": "my_email",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "role": "my_role",
+ * // "status": "my_status",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.members.insert
* @memberOf! ()
*
@@ -5387,6 +7291,62 @@ export namespace admin_directory_v1 {
/**
* directory.members.list
* @desc Retrieve all members in a group (paginated)
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.group',
+ * 'https://www.googleapis.com/auth/admin.directory.group.member',
+ * 'https://www.googleapis.com/auth/admin.directory.group.member.readonly',
+ * 'https://www.googleapis.com/auth/admin.directory.group.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.members.list({
+ * // Email or immutable ID of the group
+ * groupKey: 'placeholder-value',
+ * // Whether to list indirect memberships. Default: false.
+ * includeDerivedMembership: 'placeholder-value',
+ * // Maximum number of results to return. Max allowed value is 200.
+ * maxResults: 'placeholder-value',
+ * // Token to specify next page in the list
+ * pageToken: 'placeholder-value',
+ * // Comma separated role values to filter list results on.
+ * roles: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "members": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.members.list
* @memberOf! ()
*
@@ -5461,6 +7421,73 @@ export namespace admin_directory_v1 {
/**
* directory.members.patch
* @desc Update membership of a user in the specified group. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.group',
+ * 'https://www.googleapis.com/auth/admin.directory.group.member',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.members.patch({
+ * // Email or immutable ID of the group. If ID, it should match with id of group object
+ * groupKey: 'placeholder-value',
+ * // Email or immutable ID of the user. If ID, it should match with id of member object
+ * memberKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "delivery_settings": "my_delivery_settings",
+ * // "email": "my_email",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "role": "my_role",
+ * // "status": "my_status",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "delivery_settings": "my_delivery_settings",
+ * // "email": "my_email",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "role": "my_role",
+ * // "status": "my_status",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.members.patch
* @memberOf! ()
*
@@ -5534,6 +7561,73 @@ export namespace admin_directory_v1 {
/**
* directory.members.update
* @desc Update membership of a user in the specified group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.group',
+ * 'https://www.googleapis.com/auth/admin.directory.group.member',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.members.update({
+ * // Email or immutable ID of the group. If ID, it should match with id of group object
+ * groupKey: 'placeholder-value',
+ * // Email or immutable ID of the user. If ID, it should match with id of member object
+ * memberKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "delivery_settings": "my_delivery_settings",
+ * // "email": "my_email",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "role": "my_role",
+ * // "status": "my_status",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "delivery_settings": "my_delivery_settings",
+ * // "email": "my_email",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "role": "my_role",
+ * // "status": "my_status",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.members.update
* @memberOf! ()
*
@@ -5744,6 +7838,54 @@ export namespace admin_directory_v1 {
/**
* directory.mobiledevices.action
* @desc Take action on Mobile Device
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.device.mobile',
+ * 'https://www.googleapis.com/auth/admin.directory.device.mobile.action',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.mobiledevices.action({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Immutable ID of Mobile Device
+ * resourceId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.mobiledevices.action
* @memberOf! ()
*
@@ -5818,6 +7960,43 @@ export namespace admin_directory_v1 {
/**
* directory.mobiledevices.delete
* @desc Delete Mobile Device
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.device.mobile'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.mobiledevices.delete({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Immutable ID of Mobile Device
+ * resourceId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.mobiledevices.delete
* @memberOf! ()
*
@@ -5891,6 +8070,93 @@ export namespace admin_directory_v1 {
/**
* directory.mobiledevices.get
* @desc Retrieve Mobile Device
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.device.mobile',
+ * 'https://www.googleapis.com/auth/admin.directory.device.mobile.action',
+ * 'https://www.googleapis.com/auth/admin.directory.device.mobile.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.mobiledevices.get({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Restrict information returned to a set of selected fields.
+ * projection: 'placeholder-value',
+ * // Immutable ID of Mobile Device
+ * resourceId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adbStatus": false,
+ * // "applications": [],
+ * // "basebandVersion": "my_basebandVersion",
+ * // "bootloaderVersion": "my_bootloaderVersion",
+ * // "brand": "my_brand",
+ * // "buildNumber": "my_buildNumber",
+ * // "defaultLanguage": "my_defaultLanguage",
+ * // "developerOptionsStatus": false,
+ * // "deviceCompromisedStatus": "my_deviceCompromisedStatus",
+ * // "deviceId": "my_deviceId",
+ * // "devicePasswordStatus": "my_devicePasswordStatus",
+ * // "email": [],
+ * // "encryptionStatus": "my_encryptionStatus",
+ * // "etag": "my_etag",
+ * // "firstSync": "my_firstSync",
+ * // "hardware": "my_hardware",
+ * // "hardwareId": "my_hardwareId",
+ * // "imei": "my_imei",
+ * // "kernelVersion": "my_kernelVersion",
+ * // "kind": "my_kind",
+ * // "lastSync": "my_lastSync",
+ * // "managedAccountIsOnOwnerProfile": false,
+ * // "manufacturer": "my_manufacturer",
+ * // "meid": "my_meid",
+ * // "model": "my_model",
+ * // "name": [],
+ * // "networkOperator": "my_networkOperator",
+ * // "os": "my_os",
+ * // "otherAccountsInfo": [],
+ * // "privilege": "my_privilege",
+ * // "releaseVersion": "my_releaseVersion",
+ * // "resourceId": "my_resourceId",
+ * // "securityPatchLevel": "my_securityPatchLevel",
+ * // "serialNumber": "my_serialNumber",
+ * // "status": "my_status",
+ * // "supportsWorkProfile": false,
+ * // "type": "my_type",
+ * // "unknownSourcesStatus": false,
+ * // "userAgent": "my_userAgent",
+ * // "wifiMacAddress": "my_wifiMacAddress"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.mobiledevices.get
* @memberOf! ()
*
@@ -5967,6 +8233,65 @@ export namespace admin_directory_v1 {
/**
* directory.mobiledevices.list
* @desc Retrieve all Mobile Devices of a customer (paginated)
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.device.mobile',
+ * 'https://www.googleapis.com/auth/admin.directory.device.mobile.action',
+ * 'https://www.googleapis.com/auth/admin.directory.device.mobile.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.mobiledevices.list({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Maximum number of results to return. Max allowed value is 100.
+ * maxResults: 'placeholder-value',
+ * // Column to use for sorting results
+ * orderBy: 'placeholder-value',
+ * // Token to specify next page in the list
+ * pageToken: 'placeholder-value',
+ * // Restrict information returned to a set of selected fields.
+ * projection: 'placeholder-value',
+ * // Search string in the format given at http://support.google.com/a/bin/answer.py?answer=1408863#search
+ * query: 'placeholder-value',
+ * // Whether to return results in ascending or descending order. Only of use when orderBy is also used
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "mobiledevices": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.mobiledevices.list
* @memberOf! ()
*
@@ -6148,6 +8473,43 @@ export namespace admin_directory_v1 {
/**
* directory.notifications.delete
* @desc Deletes a notification
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.notifications'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.notifications.delete({
+ * // The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource.
+ * customer: 'placeholder-value',
+ * // The unique ID of the notification.
+ * notificationId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.notifications.delete
* @memberOf! ()
*
@@ -6221,6 +8583,55 @@ export namespace admin_directory_v1 {
/**
* directory.notifications.get
* @desc Retrieves a notification.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.notifications'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.notifications.get({
+ * // The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource.
+ * customer: 'placeholder-value',
+ * // The unique ID of the notification.
+ * notificationId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "body": "my_body",
+ * // "etag": "my_etag",
+ * // "fromAddress": "my_fromAddress",
+ * // "isUnread": false,
+ * // "kind": "my_kind",
+ * // "notificationId": "my_notificationId",
+ * // "sendTime": "my_sendTime",
+ * // "subject": "my_subject"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.notifications.get
* @memberOf! ()
*
@@ -6296,6 +8707,56 @@ export namespace admin_directory_v1 {
/**
* directory.notifications.list
* @desc Retrieves a list of notifications.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.notifications'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.notifications.list({
+ * // The unique ID for the customer's G Suite account.
+ * customer: 'placeholder-value',
+ * // The ISO 639-1 code of the language notifications are returned in. The default is English (en).
+ * language: 'placeholder-value',
+ * // Maximum number of notifications to return per page. The default is 100.
+ * maxResults: 'placeholder-value',
+ * // The token to specify the page of results to retrieve.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "unreadNotificationsCount": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.notifications.list
* @memberOf! ()
*
@@ -6372,6 +8833,70 @@ export namespace admin_directory_v1 {
/**
* directory.notifications.patch
* @desc Updates a notification. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.notifications'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.notifications.patch({
+ * // The unique ID for the customer's G Suite account.
+ * customer: 'placeholder-value',
+ * // The unique ID of the notification.
+ * notificationId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "body": "my_body",
+ * // "etag": "my_etag",
+ * // "fromAddress": "my_fromAddress",
+ * // "isUnread": false,
+ * // "kind": "my_kind",
+ * // "notificationId": "my_notificationId",
+ * // "sendTime": "my_sendTime",
+ * // "subject": "my_subject"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "body": "my_body",
+ * // "etag": "my_etag",
+ * // "fromAddress": "my_fromAddress",
+ * // "isUnread": false,
+ * // "kind": "my_kind",
+ * // "notificationId": "my_notificationId",
+ * // "sendTime": "my_sendTime",
+ * // "subject": "my_subject"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.notifications.patch
* @memberOf! ()
*
@@ -6448,6 +8973,70 @@ export namespace admin_directory_v1 {
/**
* directory.notifications.update
* @desc Updates a notification.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.notifications'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.notifications.update({
+ * // The unique ID for the customer's G Suite account.
+ * customer: 'placeholder-value',
+ * // The unique ID of the notification.
+ * notificationId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "body": "my_body",
+ * // "etag": "my_etag",
+ * // "fromAddress": "my_fromAddress",
+ * // "isUnread": false,
+ * // "kind": "my_kind",
+ * // "notificationId": "my_notificationId",
+ * // "sendTime": "my_sendTime",
+ * // "subject": "my_subject"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "body": "my_body",
+ * // "etag": "my_etag",
+ * // "fromAddress": "my_fromAddress",
+ * // "isUnread": false,
+ * // "kind": "my_kind",
+ * // "notificationId": "my_notificationId",
+ * // "sendTime": "my_sendTime",
+ * // "subject": "my_subject"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.notifications.update
* @memberOf! ()
*
@@ -6630,6 +9219,43 @@ export namespace admin_directory_v1 {
/**
* directory.orgunits.delete
* @desc Remove organizational unit
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.orgunit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.orgunits.delete({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Full path of the organizational unit or its ID
+ * orgUnitPath: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.orgunits.delete
* @memberOf! ()
*
@@ -6702,6 +9328,59 @@ export namespace admin_directory_v1 {
/**
* directory.orgunits.get
* @desc Retrieve organizational unit
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.orgunit',
+ * 'https://www.googleapis.com/auth/admin.directory.orgunit.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.orgunits.get({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Full path of the organizational unit or its ID
+ * orgUnitPath: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "blockInheritance": false,
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "orgUnitId": "my_orgUnitId",
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "parentOrgUnitId": "my_parentOrgUnitId",
+ * // "parentOrgUnitPath": "my_parentOrgUnitPath"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.orgunits.get
* @memberOf! ()
*
@@ -6774,6 +9453,70 @@ export namespace admin_directory_v1 {
/**
* directory.orgunits.insert
* @desc Add organizational unit
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.orgunit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.orgunits.insert({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "blockInheritance": false,
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "orgUnitId": "my_orgUnitId",
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "parentOrgUnitId": "my_parentOrgUnitId",
+ * // "parentOrgUnitPath": "my_parentOrgUnitPath"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "blockInheritance": false,
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "orgUnitId": "my_orgUnitId",
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "parentOrgUnitId": "my_parentOrgUnitId",
+ * // "parentOrgUnitPath": "my_parentOrgUnitPath"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.orgunits.insert
* @memberOf! ()
*
@@ -6845,6 +9588,55 @@ export namespace admin_directory_v1 {
/**
* directory.orgunits.list
* @desc Retrieve all organizational units
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.orgunit',
+ * 'https://www.googleapis.com/auth/admin.directory.orgunit.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.orgunits.list({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // the URL-encoded organizational unit's path or its ID
+ * orgUnitPath: 'placeholder-value',
+ * // Whether to return all sub-organizations or just immediate children
+ * type: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "organizationUnits": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.orgunits.list
* @memberOf! ()
*
@@ -6917,6 +9709,72 @@ export namespace admin_directory_v1 {
/**
* directory.orgunits.patch
* @desc Update organizational unit. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.orgunit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.orgunits.patch({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Full path of the organizational unit or its ID
+ * orgUnitPath: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "blockInheritance": false,
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "orgUnitId": "my_orgUnitId",
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "parentOrgUnitId": "my_parentOrgUnitId",
+ * // "parentOrgUnitPath": "my_parentOrgUnitPath"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "blockInheritance": false,
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "orgUnitId": "my_orgUnitId",
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "parentOrgUnitId": "my_parentOrgUnitId",
+ * // "parentOrgUnitPath": "my_parentOrgUnitPath"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.orgunits.patch
* @memberOf! ()
*
@@ -6990,6 +9848,72 @@ export namespace admin_directory_v1 {
/**
* directory.orgunits.update
* @desc Update organizational unit
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.orgunit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.orgunits.update({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Full path of the organizational unit or its ID
+ * orgUnitPath: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "blockInheritance": false,
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "orgUnitId": "my_orgUnitId",
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "parentOrgUnitId": "my_parentOrgUnitId",
+ * // "parentOrgUnitPath": "my_parentOrgUnitPath"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "blockInheritance": false,
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "orgUnitId": "my_orgUnitId",
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "parentOrgUnitId": "my_parentOrgUnitId",
+ * // "parentOrgUnitPath": "my_parentOrgUnitPath"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.orgunits.update
* @memberOf! ()
*
@@ -7176,6 +10100,51 @@ export namespace admin_directory_v1 {
/**
* directory.privileges.list
* @desc Retrieves a paginated list of all privileges for a customer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.rolemanagement',
+ * 'https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.privileges.list({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.privileges.list
* @memberOf! ()
*
@@ -7281,6 +10250,45 @@ export namespace admin_directory_v1 {
/**
* directory.resources.buildings.delete
* @desc Deletes a building.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.buildings.delete({
+ * // The ID of the building to delete.
+ * buildingId: 'placeholder-value',
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.buildings.delete
* @memberOf! ()
*
@@ -7354,6 +10362,58 @@ export namespace admin_directory_v1 {
/**
* directory.resources.buildings.get
* @desc Retrieves a building.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.buildings.get({
+ * // The unique ID of the building to retrieve.
+ * buildingId: 'placeholder-value',
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": {},
+ * // "buildingId": "my_buildingId",
+ * // "buildingName": "my_buildingName",
+ * // "coordinates": {},
+ * // "description": "my_description",
+ * // "etags": "my_etags",
+ * // "floorNames": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.buildings.get
* @memberOf! ()
*
@@ -7427,6 +10487,72 @@ export namespace admin_directory_v1 {
/**
* directory.resources.buildings.insert
* @desc Inserts a building.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.buildings.insert({
+ * // Source from which Building.coordinates are derived.
+ * coordinatesSource: 'placeholder-value',
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": {},
+ * // "buildingId": "my_buildingId",
+ * // "buildingName": "my_buildingName",
+ * // "coordinates": {},
+ * // "description": "my_description",
+ * // "etags": "my_etags",
+ * // "floorNames": [],
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": {},
+ * // "buildingId": "my_buildingId",
+ * // "buildingName": "my_buildingName",
+ * // "coordinates": {},
+ * // "description": "my_description",
+ * // "etags": "my_etags",
+ * // "floorNames": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.buildings.insert
* @memberOf! ()
*
@@ -7501,6 +10627,56 @@ export namespace admin_directory_v1 {
/**
* directory.resources.buildings.list
* @desc Retrieves a list of buildings for an account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.buildings.list({
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Token to specify the next page in the list.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "buildings": [],
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.buildings.list
* @memberOf! ()
*
@@ -7577,6 +10753,74 @@ export namespace admin_directory_v1 {
/**
* directory.resources.buildings.patch
* @desc Updates a building. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.buildings.patch({
+ * // The ID of the building to update.
+ * buildingId: 'placeholder-value',
+ * // Source from which Building.coordinates are derived.
+ * coordinatesSource: 'placeholder-value',
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": {},
+ * // "buildingId": "my_buildingId",
+ * // "buildingName": "my_buildingName",
+ * // "coordinates": {},
+ * // "description": "my_description",
+ * // "etags": "my_etags",
+ * // "floorNames": [],
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": {},
+ * // "buildingId": "my_buildingId",
+ * // "buildingName": "my_buildingName",
+ * // "coordinates": {},
+ * // "description": "my_description",
+ * // "etags": "my_etags",
+ * // "floorNames": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.buildings.patch
* @memberOf! ()
*
@@ -7652,6 +10896,74 @@ export namespace admin_directory_v1 {
/**
* directory.resources.buildings.update
* @desc Updates a building.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.buildings.update({
+ * // The ID of the building to update.
+ * buildingId: 'placeholder-value',
+ * // Source from which Building.coordinates are derived.
+ * coordinatesSource: 'placeholder-value',
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": {},
+ * // "buildingId": "my_buildingId",
+ * // "buildingName": "my_buildingName",
+ * // "coordinates": {},
+ * // "description": "my_description",
+ * // "etags": "my_etags",
+ * // "floorNames": [],
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": {},
+ * // "buildingId": "my_buildingId",
+ * // "buildingName": "my_buildingName",
+ * // "coordinates": {},
+ * // "description": "my_description",
+ * // "etags": "my_etags",
+ * // "floorNames": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.buildings.update
* @memberOf! ()
*
@@ -7858,6 +11170,45 @@ export namespace admin_directory_v1 {
/**
* directory.resources.calendars.delete
* @desc Deletes a calendar resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.calendars.delete({
+ * // The unique ID of the calendar resource to delete.
+ * calendarResourceId: 'placeholder-value',
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.calendars.delete
* @memberOf! ()
*
@@ -7931,6 +11282,65 @@ export namespace admin_directory_v1 {
/**
* directory.resources.calendars.get
* @desc Retrieves a calendar resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.calendars.get({
+ * // The unique ID of the calendar resource to retrieve.
+ * calendarResourceId: 'placeholder-value',
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "buildingId": "my_buildingId",
+ * // "capacity": 0,
+ * // "etags": "my_etags",
+ * // "featureInstances": {},
+ * // "floorName": "my_floorName",
+ * // "floorSection": "my_floorSection",
+ * // "generatedResourceName": "my_generatedResourceName",
+ * // "kind": "my_kind",
+ * // "resourceCategory": "my_resourceCategory",
+ * // "resourceDescription": "my_resourceDescription",
+ * // "resourceEmail": "my_resourceEmail",
+ * // "resourceId": "my_resourceId",
+ * // "resourceName": "my_resourceName",
+ * // "resourceType": "my_resourceType",
+ * // "userVisibleDescription": "my_userVisibleDescription"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.calendars.get
* @memberOf! ()
*
@@ -8006,6 +11416,84 @@ export namespace admin_directory_v1 {
/**
* directory.resources.calendars.insert
* @desc Inserts a calendar resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.calendars.insert({
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "buildingId": "my_buildingId",
+ * // "capacity": 0,
+ * // "etags": "my_etags",
+ * // "featureInstances": {},
+ * // "floorName": "my_floorName",
+ * // "floorSection": "my_floorSection",
+ * // "generatedResourceName": "my_generatedResourceName",
+ * // "kind": "my_kind",
+ * // "resourceCategory": "my_resourceCategory",
+ * // "resourceDescription": "my_resourceDescription",
+ * // "resourceEmail": "my_resourceEmail",
+ * // "resourceId": "my_resourceId",
+ * // "resourceName": "my_resourceName",
+ * // "resourceType": "my_resourceType",
+ * // "userVisibleDescription": "my_userVisibleDescription"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "buildingId": "my_buildingId",
+ * // "capacity": 0,
+ * // "etags": "my_etags",
+ * // "featureInstances": {},
+ * // "floorName": "my_floorName",
+ * // "floorSection": "my_floorSection",
+ * // "generatedResourceName": "my_generatedResourceName",
+ * // "kind": "my_kind",
+ * // "resourceCategory": "my_resourceCategory",
+ * // "resourceDescription": "my_resourceDescription",
+ * // "resourceEmail": "my_resourceEmail",
+ * // "resourceId": "my_resourceId",
+ * // "resourceName": "my_resourceName",
+ * // "resourceType": "my_resourceType",
+ * // "userVisibleDescription": "my_userVisibleDescription"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.calendars.insert
* @memberOf! ()
*
@@ -8081,6 +11569,60 @@ export namespace admin_directory_v1 {
/**
* directory.resources.calendars.list
* @desc Retrieves a list of calendar resources for an account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.calendars.list({
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Field(s) to sort results by in either ascending or descending order. Supported fields include resourceId, resourceName, capacity, buildingId, and floorName. If no order is specified, defaults to ascending. Should be of the form "field [asc|desc], field [asc|desc], ...". For example buildingId, capacity desc would return results sorted first by buildingId in ascending order then by capacity in descending order.
+ * orderBy: 'placeholder-value',
+ * // Token to specify the next page in the list.
+ * pageToken: 'placeholder-value',
+ * // String query used to filter results. Should be of the form "field operator value" where field can be any of supported fields and operators can be any of supported operations. Operators include '=' for exact match and ':' for prefix match or HAS match where applicable. For prefix match, the value should always be followed by a *. Supported fields include generatedResourceName, name, buildingId, featureInstances.feature.name. For example buildingId=US-NYC-9TH AND featureInstances.feature.name:Phone.
+ * query: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.calendars.list
* @memberOf! ()
*
@@ -8159,6 +11701,86 @@ export namespace admin_directory_v1 {
/**
* directory.resources.calendars.patch
* @desc Updates a calendar resource. This method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.calendars.patch({
+ * // The unique ID of the calendar resource to update.
+ * calendarResourceId: 'placeholder-value',
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "buildingId": "my_buildingId",
+ * // "capacity": 0,
+ * // "etags": "my_etags",
+ * // "featureInstances": {},
+ * // "floorName": "my_floorName",
+ * // "floorSection": "my_floorSection",
+ * // "generatedResourceName": "my_generatedResourceName",
+ * // "kind": "my_kind",
+ * // "resourceCategory": "my_resourceCategory",
+ * // "resourceDescription": "my_resourceDescription",
+ * // "resourceEmail": "my_resourceEmail",
+ * // "resourceId": "my_resourceId",
+ * // "resourceName": "my_resourceName",
+ * // "resourceType": "my_resourceType",
+ * // "userVisibleDescription": "my_userVisibleDescription"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "buildingId": "my_buildingId",
+ * // "capacity": 0,
+ * // "etags": "my_etags",
+ * // "featureInstances": {},
+ * // "floorName": "my_floorName",
+ * // "floorSection": "my_floorSection",
+ * // "generatedResourceName": "my_generatedResourceName",
+ * // "kind": "my_kind",
+ * // "resourceCategory": "my_resourceCategory",
+ * // "resourceDescription": "my_resourceDescription",
+ * // "resourceEmail": "my_resourceEmail",
+ * // "resourceId": "my_resourceId",
+ * // "resourceName": "my_resourceName",
+ * // "resourceType": "my_resourceType",
+ * // "userVisibleDescription": "my_userVisibleDescription"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.calendars.patch
* @memberOf! ()
*
@@ -8235,6 +11857,86 @@ export namespace admin_directory_v1 {
/**
* directory.resources.calendars.update
* @desc Updates a calendar resource. This method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.calendars.update({
+ * // The unique ID of the calendar resource to update.
+ * calendarResourceId: 'placeholder-value',
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "buildingId": "my_buildingId",
+ * // "capacity": 0,
+ * // "etags": "my_etags",
+ * // "featureInstances": {},
+ * // "floorName": "my_floorName",
+ * // "floorSection": "my_floorSection",
+ * // "generatedResourceName": "my_generatedResourceName",
+ * // "kind": "my_kind",
+ * // "resourceCategory": "my_resourceCategory",
+ * // "resourceDescription": "my_resourceDescription",
+ * // "resourceEmail": "my_resourceEmail",
+ * // "resourceId": "my_resourceId",
+ * // "resourceName": "my_resourceName",
+ * // "resourceType": "my_resourceType",
+ * // "userVisibleDescription": "my_userVisibleDescription"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "buildingId": "my_buildingId",
+ * // "capacity": 0,
+ * // "etags": "my_etags",
+ * // "featureInstances": {},
+ * // "floorName": "my_floorName",
+ * // "floorSection": "my_floorSection",
+ * // "generatedResourceName": "my_generatedResourceName",
+ * // "kind": "my_kind",
+ * // "resourceCategory": "my_resourceCategory",
+ * // "resourceDescription": "my_resourceDescription",
+ * // "resourceEmail": "my_resourceEmail",
+ * // "resourceId": "my_resourceId",
+ * // "resourceName": "my_resourceName",
+ * // "resourceType": "my_resourceType",
+ * // "userVisibleDescription": "my_userVisibleDescription"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.calendars.update
* @memberOf! ()
*
@@ -8438,6 +12140,45 @@ export namespace admin_directory_v1 {
/**
* directory.resources.features.delete
* @desc Deletes a feature.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.features.delete({
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ * // The unique ID of the feature to delete.
+ * featureKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.features.delete
* @memberOf! ()
*
@@ -8511,6 +12252,53 @@ export namespace admin_directory_v1 {
/**
* directory.resources.features.get
* @desc Retrieves a feature.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.features.get({
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ * // The unique ID of the feature to retrieve.
+ * featureKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etags": "my_etags",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.features.get
* @memberOf! ()
*
@@ -8584,6 +12372,60 @@ export namespace admin_directory_v1 {
/**
* directory.resources.features.insert
* @desc Inserts a feature.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.features.insert({
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "etags": "my_etags",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etags": "my_etags",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.features.insert
* @memberOf! ()
*
@@ -8657,6 +12499,56 @@ export namespace admin_directory_v1 {
/**
* directory.resources.features.list
* @desc Retrieves a list of features for an account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.features.list({
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Token to specify the next page in the list.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "features": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.features.list
* @memberOf! ()
*
@@ -8731,6 +12623,62 @@ export namespace admin_directory_v1 {
/**
* directory.resources.features.patch
* @desc Updates a feature. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.features.patch({
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ * // The unique ID of the feature to update.
+ * featureKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "etags": "my_etags",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etags": "my_etags",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.features.patch
* @memberOf! ()
*
@@ -8805,6 +12753,53 @@ export namespace admin_directory_v1 {
/**
* directory.resources.features.rename
* @desc Renames a feature.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.features.rename({
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ * // The unique ID of the feature to rename.
+ * oldName: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "newName": "my_newName"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.features.rename
* @memberOf! ()
*
@@ -8879,6 +12874,62 @@ export namespace admin_directory_v1 {
/**
* directory.resources.features.update
* @desc Updates a feature.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.resource.calendar',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.resources.features.update({
+ * // The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
+ * customer: 'placeholder-value',
+ * // The unique ID of the feature to update.
+ * featureKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "etags": "my_etags",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etags": "my_etags",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.resources.features.update
* @memberOf! ()
*
@@ -9093,6 +13144,43 @@ export namespace admin_directory_v1 {
/**
* directory.roleAssignments.delete
* @desc Deletes a role assignment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.rolemanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.roleAssignments.delete({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ * // Immutable ID of the role assignment.
+ * roleAssignmentId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.roleAssignments.delete
* @memberOf! ()
*
@@ -9166,6 +13254,57 @@ export namespace admin_directory_v1 {
/**
* directory.roleAssignments.get
* @desc Retrieve a role assignment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.rolemanagement',
+ * 'https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.roleAssignments.get({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ * // Immutable ID of the role assignment.
+ * roleAssignmentId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assignedTo": "my_assignedTo",
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "orgUnitId": "my_orgUnitId",
+ * // "roleAssignmentId": "my_roleAssignmentId",
+ * // "roleId": "my_roleId",
+ * // "scopeType": "my_scopeType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.roleAssignments.get
* @memberOf! ()
*
@@ -9241,6 +13380,66 @@ export namespace admin_directory_v1 {
/**
* directory.roleAssignments.insert
* @desc Creates a role assignment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.rolemanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.roleAssignments.insert({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "assignedTo": "my_assignedTo",
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "orgUnitId": "my_orgUnitId",
+ * // "roleAssignmentId": "my_roleAssignmentId",
+ * // "roleId": "my_roleId",
+ * // "scopeType": "my_scopeType"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assignedTo": "my_assignedTo",
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "orgUnitId": "my_orgUnitId",
+ * // "roleAssignmentId": "my_roleAssignmentId",
+ * // "roleId": "my_roleId",
+ * // "scopeType": "my_scopeType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.roleAssignments.insert
* @memberOf! ()
*
@@ -9316,6 +13515,60 @@ export namespace admin_directory_v1 {
/**
* directory.roleAssignments.list
* @desc Retrieves a paginated list of all roleAssignments.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.rolemanagement',
+ * 'https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.roleAssignments.list({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Token to specify the next page in the list.
+ * pageToken: 'placeholder-value',
+ * // Immutable ID of a role. If included in the request, returns only role assignments containing this role ID.
+ * roleId: 'placeholder-value',
+ * // The user's primary email address, alias email address, or unique user ID. If included in the request, returns role assignments only for this user.
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.roleAssignments.list
* @memberOf! ()
*
@@ -9479,6 +13732,43 @@ export namespace admin_directory_v1 {
/**
* directory.roles.delete
* @desc Deletes a role.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.rolemanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.roles.delete({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ * // Immutable ID of the role.
+ * roleId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.roles.delete
* @memberOf! ()
*
@@ -9550,6 +13840,58 @@ export namespace admin_directory_v1 {
/**
* directory.roles.get
* @desc Retrieves a role.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.rolemanagement',
+ * 'https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.roles.get({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ * // Immutable ID of the role.
+ * roleId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "isSuperAdminRole": false,
+ * // "isSystemRole": false,
+ * // "kind": "my_kind",
+ * // "roleDescription": "my_roleDescription",
+ * // "roleId": "my_roleId",
+ * // "roleName": "my_roleName",
+ * // "rolePrivileges": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.roles.get
* @memberOf! ()
*
@@ -9621,6 +13963,68 @@ export namespace admin_directory_v1 {
/**
* directory.roles.insert
* @desc Creates a role.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.rolemanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.roles.insert({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "etag": "my_etag",
+ * // "isSuperAdminRole": false,
+ * // "isSystemRole": false,
+ * // "kind": "my_kind",
+ * // "roleDescription": "my_roleDescription",
+ * // "roleId": "my_roleId",
+ * // "roleName": "my_roleName",
+ * // "rolePrivileges": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "isSuperAdminRole": false,
+ * // "isSystemRole": false,
+ * // "kind": "my_kind",
+ * // "roleDescription": "my_roleDescription",
+ * // "roleId": "my_roleId",
+ * // "roleName": "my_roleName",
+ * // "rolePrivileges": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.roles.insert
* @memberOf! ()
*
@@ -9692,6 +14096,56 @@ export namespace admin_directory_v1 {
/**
* directory.roles.list
* @desc Retrieves a paginated list of all the roles in a domain.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.rolemanagement',
+ * 'https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.roles.list({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Token to specify the next page in the list.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.roles.list
* @memberOf! ()
*
@@ -9764,6 +14218,70 @@ export namespace admin_directory_v1 {
/**
* directory.roles.patch
* @desc Updates a role. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.rolemanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.roles.patch({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ * // Immutable ID of the role.
+ * roleId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "etag": "my_etag",
+ * // "isSuperAdminRole": false,
+ * // "isSystemRole": false,
+ * // "kind": "my_kind",
+ * // "roleDescription": "my_roleDescription",
+ * // "roleId": "my_roleId",
+ * // "roleName": "my_roleName",
+ * // "rolePrivileges": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "isSuperAdminRole": false,
+ * // "isSystemRole": false,
+ * // "kind": "my_kind",
+ * // "roleDescription": "my_roleDescription",
+ * // "roleId": "my_roleId",
+ * // "roleName": "my_roleName",
+ * // "rolePrivileges": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.roles.patch
* @memberOf! ()
*
@@ -9836,6 +14354,70 @@ export namespace admin_directory_v1 {
/**
* directory.roles.update
* @desc Updates a role.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.rolemanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.roles.update({
+ * // Immutable ID of the G Suite account.
+ * customer: 'placeholder-value',
+ * // Immutable ID of the role.
+ * roleId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "etag": "my_etag",
+ * // "isSuperAdminRole": false,
+ * // "isSystemRole": false,
+ * // "kind": "my_kind",
+ * // "roleDescription": "my_roleDescription",
+ * // "roleId": "my_roleId",
+ * // "roleName": "my_roleName",
+ * // "rolePrivileges": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "isSuperAdminRole": false,
+ * // "isSystemRole": false,
+ * // "kind": "my_kind",
+ * // "roleDescription": "my_roleDescription",
+ * // "roleId": "my_roleId",
+ * // "roleName": "my_roleName",
+ * // "rolePrivileges": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.roles.update
* @memberOf! ()
*
@@ -10021,6 +14603,43 @@ export namespace admin_directory_v1 {
/**
* directory.schemas.delete
* @desc Delete schema
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.userschema'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.schemas.delete({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Name or immutable ID of the schema
+ * schemaKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.schemas.delete
* @memberOf! ()
*
@@ -10093,6 +14712,56 @@ export namespace admin_directory_v1 {
/**
* directory.schemas.get
* @desc Retrieve schema
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.userschema',
+ * 'https://www.googleapis.com/auth/admin.directory.userschema.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.schemas.get({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Name or immutable ID of the schema
+ * schemaKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "etag": "my_etag",
+ * // "fields": [],
+ * // "kind": "my_kind",
+ * // "schemaId": "my_schemaId",
+ * // "schemaName": "my_schemaName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.schemas.get
* @memberOf! ()
*
@@ -10165,6 +14834,64 @@ export namespace admin_directory_v1 {
/**
* directory.schemas.insert
* @desc Create schema.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.userschema'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.schemas.insert({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "displayName": "my_displayName",
+ * // "etag": "my_etag",
+ * // "fields": [],
+ * // "kind": "my_kind",
+ * // "schemaId": "my_schemaId",
+ * // "schemaName": "my_schemaName"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "etag": "my_etag",
+ * // "fields": [],
+ * // "kind": "my_kind",
+ * // "schemaId": "my_schemaId",
+ * // "schemaName": "my_schemaName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.schemas.insert
* @memberOf! ()
*
@@ -10236,6 +14963,51 @@ export namespace admin_directory_v1 {
/**
* directory.schemas.list
* @desc Retrieve all schemas for a customer
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.userschema',
+ * 'https://www.googleapis.com/auth/admin.directory.userschema.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.schemas.list({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "schemas": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.schemas.list
* @memberOf! ()
*
@@ -10306,6 +15078,66 @@ export namespace admin_directory_v1 {
/**
* directory.schemas.patch
* @desc Update schema. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.userschema'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.schemas.patch({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Name or immutable ID of the schema.
+ * schemaKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "displayName": "my_displayName",
+ * // "etag": "my_etag",
+ * // "fields": [],
+ * // "kind": "my_kind",
+ * // "schemaId": "my_schemaId",
+ * // "schemaName": "my_schemaName"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "etag": "my_etag",
+ * // "fields": [],
+ * // "kind": "my_kind",
+ * // "schemaId": "my_schemaId",
+ * // "schemaName": "my_schemaName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.schemas.patch
* @memberOf! ()
*
@@ -10379,6 +15211,66 @@ export namespace admin_directory_v1 {
/**
* directory.schemas.update
* @desc Update schema
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.userschema'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.schemas.update({
+ * // Immutable ID of the G Suite account
+ * customerId: 'placeholder-value',
+ * // Name or immutable ID of the schema.
+ * schemaKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "displayName": "my_displayName",
+ * // "etag": "my_etag",
+ * // "fields": [],
+ * // "kind": "my_kind",
+ * // "schemaId": "my_schemaId",
+ * // "schemaName": "my_schemaName"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "etag": "my_etag",
+ * // "fields": [],
+ * // "kind": "my_kind",
+ * // "schemaId": "my_schemaId",
+ * // "schemaName": "my_schemaName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.schemas.update
* @memberOf! ()
*
@@ -10557,6 +15449,43 @@ export namespace admin_directory_v1 {
/**
* directory.tokens.delete
* @desc Delete all access tokens issued by a user for an application.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user.security'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.tokens.delete({
+ * // The Client ID of the application the token is issued to.
+ * clientId: 'placeholder-value',
+ * // Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.tokens.delete
* @memberOf! ()
*
@@ -10628,6 +15557,55 @@ export namespace admin_directory_v1 {
/**
* directory.tokens.get
* @desc Get information about an access token issued by a user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user.security'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.tokens.get({
+ * // The Client ID of the application the token is issued to.
+ * clientId: 'placeholder-value',
+ * // Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "anonymous": false,
+ * // "clientId": "my_clientId",
+ * // "displayText": "my_displayText",
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "nativeApp": false,
+ * // "scopes": [],
+ * // "userKey": "my_userKey"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.tokens.get
* @memberOf! ()
*
@@ -10699,6 +15677,48 @@ export namespace admin_directory_v1 {
/**
* directory.tokens.list
* @desc Returns the set of tokens specified user has issued to 3rd party applications.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user.security'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.tokens.list({
+ * // Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.tokens.list
* @memberOf! ()
*
@@ -10822,6 +15842,41 @@ export namespace admin_directory_v1 {
/**
* directory.users.delete
* @desc Delete user
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.users.delete({
+ * // Email or immutable ID of the user
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.users.delete
* @memberOf! ()
*
@@ -10893,6 +15948,100 @@ export namespace admin_directory_v1 {
/**
* directory.users.get
* @desc retrieve user
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.user',
+ * 'https://www.googleapis.com/auth/admin.directory.user.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.users.get({
+ * // Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.
+ * customFieldMask: 'placeholder-value',
+ * // What subset of fields to fetch for this user.
+ * projection: 'placeholder-value',
+ * // Email or immutable ID of the user
+ * userKey: 'placeholder-value',
+ * // Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.
+ * viewType: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "addresses": {},
+ * // "agreedToTerms": false,
+ * // "aliases": [],
+ * // "archived": false,
+ * // "changePasswordAtNextLogin": false,
+ * // "creationTime": "my_creationTime",
+ * // "customSchemas": {},
+ * // "customerId": "my_customerId",
+ * // "deletionTime": "my_deletionTime",
+ * // "emails": {},
+ * // "etag": "my_etag",
+ * // "externalIds": {},
+ * // "gender": {},
+ * // "hashFunction": "my_hashFunction",
+ * // "id": "my_id",
+ * // "ims": {},
+ * // "includeInGlobalAddressList": false,
+ * // "ipWhitelisted": false,
+ * // "isAdmin": false,
+ * // "isDelegatedAdmin": false,
+ * // "isEnforcedIn2Sv": false,
+ * // "isEnrolledIn2Sv": false,
+ * // "isMailboxSetup": false,
+ * // "keywords": {},
+ * // "kind": "my_kind",
+ * // "languages": {},
+ * // "lastLoginTime": "my_lastLoginTime",
+ * // "locations": {},
+ * // "name": {},
+ * // "nonEditableAliases": [],
+ * // "notes": {},
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "organizations": {},
+ * // "password": "my_password",
+ * // "phones": {},
+ * // "posixAccounts": {},
+ * // "primaryEmail": "my_primaryEmail",
+ * // "recoveryEmail": "my_recoveryEmail",
+ * // "recoveryPhone": "my_recoveryPhone",
+ * // "relations": {},
+ * // "sshPublicKeys": {},
+ * // "suspended": false,
+ * // "suspensionReason": "my_suspensionReason",
+ * // "thumbnailPhotoEtag": "my_thumbnailPhotoEtag",
+ * // "thumbnailPhotoUrl": "my_thumbnailPhotoUrl",
+ * // "websites": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.users.get
* @memberOf! ()
*
@@ -10967,6 +16116,141 @@ export namespace admin_directory_v1 {
/**
* directory.users.insert
* @desc create user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.users.insert({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "addresses": {},
+ * // "agreedToTerms": false,
+ * // "aliases": [],
+ * // "archived": false,
+ * // "changePasswordAtNextLogin": false,
+ * // "creationTime": "my_creationTime",
+ * // "customSchemas": {},
+ * // "customerId": "my_customerId",
+ * // "deletionTime": "my_deletionTime",
+ * // "emails": {},
+ * // "etag": "my_etag",
+ * // "externalIds": {},
+ * // "gender": {},
+ * // "hashFunction": "my_hashFunction",
+ * // "id": "my_id",
+ * // "ims": {},
+ * // "includeInGlobalAddressList": false,
+ * // "ipWhitelisted": false,
+ * // "isAdmin": false,
+ * // "isDelegatedAdmin": false,
+ * // "isEnforcedIn2Sv": false,
+ * // "isEnrolledIn2Sv": false,
+ * // "isMailboxSetup": false,
+ * // "keywords": {},
+ * // "kind": "my_kind",
+ * // "languages": {},
+ * // "lastLoginTime": "my_lastLoginTime",
+ * // "locations": {},
+ * // "name": {},
+ * // "nonEditableAliases": [],
+ * // "notes": {},
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "organizations": {},
+ * // "password": "my_password",
+ * // "phones": {},
+ * // "posixAccounts": {},
+ * // "primaryEmail": "my_primaryEmail",
+ * // "recoveryEmail": "my_recoveryEmail",
+ * // "recoveryPhone": "my_recoveryPhone",
+ * // "relations": {},
+ * // "sshPublicKeys": {},
+ * // "suspended": false,
+ * // "suspensionReason": "my_suspensionReason",
+ * // "thumbnailPhotoEtag": "my_thumbnailPhotoEtag",
+ * // "thumbnailPhotoUrl": "my_thumbnailPhotoUrl",
+ * // "websites": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "addresses": {},
+ * // "agreedToTerms": false,
+ * // "aliases": [],
+ * // "archived": false,
+ * // "changePasswordAtNextLogin": false,
+ * // "creationTime": "my_creationTime",
+ * // "customSchemas": {},
+ * // "customerId": "my_customerId",
+ * // "deletionTime": "my_deletionTime",
+ * // "emails": {},
+ * // "etag": "my_etag",
+ * // "externalIds": {},
+ * // "gender": {},
+ * // "hashFunction": "my_hashFunction",
+ * // "id": "my_id",
+ * // "ims": {},
+ * // "includeInGlobalAddressList": false,
+ * // "ipWhitelisted": false,
+ * // "isAdmin": false,
+ * // "isDelegatedAdmin": false,
+ * // "isEnforcedIn2Sv": false,
+ * // "isEnrolledIn2Sv": false,
+ * // "isMailboxSetup": false,
+ * // "keywords": {},
+ * // "kind": "my_kind",
+ * // "languages": {},
+ * // "lastLoginTime": "my_lastLoginTime",
+ * // "locations": {},
+ * // "name": {},
+ * // "nonEditableAliases": [],
+ * // "notes": {},
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "organizations": {},
+ * // "password": "my_password",
+ * // "phones": {},
+ * // "posixAccounts": {},
+ * // "primaryEmail": "my_primaryEmail",
+ * // "recoveryEmail": "my_recoveryEmail",
+ * // "recoveryPhone": "my_recoveryPhone",
+ * // "relations": {},
+ * // "sshPublicKeys": {},
+ * // "suspended": false,
+ * // "suspensionReason": "my_suspensionReason",
+ * // "thumbnailPhotoEtag": "my_thumbnailPhotoEtag",
+ * // "thumbnailPhotoUrl": "my_thumbnailPhotoUrl",
+ * // "websites": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.users.insert
* @memberOf! ()
*
@@ -11038,6 +16322,76 @@ export namespace admin_directory_v1 {
/**
* directory.users.list
* @desc Retrieve either deleted users or all users in a domain (paginated)
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.user',
+ * 'https://www.googleapis.com/auth/admin.directory.user.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.users.list({
+ * // Immutable ID of the G Suite account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.
+ * customer: 'placeholder-value',
+ * // Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.
+ * customFieldMask: 'placeholder-value',
+ * // Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead.
+ * domain: 'placeholder-value',
+ * // Event on which subscription is intended (if subscribing)
+ * event: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Column to use for sorting results
+ * orderBy: 'placeholder-value',
+ * // Token to specify next page in the list
+ * pageToken: 'placeholder-value',
+ * // What subset of fields to fetch for this user.
+ * projection: 'placeholder-value',
+ * // Query string search. Should be of the form "". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users
+ * query: 'placeholder-value',
+ * // If set to true, retrieves the list of deleted users. (Default: false)
+ * showDeleted: 'placeholder-value',
+ * // Whether to return results in ascending or descending order.
+ * sortOrder: 'placeholder-value',
+ * // Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.
+ * viewType: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "trigger_event": "my_trigger_event",
+ * // "users": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.users.list
* @memberOf! ()
*
@@ -11120,6 +16474,49 @@ export namespace admin_directory_v1 {
/**
* directory.users.makeAdmin
* @desc change admin status of a user
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.users.makeAdmin({
+ * // Email or immutable ID of the user as admin
+ * userKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "status": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.users.makeAdmin
* @memberOf! ()
*
@@ -11191,6 +16588,144 @@ export namespace admin_directory_v1 {
/**
* directory.users.patch
* @desc update user. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.users.patch({
+ * // Email or immutable ID of the user. If ID, it should match with id of user object
+ * userKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "addresses": {},
+ * // "agreedToTerms": false,
+ * // "aliases": [],
+ * // "archived": false,
+ * // "changePasswordAtNextLogin": false,
+ * // "creationTime": "my_creationTime",
+ * // "customSchemas": {},
+ * // "customerId": "my_customerId",
+ * // "deletionTime": "my_deletionTime",
+ * // "emails": {},
+ * // "etag": "my_etag",
+ * // "externalIds": {},
+ * // "gender": {},
+ * // "hashFunction": "my_hashFunction",
+ * // "id": "my_id",
+ * // "ims": {},
+ * // "includeInGlobalAddressList": false,
+ * // "ipWhitelisted": false,
+ * // "isAdmin": false,
+ * // "isDelegatedAdmin": false,
+ * // "isEnforcedIn2Sv": false,
+ * // "isEnrolledIn2Sv": false,
+ * // "isMailboxSetup": false,
+ * // "keywords": {},
+ * // "kind": "my_kind",
+ * // "languages": {},
+ * // "lastLoginTime": "my_lastLoginTime",
+ * // "locations": {},
+ * // "name": {},
+ * // "nonEditableAliases": [],
+ * // "notes": {},
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "organizations": {},
+ * // "password": "my_password",
+ * // "phones": {},
+ * // "posixAccounts": {},
+ * // "primaryEmail": "my_primaryEmail",
+ * // "recoveryEmail": "my_recoveryEmail",
+ * // "recoveryPhone": "my_recoveryPhone",
+ * // "relations": {},
+ * // "sshPublicKeys": {},
+ * // "suspended": false,
+ * // "suspensionReason": "my_suspensionReason",
+ * // "thumbnailPhotoEtag": "my_thumbnailPhotoEtag",
+ * // "thumbnailPhotoUrl": "my_thumbnailPhotoUrl",
+ * // "websites": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "addresses": {},
+ * // "agreedToTerms": false,
+ * // "aliases": [],
+ * // "archived": false,
+ * // "changePasswordAtNextLogin": false,
+ * // "creationTime": "my_creationTime",
+ * // "customSchemas": {},
+ * // "customerId": "my_customerId",
+ * // "deletionTime": "my_deletionTime",
+ * // "emails": {},
+ * // "etag": "my_etag",
+ * // "externalIds": {},
+ * // "gender": {},
+ * // "hashFunction": "my_hashFunction",
+ * // "id": "my_id",
+ * // "ims": {},
+ * // "includeInGlobalAddressList": false,
+ * // "ipWhitelisted": false,
+ * // "isAdmin": false,
+ * // "isDelegatedAdmin": false,
+ * // "isEnforcedIn2Sv": false,
+ * // "isEnrolledIn2Sv": false,
+ * // "isMailboxSetup": false,
+ * // "keywords": {},
+ * // "kind": "my_kind",
+ * // "languages": {},
+ * // "lastLoginTime": "my_lastLoginTime",
+ * // "locations": {},
+ * // "name": {},
+ * // "nonEditableAliases": [],
+ * // "notes": {},
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "organizations": {},
+ * // "password": "my_password",
+ * // "phones": {},
+ * // "posixAccounts": {},
+ * // "primaryEmail": "my_primaryEmail",
+ * // "recoveryEmail": "my_recoveryEmail",
+ * // "recoveryPhone": "my_recoveryPhone",
+ * // "relations": {},
+ * // "sshPublicKeys": {},
+ * // "suspended": false,
+ * // "suspensionReason": "my_suspensionReason",
+ * // "thumbnailPhotoEtag": "my_thumbnailPhotoEtag",
+ * // "thumbnailPhotoUrl": "my_thumbnailPhotoUrl",
+ * // "websites": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.users.patch
* @memberOf! ()
*
@@ -11263,6 +16798,49 @@ export namespace admin_directory_v1 {
/**
* directory.users.undelete
* @desc Undelete a deleted user
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.users.undelete({
+ * // The immutable id of the user
+ * userKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "orgUnitPath": "my_orgUnitPath"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.users.undelete
* @memberOf! ()
*
@@ -11334,6 +16912,144 @@ export namespace admin_directory_v1 {
/**
* directory.users.update
* @desc update user
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.users.update({
+ * // Email or immutable ID of the user. If ID, it should match with id of user object
+ * userKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "addresses": {},
+ * // "agreedToTerms": false,
+ * // "aliases": [],
+ * // "archived": false,
+ * // "changePasswordAtNextLogin": false,
+ * // "creationTime": "my_creationTime",
+ * // "customSchemas": {},
+ * // "customerId": "my_customerId",
+ * // "deletionTime": "my_deletionTime",
+ * // "emails": {},
+ * // "etag": "my_etag",
+ * // "externalIds": {},
+ * // "gender": {},
+ * // "hashFunction": "my_hashFunction",
+ * // "id": "my_id",
+ * // "ims": {},
+ * // "includeInGlobalAddressList": false,
+ * // "ipWhitelisted": false,
+ * // "isAdmin": false,
+ * // "isDelegatedAdmin": false,
+ * // "isEnforcedIn2Sv": false,
+ * // "isEnrolledIn2Sv": false,
+ * // "isMailboxSetup": false,
+ * // "keywords": {},
+ * // "kind": "my_kind",
+ * // "languages": {},
+ * // "lastLoginTime": "my_lastLoginTime",
+ * // "locations": {},
+ * // "name": {},
+ * // "nonEditableAliases": [],
+ * // "notes": {},
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "organizations": {},
+ * // "password": "my_password",
+ * // "phones": {},
+ * // "posixAccounts": {},
+ * // "primaryEmail": "my_primaryEmail",
+ * // "recoveryEmail": "my_recoveryEmail",
+ * // "recoveryPhone": "my_recoveryPhone",
+ * // "relations": {},
+ * // "sshPublicKeys": {},
+ * // "suspended": false,
+ * // "suspensionReason": "my_suspensionReason",
+ * // "thumbnailPhotoEtag": "my_thumbnailPhotoEtag",
+ * // "thumbnailPhotoUrl": "my_thumbnailPhotoUrl",
+ * // "websites": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "addresses": {},
+ * // "agreedToTerms": false,
+ * // "aliases": [],
+ * // "archived": false,
+ * // "changePasswordAtNextLogin": false,
+ * // "creationTime": "my_creationTime",
+ * // "customSchemas": {},
+ * // "customerId": "my_customerId",
+ * // "deletionTime": "my_deletionTime",
+ * // "emails": {},
+ * // "etag": "my_etag",
+ * // "externalIds": {},
+ * // "gender": {},
+ * // "hashFunction": "my_hashFunction",
+ * // "id": "my_id",
+ * // "ims": {},
+ * // "includeInGlobalAddressList": false,
+ * // "ipWhitelisted": false,
+ * // "isAdmin": false,
+ * // "isDelegatedAdmin": false,
+ * // "isEnforcedIn2Sv": false,
+ * // "isEnrolledIn2Sv": false,
+ * // "isMailboxSetup": false,
+ * // "keywords": {},
+ * // "kind": "my_kind",
+ * // "languages": {},
+ * // "lastLoginTime": "my_lastLoginTime",
+ * // "locations": {},
+ * // "name": {},
+ * // "nonEditableAliases": [],
+ * // "notes": {},
+ * // "orgUnitPath": "my_orgUnitPath",
+ * // "organizations": {},
+ * // "password": "my_password",
+ * // "phones": {},
+ * // "posixAccounts": {},
+ * // "primaryEmail": "my_primaryEmail",
+ * // "recoveryEmail": "my_recoveryEmail",
+ * // "recoveryPhone": "my_recoveryPhone",
+ * // "relations": {},
+ * // "sshPublicKeys": {},
+ * // "suspended": false,
+ * // "suspensionReason": "my_suspensionReason",
+ * // "thumbnailPhotoEtag": "my_thumbnailPhotoEtag",
+ * // "thumbnailPhotoUrl": "my_thumbnailPhotoUrl",
+ * // "websites": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.users.update
* @memberOf! ()
*
@@ -11406,6 +17122,98 @@ export namespace admin_directory_v1 {
/**
* directory.users.watch
* @desc Watch for changes in users list
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.user',
+ * 'https://www.googleapis.com/auth/admin.directory.user.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.users.watch({
+ * // Immutable ID of the G Suite account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.
+ * customer: 'placeholder-value',
+ * // Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.
+ * customFieldMask: 'placeholder-value',
+ * // Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead.
+ * domain: 'placeholder-value',
+ * // Event on which subscription is intended (if subscribing)
+ * event: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Column to use for sorting results
+ * orderBy: 'placeholder-value',
+ * // Token to specify next page in the list
+ * pageToken: 'placeholder-value',
+ * // What subset of fields to fetch for this user.
+ * projection: 'placeholder-value',
+ * // Query string search. Should be of the form "". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users
+ * query: 'placeholder-value',
+ * // If set to true, retrieves the list of deleted users. (Default: false)
+ * showDeleted: 'placeholder-value',
+ * // Whether to return results in ascending or descending order.
+ * sortOrder: 'placeholder-value',
+ * // Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.
+ * viewType: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": "my_address",
+ * // "expiration": "my_expiration",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "params": {},
+ * // "payload": false,
+ * // "resourceId": "my_resourceId",
+ * // "resourceUri": "my_resourceUri",
+ * // "token": "my_token",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": "my_address",
+ * // "expiration": "my_expiration",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "params": {},
+ * // "payload": false,
+ * // "resourceId": "my_resourceId",
+ * // "resourceUri": "my_resourceUri",
+ * // "token": "my_token",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.users.watch
* @memberOf! ()
*
@@ -11721,6 +17529,46 @@ export namespace admin_directory_v1 {
/**
* directory.users.aliases.delete
* @desc Remove a alias for the user
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.user',
+ * 'https://www.googleapis.com/auth/admin.directory.user.alias',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.users.aliases.delete({
+ * // The alias to be removed
+ * alias: 'placeholder-value',
+ * // Email or immutable ID of the user
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.users.aliases.delete
* @memberOf! ()
*
@@ -11793,6 +17641,65 @@ export namespace admin_directory_v1 {
/**
* directory.users.aliases.insert
* @desc Add a alias for the user
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.user',
+ * 'https://www.googleapis.com/auth/admin.directory.user.alias',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.users.aliases.insert({
+ * // Email or immutable ID of the user
+ * userKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "alias": "my_alias",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "primaryEmail": "my_primaryEmail"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alias": "my_alias",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "primaryEmail": "my_primaryEmail"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.users.aliases.insert
* @memberOf! ()
*
@@ -11865,6 +17772,55 @@ export namespace admin_directory_v1 {
/**
* directory.users.aliases.list
* @desc List all aliases for a user
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.user',
+ * 'https://www.googleapis.com/auth/admin.directory.user.alias',
+ * 'https://www.googleapis.com/auth/admin.directory.user.alias.readonly',
+ * 'https://www.googleapis.com/auth/admin.directory.user.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.users.aliases.list({
+ * // Event on which subscription is intended (if subscribing)
+ * event: 'placeholder-value',
+ * // Email or immutable ID of the user
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "aliases": [],
+ * // "etag": "my_etag",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.users.aliases.list
* @memberOf! ()
*
@@ -11937,6 +17893,79 @@ export namespace admin_directory_v1 {
/**
* directory.users.aliases.watch
* @desc Watch for changes in user aliases list
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.user',
+ * 'https://www.googleapis.com/auth/admin.directory.user.alias',
+ * 'https://www.googleapis.com/auth/admin.directory.user.alias.readonly',
+ * 'https://www.googleapis.com/auth/admin.directory.user.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.users.aliases.watch({
+ * // Event on which subscription is intended (if subscribing)
+ * event: 'placeholder-value',
+ * // Email or immutable ID of the user
+ * userKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": "my_address",
+ * // "expiration": "my_expiration",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "params": {},
+ * // "payload": false,
+ * // "resourceId": "my_resourceId",
+ * // "resourceUri": "my_resourceUri",
+ * // "token": "my_token",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": "my_address",
+ * // "expiration": "my_expiration",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "params": {},
+ * // "payload": false,
+ * // "resourceId": "my_resourceId",
+ * // "resourceUri": "my_resourceUri",
+ * // "token": "my_token",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.users.aliases.watch
* @memberOf! ()
*
@@ -12088,6 +18117,41 @@ export namespace admin_directory_v1 {
/**
* directory.users.photos.delete
* @desc Remove photos for the user
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.users.photos.delete({
+ * // Email or immutable ID of the user
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.users.photos.delete
* @memberOf! ()
*
@@ -12159,6 +18223,56 @@ export namespace admin_directory_v1 {
/**
* directory.users.photos.get
* @desc Retrieve photo of a user
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/admin.directory.user',
+ * 'https://www.googleapis.com/auth/admin.directory.user.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.users.photos.get({
+ * // Email or immutable ID of the user
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "height": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mimeType": "my_mimeType",
+ * // "photoData": "my_photoData",
+ * // "primaryEmail": "my_primaryEmail",
+ * // "width": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.users.photos.get
* @memberOf! ()
*
@@ -12231,6 +18345,68 @@ export namespace admin_directory_v1 {
/**
* directory.users.photos.patch
* @desc Add a photo for the user. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.users.photos.patch({
+ * // Email or immutable ID of the user
+ * userKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "etag": "my_etag",
+ * // "height": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mimeType": "my_mimeType",
+ * // "photoData": "my_photoData",
+ * // "primaryEmail": "my_primaryEmail",
+ * // "width": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "height": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mimeType": "my_mimeType",
+ * // "photoData": "my_photoData",
+ * // "primaryEmail": "my_primaryEmail",
+ * // "width": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.users.photos.patch
* @memberOf! ()
*
@@ -12305,6 +18481,68 @@ export namespace admin_directory_v1 {
/**
* directory.users.photos.update
* @desc Add a photo for the user
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.users.photos.update({
+ * // Email or immutable ID of the user
+ * userKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "etag": "my_etag",
+ * // "height": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mimeType": "my_mimeType",
+ * // "photoData": "my_photoData",
+ * // "primaryEmail": "my_primaryEmail",
+ * // "width": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "height": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mimeType": "my_mimeType",
+ * // "photoData": "my_photoData",
+ * // "primaryEmail": "my_primaryEmail",
+ * // "width": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.users.photos.update
* @memberOf! ()
*
@@ -12444,6 +18682,41 @@ export namespace admin_directory_v1 {
/**
* directory.verificationCodes.generate
* @desc Generate new backup verification codes for the user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user.security'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.verificationCodes.generate({
+ * // Email or immutable ID of the user
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.verificationCodes.generate
* @memberOf! ()
*
@@ -12516,6 +18789,41 @@ export namespace admin_directory_v1 {
/**
* directory.verificationCodes.invalidate
* @desc Invalidate the current backup verification codes for the user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user.security'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.verificationCodes.invalidate({
+ * // Email or immutable ID of the user
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.verificationCodes.invalidate
* @memberOf! ()
*
@@ -12588,6 +18896,48 @@ export namespace admin_directory_v1 {
/**
* directory.verificationCodes.list
* @desc Returns the current set of valid backup verification codes for the specified user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('directory_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.directory.user.security'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await directory.verificationCodes.list({
+ * // Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias directory.verificationCodes.list
* @memberOf! ()
*
diff --git a/src/apis/admin/reports_v1.ts b/src/apis/admin/reports_v1.ts
index 24b109c2b11..5c011121971 100644
--- a/src/apis/admin/reports_v1.ts
+++ b/src/apis/admin/reports_v1.ts
@@ -336,6 +336,93 @@ export namespace admin_reports_v1 {
/**
* reports.activities.list
* @desc Retrieves a list of activities for a specific customer's account and application such as the Admin console application or the Google Drive application. For more information, see the guides for administrator and Google Drive activity reports. For more information about the activity report's parameters, see the activity parameters reference guides.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('reports_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.reports.audit.readonly'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await reports.activities.list({
+ * // The Internet Protocol (IP) Address of host where the event was performed. This is an additional way to filter a report's summary using the IP address of the user whose activity is being reported. This IP address may or may not reflect the user's physical location. For example, the IP address can be the user's proxy server's address or a virtual private network (VPN) address. This parameter supports both IPv4 and IPv6 address versions.
+ * actorIpAddress: 'placeholder-value',
+ * // Application name for which the events are to be retrieved.
+ * applicationName:
+ * '(admin)|(calendar)|(drive)|(login)|(mobile)|(token)|(groups)|(saml)|(chat)|(gplus)|(rules)|(jamboard)|(meet)|(user_accounts)|(access_transparency)|(groups_enterprise)|(gcp)',
+ * // The unique ID of the customer to retrieve data for.
+ * customerId: 'C.+',
+ * // Sets the end of the range of time shown in the report. The date is in the RFC 3339 format, for example 2010-10-28T10:26:35.000Z. The default value is the approximate time of the API request. An API report has three basic time concepts:
+ * // - Date of the API's request for a report: When the API created and retrieved the report.
+ * // - Report's start time: The beginning of the timespan shown in the report. The startTime must be before the endTime (if specified) and the current time when the request is made, or the API returns an error.
+ * // - Report's end time: The end of the timespan shown in the report. For example, the timespan of events summarized in a report can start in April and end in May. The report itself can be requested in August. If the endTime is not specified, the report returns all activities from the startTime until the current time or the most recent 180 days if the startTime is more than 180 days in the past.
+ * endTime: '(dddd)-(dd)-(dd)T(dd):(dd):(dd)(?:.(d+))?(?:(Z)|([-+])(dd):(dd))',
+ * // The name of the event being queried by the API. Each eventName is related to a specific G Suite service or feature which the API organizes into types of events. An example is the Google Calendar events in the Admin console application's reports. The Calendar Settings type structure has all of the Calendar eventName activities reported by the API. When an administrator changes a Calendar setting, the API reports this activity in the Calendar Settings type and eventName parameters. For more information about eventName query strings and parameters, see the list of event names for various applications above in applicationName.
+ * eventName: 'placeholder-value',
+ * // The filters query string is a comma-separated list. The list is composed of event parameters that are manipulated by relational operators. Event parameters are in the form [parameter1 name][relational operator][parameter1 value],[parameter2 name][relational operator][parameter2 value],...
+ * // These event parameters are associated with a specific eventName. An empty report is returned if the filtered request's parameter does not belong to the eventName. For more information about eventName parameters, see the list of event names for various applications above in applicationName.
+ * //
+ * // In the following Admin Activity example, the <> operator is URL-encoded in the request's query string (%3C%3E):
+ * // GET...&eventName=CHANGE_CALENDAR_SETTING &filters=NEW_VALUE%3C%3EREAD_ONLY_ACCESS
+ * //
+ * // In the following Drive example, the list can be a view or edit event's doc_id parameter with a value that is manipulated by an 'equal to' (==) or 'not equal to' (<>) relational operator. In the first example, the report returns each edited document's doc_id. In the second example, the report returns each viewed document's doc_id that equals the value 12345 and does not return any viewed document's which have a doc_id value of 98765. The <> operator is URL-encoded in the request's query string (%3C%3E):
+ * //
+ * // GET...&eventName=edit&filters=doc_id GET...&eventName=view&filters=doc_id==12345,doc_id%3C%3E98765
+ * //
+ * // The relational operators include:
+ * // - == - 'equal to'.
+ * // - <> - 'not equal to'. It is URL-encoded (%3C%3E).
+ * // - < - 'less than'. It is URL-encoded (%3C).
+ * // - <= - 'less than or equal to'. It is URL-encoded (%3C=).
+ * // - > - 'greater than'. It is URL-encoded (%3E).
+ * // - >= - 'greater than or equal to'. It is URL-encoded (%3E=).
+ * // Note: The API doesn't accept multiple values of a parameter. If a particular parameter is supplied more than once in the API request, the API only accepts the last value of that request parameter.
+ * // In addition, if an invalid request parameter is supplied in the API request, the API ignores that request parameter and returns the response corresponding to the remaining valid request parameters. If no parameters are requested, all parameters are returned.
+ * filters:
+ * '(.+[<,<=,==,>=,>,<>].+,)*(.+[<,<=,==,>=,>,<>].+)',
+ * // Determines how many activity records are shown on each response page. For example, if the request sets maxResults=1 and the report has two activities, the report has two pages. The response's nextPageToken property has the token to the second page. The maxResults query string is optional in the request. The default value is 1000.
+ * maxResults: 'placeholder-value',
+ * // ID of the organizational unit to report on. Activity records will be shown only for users who belong to the specified organizational unit. Data before Dec 17, 2018 doesn't appear in the filtered results.
+ * orgUnitID: '(id:[a-z0-9]+)',
+ * // The token to specify next page. A report with multiple pages has a nextPageToken property in the response. In your follow-on request getting the next page of the report, enter the nextPageToken value in the pageToken query string.
+ * pageToken: 'placeholder-value',
+ * // Sets the beginning of the range of time shown in the report. The date is in the RFC 3339 format, for example 2010-10-28T10:26:35.000Z. The report returns all activities from startTime until endTime. The startTime must be before the endTime (if specified) and the current time when the request is made, or the API returns an error.
+ * startTime:
+ * '(dddd)-(dd)-(dd)T(dd):(dd):(dd)(?:.(d+))?(?:(Z)|([-+])(dd):(dd))',
+ * // Represents the profile ID or the user email for which the data should be filtered. Can be all for all information, or userKey for a user's unique G Suite profile ID or their primary email address.
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias reports.activities.list
* @memberOf! ()
*
@@ -419,6 +506,116 @@ export namespace admin_reports_v1 {
/**
* reports.activities.watch
* @desc Start receiving notifications for account activities. For more information, see Receiving Push Notifications.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('reports_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.reports.audit.readonly'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await reports.activities.watch({
+ * // The Internet Protocol (IP) Address of host where the event was performed. This is an additional way to filter a report's summary using the IP address of the user whose activity is being reported. This IP address may or may not reflect the user's physical location. For example, the IP address can be the user's proxy server's address or a virtual private network (VPN) address. This parameter supports both IPv4 and IPv6 address versions.
+ * actorIpAddress: 'placeholder-value',
+ * // Application name for which the events are to be retrieved.
+ * applicationName:
+ * '(admin)|(calendar)|(drive)|(login)|(mobile)|(token)|(groups)|(saml)|(chat)|(gplus)|(rules)|(jamboard)|(meet)|(user_accounts)|(access_transparency)|(groups_enterprise)|(gcp)',
+ * // The unique ID of the customer to retrieve data for.
+ * customerId: 'C.+',
+ * // Sets the end of the range of time shown in the report. The date is in the RFC 3339 format, for example 2010-10-28T10:26:35.000Z. The default value is the approximate time of the API request. An API report has three basic time concepts:
+ * // - Date of the API's request for a report: When the API created and retrieved the report.
+ * // - Report's start time: The beginning of the timespan shown in the report. The startTime must be before the endTime (if specified) and the current time when the request is made, or the API returns an error.
+ * // - Report's end time: The end of the timespan shown in the report. For example, the timespan of events summarized in a report can start in April and end in May. The report itself can be requested in August. If the endTime is not specified, the report returns all activities from the startTime until the current time or the most recent 180 days if the startTime is more than 180 days in the past.
+ * endTime: '(dddd)-(dd)-(dd)T(dd):(dd):(dd)(?:.(d+))?(?:(Z)|([-+])(dd):(dd))',
+ * // The name of the event being queried by the API. Each eventName is related to a specific G Suite service or feature which the API organizes into types of events. An example is the Google Calendar events in the Admin console application's reports. The Calendar Settings type structure has all of the Calendar eventName activities reported by the API. When an administrator changes a Calendar setting, the API reports this activity in the Calendar Settings type and eventName parameters. For more information about eventName query strings and parameters, see the list of event names for various applications above in applicationName.
+ * eventName: 'placeholder-value',
+ * // The filters query string is a comma-separated list. The list is composed of event parameters that are manipulated by relational operators. Event parameters are in the form [parameter1 name][relational operator][parameter1 value],[parameter2 name][relational operator][parameter2 value],...
+ * // These event parameters are associated with a specific eventName. An empty report is returned if the filtered request's parameter does not belong to the eventName. For more information about eventName parameters, see the list of event names for various applications above in applicationName.
+ * //
+ * // In the following Admin Activity example, the <> operator is URL-encoded in the request's query string (%3C%3E):
+ * // GET...&eventName=CHANGE_CALENDAR_SETTING &filters=NEW_VALUE%3C%3EREAD_ONLY_ACCESS
+ * //
+ * // In the following Drive example, the list can be a view or edit event's doc_id parameter with a value that is manipulated by an 'equal to' (==) or 'not equal to' (<>) relational operator. In the first example, the report returns each edited document's doc_id. In the second example, the report returns each viewed document's doc_id that equals the value 12345 and does not return any viewed document's which have a doc_id value of 98765. The <> operator is URL-encoded in the request's query string (%3C%3E):
+ * //
+ * // GET...&eventName=edit&filters=doc_id GET...&eventName=view&filters=doc_id==12345,doc_id%3C%3E98765
+ * //
+ * // The relational operators include:
+ * // - == - 'equal to'.
+ * // - <> - 'not equal to'. It is URL-encoded (%3C%3E).
+ * // - < - 'less than'. It is URL-encoded (%3C).
+ * // - <= - 'less than or equal to'. It is URL-encoded (%3C=).
+ * // - > - 'greater than'. It is URL-encoded (%3E).
+ * // - >= - 'greater than or equal to'. It is URL-encoded (%3E=).
+ * // Note: The API doesn't accept multiple values of a parameter. If a particular parameter is supplied more than once in the API request, the API only accepts the last value of that request parameter.
+ * // In addition, if an invalid request parameter is supplied in the API request, the API ignores that request parameter and returns the response corresponding to the remaining valid request parameters. If no parameters are requested, all parameters are returned.
+ * filters:
+ * '(.+[<,<=,==,>=,>,<>].+,)*(.+[<,<=,==,>=,>,<>].+)',
+ * // Determines how many activity records are shown on each response page. For example, if the request sets maxResults=1 and the report has two activities, the report has two pages. The response's nextPageToken property has the token to the second page. The maxResults query string is optional in the request. The default value is 1000.
+ * maxResults: 'placeholder-value',
+ * // ID of the organizational unit to report on. Activity records will be shown only for users who belong to the specified organizational unit. Data before Dec 17, 2018 doesn't appear in the filtered results.
+ * orgUnitID: '(id:[a-z0-9]+)',
+ * // The token to specify next page. A report with multiple pages has a nextPageToken property in the response. In your follow-on request getting the next page of the report, enter the nextPageToken value in the pageToken query string.
+ * pageToken: 'placeholder-value',
+ * // Sets the beginning of the range of time shown in the report. The date is in the RFC 3339 format, for example 2010-10-28T10:26:35.000Z. The report returns all activities from startTime until endTime. The startTime must be before the endTime (if specified) and the current time when the request is made, or the API returns an error.
+ * startTime:
+ * '(dddd)-(dd)-(dd)T(dd):(dd):(dd)(?:.(d+))?(?:(Z)|([-+])(dd):(dd))',
+ * // Represents the profile ID or the user email for which the data should be filtered. Can be all for all information, or userKey for a user's unique G Suite profile ID or their primary email address.
+ * userKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": "my_address",
+ * // "expiration": "my_expiration",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "params": {},
+ * // "payload": false,
+ * // "resourceId": "my_resourceId",
+ * // "resourceUri": "my_resourceUri",
+ * // "token": "my_token",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": "my_address",
+ * // "expiration": "my_expiration",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "params": {},
+ * // "payload": false,
+ * // "resourceId": "my_resourceId",
+ * // "resourceUri": "my_resourceUri",
+ * // "token": "my_token",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias reports.activities.watch
* @memberOf! ()
*
@@ -616,6 +813,55 @@ export namespace admin_reports_v1 {
/**
* admin.channels.stop
* @desc Stop watching resources through this channel
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('reports_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.reports.audit.readonly'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await admin.channels.stop({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": "my_address",
+ * // "expiration": "my_expiration",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "params": {},
+ * // "payload": false,
+ * // "resourceId": "my_resourceId",
+ * // "resourceUri": "my_resourceUri",
+ * // "token": "my_token",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias admin.channels.stop
* @memberOf! ()
*
@@ -705,6 +951,62 @@ export namespace admin_reports_v1 {
/**
* reports.customerUsageReports.get
* @desc Retrieves a report which is a collection of properties and statistics for a specific customer's account. For more information, see the Customers Usage Report guide. For more information about the customer report's parameters, see the Customers Usage parameters reference guides.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('reports_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.reports.usage.readonly'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await reports.customerUsageReports.get({
+ * // The unique ID of the customer to retrieve data for.
+ * customerId: 'C.+',
+ * // Represents the date the usage occurred. The timestamp is in the ISO 8601 format, yyyy-mm-dd. We recommend you use your account's time zone for this.
+ * date: '(d){4}-(d){2}-(d){2}',
+ * // Token to specify next page. A report with multiple pages has a nextPageToken property in the response. For your follow-on requests getting all of the report's pages, enter the nextPageToken value in the pageToken query string.
+ * pageToken: 'placeholder-value',
+ * // The parameters query string is a comma-separated list of event parameters that refine a report's results. The parameter is associated with a specific application. The application values for the Customers usage report include accounts, app_maker, apps_scripts, calendar, classroom, cros, docs, gmail, gplus, device_management, meet, and sites.
+ * // A parameters query string is in the CSV form of app_name1:param_name1, app_name2:param_name2.
+ * // Note: The API doesn't accept multiple values of a parameter. If a particular parameter is supplied more than once in the API request, the API only accepts the last value of that request parameter.
+ * // In addition, if an invalid request parameter is supplied in the API request, the API ignores that request parameter and returns the response corresponding to the remaining valid request parameters.
+ * //
+ * // An example of an invalid request parameter is one that does not belong to the application. If no parameters are requested, all parameters are returned.
+ * parameters:
+ * '(((accounts)|(app_maker)|(apps_scripts)|(classroom)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)|(drive)|(meet)):[^,]+,)*(((accounts)|(app_maker)|(apps_scripts)|(classroom)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)|(drive)|(meet)):[^,]+)',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "usageReports": [],
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias reports.customerUsageReports.get
* @memberOf! ()
*
@@ -814,6 +1116,83 @@ export namespace admin_reports_v1 {
/**
* reports.entityUsageReports.get
* @desc Retrieves a report which is a collection of properties and statistics for entities used by users within the account. For more information, see the Entities Usage Report guide. For more information about the entities report's parameters, see the Entities Usage parameters reference guides.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('reports_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.reports.usage.readonly'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await reports.entityUsageReports.get({
+ * // The unique ID of the customer to retrieve data for.
+ * customerId: 'C.+',
+ * // Represents the date the usage occurred. The timestamp is in the ISO 8601 format, yyyy-mm-dd. We recommend you use your account's time zone for this.
+ * date: '(d){4}-(d){2}-(d){2}',
+ * // Represents the key of the object to filter the data with.
+ * entityKey: 'placeholder-value',
+ * // Represents the type of entity for the report.
+ * entityType: '(gplus_communities)',
+ * // The filters query string is a comma-separated list of an application's event parameters where the parameter's value is manipulated by a relational operator. The filters query string includes the name of the application whose usage is returned in the report. The application values for the Entities usage report include accounts, docs, and gmail.
+ * // Filters are in the form [application name]:[parameter name][relational operator][parameter value],....
+ * //
+ * // In this example, the <> 'not equal to' operator is URL-encoded in the request's query string (%3C%3E):
+ * // GET https://www.googleapis.com/admin/reports/v1/usage/gplus_communities/all/dates/2017-12-01 ?parameters=gplus:community_name,gplus:num_total_members &filters=gplus:num_total_members>0
+ * //
+ * //
+ * // The relational operators include:
+ * // - == - 'equal to'.
+ * // - <> - 'not equal to'. It is URL-encoded (%3C%3E).
+ * // - < - 'less than'. It is URL-encoded (%3C).
+ * // - <= - 'less than or equal to'. It is URL-encoded (%3C=).
+ * // - > - 'greater than'. It is URL-encoded (%3E).
+ * // - >= - 'greater than or equal to'. It is URL-encoded (%3E=). Filters can only be applied to numeric parameters.
+ * filters:
+ * '(((gplus)):[a-z0-9_]+[<,<=,==,>=,>,!=][^,]+,)*(((gplus)):[a-z0-9_]+[<,<=,==,>=,>,!=][^,]+)',
+ * // Determines how many activity records are shown on each response page. For example, if the request sets maxResults=1 and the report has two activities, the report has two pages. The response's nextPageToken property has the token to the second page.
+ * maxResults: 'placeholder-value',
+ * // Token to specify next page. A report with multiple pages has a nextPageToken property in the response. In your follow-on request getting the next page of the report, enter the nextPageToken value in the pageToken query string.
+ * pageToken: 'placeholder-value',
+ * // The parameters query string is a comma-separated list of event parameters that refine a report's results. The parameter is associated with a specific application. The application values for the Entities usage report are only gplus.
+ * // A parameter query string is in the CSV form of [app_name1:param_name1], [app_name2:param_name2]....
+ * // Note: The API doesn't accept multiple values of a parameter. If a particular parameter is supplied more than once in the API request, the API only accepts the last value of that request parameter.
+ * // In addition, if an invalid request parameter is supplied in the API request, the API ignores that request parameter and returns the response corresponding to the remaining valid request parameters.
+ * //
+ * // An example of an invalid request parameter is one that does not belong to the application. If no parameters are requested, all parameters are returned.
+ * parameters: '(((gplus)):[^,]+,)*(((gplus)):[^,]+)',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "usageReports": [],
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias reports.entityUsageReports.get
* @memberOf! ()
*
@@ -943,6 +1322,85 @@ export namespace admin_reports_v1 {
/**
* reports.userUsageReport.get
* @desc Retrieves a report which is a collection of properties and statistics for a set of users with the account. For more information, see the User Usage Report guide. For more information about the user report's parameters, see the Users Usage parameters reference guides.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admin = google.admin('reports_v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/admin.reports.usage.readonly'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await reports.userUsageReport.get({
+ * // The unique ID of the customer to retrieve data for.
+ * customerId: 'C.+',
+ * // Represents the date the usage occurred. The timestamp is in the ISO 8601 format, yyyy-mm-dd. We recommend you use your account's time zone for this.
+ * date: '(d){4}-(d){2}-(d){2}',
+ * // The filters query string is a comma-separated list of an application's event parameters where the parameter's value is manipulated by a relational operator. The filters query string includes the name of the application whose usage is returned in the report. The application values for the Users Usage Report include accounts, docs, and gmail.
+ * // Filters are in the form [application name]:[parameter name][relational operator][parameter value],....
+ * //
+ * // In this example, the <> 'not equal to' operator is URL-encoded in the request's query string (%3C%3E):
+ * // GET https://www.googleapis.com/admin/reports/v1/usage/users/all/dates/2013-03-03 ?parameters=accounts:last_login_time &filters=accounts:last_login_time>2010-10-28T10:26:35.000Z
+ * //
+ * //
+ * // The relational operators include:
+ * // - == - 'equal to'.
+ * // - <> - 'not equal to'. It is URL-encoded (%3C%3E).
+ * // - < - 'less than'. It is URL-encoded (%3C).
+ * // - <= - 'less than or equal to'. It is URL-encoded (%3C=).
+ * // - > - 'greater than'. It is URL-encoded (%3E).
+ * // - >= - 'greater than or equal to'. It is URL-encoded (%3E=).
+ * filters:
+ * '(((accounts)|(classroom)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)|(drive)):[a-z0-9_]+[<,<=,==,>=,>,!=][^,]+,)*(((accounts)|(classroom)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)|(drive)):[a-z0-9_]+[<,<=,==,>=,>,!=][^,]+)',
+ * // Determines how many activity records are shown on each response page. For example, if the request sets maxResults=1 and the report has two activities, the report has two pages. The response's nextPageToken property has the token to the second page.
+ * // The maxResults query string is optional.
+ * maxResults: 'placeholder-value',
+ * // ID of the organizational unit to report on. User activity will be shown only for users who belong to the specified organizational unit. Data before Dec 17, 2018 doesn't appear in the filtered results.
+ * orgUnitID: '(id:[a-z0-9]+)',
+ * // Token to specify next page. A report with multiple pages has a nextPageToken property in the response. In your follow-on request getting the next page of the report, enter the nextPageToken value in the pageToken query string.
+ * pageToken: 'placeholder-value',
+ * // The parameters query string is a comma-separated list of event parameters that refine a report's results. The parameter is associated with a specific application. The application values for the Customers usage report include accounts, app_maker, apps_scripts, calendar, classroom, cros, docs, gmail, gplus, device_management, meet, and sites.
+ * // A parameters query string is in the CSV form of app_name1:param_name1, app_name2:param_name2.
+ * // Note: The API doesn't accept multiple values of a parameter.
+ * // If a particular parameter is supplied more than once in the API request, the API only accepts the last value of that request parameter. In addition, if an invalid request parameter is supplied in the API request, the API ignores that request parameter and returns the response corresponding to the remaining valid request parameters.
+ * //
+ * // An example of an invalid request parameter is one that does not belong to the application. If no parameters are requested, all parameters are returned.
+ * parameters:
+ * '(((accounts)|(classroom)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)|(drive)):[^,]+,)*(((accounts)|(classroom)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)|(drive)):[^,]+)',
+ * // Represents the profile ID or the user email for which the data should be filtered. Can be all for all information, or userKey for a user's unique G Suite profile ID or their primary email address.
+ * userKey: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "usageReports": [],
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias reports.userUsageReport.get
* @memberOf! ()
*
diff --git a/src/apis/admob/v1.ts b/src/apis/admob/v1.ts
index c2cca8eac04..c9ed1ceb2e8 100644
--- a/src/apis/admob/v1.ts
+++ b/src/apis/admob/v1.ts
@@ -487,6 +487,50 @@ export namespace admob_v1 {
/**
* admob.accounts.get
* @desc Gets information about the specified AdMob publisher account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admob.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admob = google.admob('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await admob.accounts.get({
+ * // Resource name of the publisher account to retrieve.
+ * // Example: accounts/pub-9876543210987654
+ * name: 'accounts/my-account',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "currencyCode": "my_currencyCode",
+ * // "name": "my_name",
+ * // "publisherId": "my_publisherId",
+ * // "reportingTimeZone": "my_reportingTimeZone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias admob.accounts.get
* @memberOf! ()
*
@@ -557,6 +601,51 @@ export namespace admob_v1 {
/**
* admob.accounts.list
* @desc Lists the AdMob publisher account accessible with the client credential. Currently, all credentials have access to at most one AdMob account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admob.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admob = google.admob('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await admob.accounts.list({
+ * // Maximum number of accounts to return.
+ * pageSize: 'placeholder-value',
+ * // The value returned by the last `ListPublisherAccountsResponse`; indicates
+ * // that this is a continuation of a prior `ListPublisherAccounts` call, and
+ * // that the system should return the next page of data.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "account": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias admob.accounts.list
* @memberOf! ()
*
@@ -671,6 +760,57 @@ export namespace admob_v1 {
/**
* admob.accounts.mediationReport.generate
* @desc Generates an AdMob Mediation report based on the provided report specification.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admob.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admob = google.admob('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await admob.accounts.mediationReport.generate({
+ * // Resource name of the account to generate the report for.
+ * // Example: accounts/pub-9876543210987654
+ * parent: 'accounts/my-account',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "reportSpec": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "footer": {},
+ * // "header": {},
+ * // "row": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias admob.accounts.mediationReport.generate
* @memberOf! ()
*
@@ -780,6 +920,57 @@ export namespace admob_v1 {
/**
* admob.accounts.networkReport.generate
* @desc Generates an AdMob Network report based on the provided report specification.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/admob.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const admob = google.admob('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await admob.accounts.networkReport.generate({
+ * // Resource name of the account to generate the report for.
+ * // Example: accounts/pub-9876543210987654
+ * parent: 'accounts/my-account',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "reportSpec": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "footer": {},
+ * // "header": {},
+ * // "row": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias admob.accounts.networkReport.generate
* @memberOf! ()
*
diff --git a/src/apis/adsense/v1.4.ts b/src/apis/adsense/v1.4.ts
index a3a9fefd711..c2671723578 100644
--- a/src/apis/adsense/v1.4.ts
+++ b/src/apis/adsense/v1.4.ts
@@ -630,6 +630,57 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.get
* @desc Get information about the selected AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.get({
+ * // Account to get information about.
+ * accountId: 'placeholder-value',
+ * // Whether the tree of sub accounts should be returned.
+ * tree: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creation_time": "my_creation_time",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "premium": false,
+ * // "subAccounts": [],
+ * // "timezone": "my_timezone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.get
* @memberOf! ()
*
@@ -702,6 +753,54 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.list
* @desc List all accounts available to this AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.list({
+ * // The maximum number of accounts to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through accounts. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.list
* @memberOf! ()
*
@@ -812,6 +911,54 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.adclients.getAdCode
* @desc Get Auto ad code for a given ad client.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.adclients.getAdCode({
+ * // Account which contains the ad client.
+ * accountId: 'placeholder-value',
+ * // Ad client to get the code for.
+ * adClientId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adCode": "my_adCode",
+ * // "ampBody": "my_ampBody",
+ * // "ampHead": "my_ampHead",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.adclients.getAdCode
* @memberOf! ()
*
@@ -885,6 +1032,56 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.adclients.list
* @desc List all ad clients in the specified account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.adclients.list({
+ * // Account for which to list ad clients.
+ * accountId: 'placeholder-value',
+ * // The maximum number of ad clients to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.adclients.list
* @memberOf! ()
*
@@ -1008,6 +1205,62 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.adunits.get
* @desc Gets the specified ad unit in the specified ad client for the specified account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.adunits.get({
+ * // Account to which the ad client belongs.
+ * accountId: 'placeholder-value',
+ * // Ad client for which to get the ad unit.
+ * adClientId: 'placeholder-value',
+ * // Ad unit to retrieve.
+ * adUnitId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "code": "my_code",
+ * // "contentAdsSettings": {},
+ * // "customStyle": {},
+ * // "feedAdsSettings": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mobileContentAdsSettings": {},
+ * // "name": "my_name",
+ * // "savedStyleId": "my_savedStyleId",
+ * // "status": "my_status"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.adunits.get
* @memberOf! ()
*
@@ -1082,6 +1335,56 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.adunits.getAdCode
* @desc Get ad code for the specified ad unit.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.adunits.getAdCode({
+ * // Account which contains the ad client.
+ * accountId: 'placeholder-value',
+ * // Ad client with contains the ad unit.
+ * adClientId: 'placeholder-value',
+ * // Ad unit to get the code for.
+ * adUnitId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adCode": "my_adCode",
+ * // "ampBody": "my_ampBody",
+ * // "ampHead": "my_ampHead",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.adunits.getAdCode
* @memberOf! ()
*
@@ -1156,6 +1459,60 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.adunits.list
* @desc List all ad units in the specified ad client for the specified account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.adunits.list({
+ * // Account to which the ad client belongs.
+ * accountId: 'placeholder-value',
+ * // Ad client for which to list ad units.
+ * adClientId: 'placeholder-value',
+ * // Whether to include inactive ad units. Default: true.
+ * includeInactive: 'placeholder-value',
+ * // The maximum number of ad units to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.adunits.list
* @memberOf! ()
*
@@ -1308,6 +1665,60 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.adunits.customchannels.list
* @desc List all custom channels which the specified ad unit belongs to.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.adunits.customchannels.list({
+ * // Account to which the ad client belongs.
+ * accountId: 'placeholder-value',
+ * // Ad client which contains the ad unit.
+ * adClientId: 'placeholder-value',
+ * // Ad unit for which to list custom channels.
+ * adUnitId: 'placeholder-value',
+ * // The maximum number of custom channels to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.adunits.customchannels.list
* @memberOf! ()
*
@@ -1422,6 +1833,43 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.alerts.delete
* @desc Dismiss (delete) the specified alert from the specified publisher AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsense'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.alerts.delete({
+ * // Account which contains the ad unit.
+ * accountId: 'placeholder-value',
+ * // Alert to delete.
+ * alertId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.alerts.delete
* @memberOf! ()
*
@@ -1494,6 +1942,52 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.alerts.list
* @desc List the alerts for the specified AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.alerts.list({
+ * // Account for which to retrieve the alerts.
+ * accountId: 'placeholder-value',
+ * // The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used if the supplied locale is invalid or unsupported.
+ * locale: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.alerts.list
* @memberOf! ()
*
@@ -1608,6 +2102,57 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.customchannels.get
* @desc Get the specified custom channel from the specified ad client for the specified account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.customchannels.get({
+ * // Account to which the ad client belongs.
+ * accountId: 'placeholder-value',
+ * // Ad client which contains the custom channel.
+ * adClientId: 'placeholder-value',
+ * // Custom channel to retrieve.
+ * customChannelId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "code": "my_code",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "targetingInfo": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.customchannels.get
* @memberOf! ()
*
@@ -1684,6 +2229,58 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.customchannels.list
* @desc List all custom channels in the specified ad client for the specified account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.customchannels.list({
+ * // Account to which the ad client belongs.
+ * accountId: 'placeholder-value',
+ * // Ad client for which to list custom channels.
+ * adClientId: 'placeholder-value',
+ * // The maximum number of custom channels to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.customchannels.list
* @memberOf! ()
*
@@ -1813,6 +2410,62 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.customchannels.adunits.list
* @desc List all ad units in the specified custom channel.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.customchannels.adunits.list({
+ * // Account to which the ad client belongs.
+ * accountId: 'placeholder-value',
+ * // Ad client which contains the custom channel.
+ * adClientId: 'placeholder-value',
+ * // Custom channel for which to list ad units.
+ * customChannelId: 'placeholder-value',
+ * // Whether to include inactive ad units. Default: true.
+ * includeInactive: 'placeholder-value',
+ * // The maximum number of ad units to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.customchannels.adunits.list
* @memberOf! ()
*
@@ -1930,6 +2583,50 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.payments.list
* @desc List the payments for the specified AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.payments.list({
+ * // Account for which to retrieve the payments.
+ * accountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.payments.list
* @memberOf! ()
*
@@ -2023,6 +2720,81 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.reports.generate
* @desc Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.reports.generate({
+ * // Account upon which to report.
+ * accountId: 'placeholder-value',
+ * // Optional currency to use when reporting on monetary metrics. Defaults to the account's currency if not set.
+ * currency: '[a-zA-Z]+',
+ * // Dimensions to base the report on.
+ * dimension: '[a-zA-Z_]+',
+ * // End of the date range to report on in "YYYY-MM-DD" format, inclusive.
+ * endDate:
+ * 'd{4}-d{2}-d{2}|(today|startOfMonth|startOfYear)(([-+]d+[dwmy]){0,3}?)|(latest-(d{2})-(d{2})(-d+y)?)|(latest-latest-(d{2})(-d+m)?)',
+ * // Filters to be run on the report.
+ * filter: '[a-zA-Z_]+(==|=@).+',
+ * // Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified.
+ * locale: '[a-zA-Z_]+',
+ * // The maximum number of rows of report data to return.
+ * maxResults: 'placeholder-value',
+ * // Numeric columns to include in the report.
+ * metric: '[a-zA-Z_]+',
+ * // The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending.
+ * sort: '(+|-)?[a-zA-Z_]+',
+ * // Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
+ * startDate:
+ * 'd{4}-d{2}-d{2}|(today|startOfMonth|startOfYear)(([-+]d+[dwmy]){0,3}?)|(latest-(d{2})-(d{2})(-d+y)?)|(latest-latest-(d{2})(-d+m)?)',
+ * // Index of the first row of report data to return.
+ * startIndex: 'placeholder-value',
+ * // Whether the report should be generated in the AdSense account's local timezone. If false default PST/PDT timezone will be used.
+ * useTimezoneReporting: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "averages": [],
+ * // "endDate": "my_endDate",
+ * // "headers": [],
+ * // "kind": "my_kind",
+ * // "rows": [],
+ * // "startDate": "my_startDate",
+ * // "totalMatchedRows": "my_totalMatchedRows",
+ * // "totals": [],
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.reports.generate
* @memberOf! ()
*
@@ -2180,6 +2952,65 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.reports.saved.generate
* @desc Generate an AdSense report based on the saved report ID sent in the query parameters.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.reports.saved.generate({
+ * // Account to which the saved reports belong.
+ * accountId: 'placeholder-value',
+ * // Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified.
+ * locale: '[a-zA-Z_]+',
+ * // The maximum number of rows of report data to return.
+ * maxResults: 'placeholder-value',
+ * // The saved report to retrieve.
+ * savedReportId: 'placeholder-value',
+ * // Index of the first row of report data to return.
+ * startIndex: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "averages": [],
+ * // "endDate": "my_endDate",
+ * // "headers": [],
+ * // "kind": "my_kind",
+ * // "rows": [],
+ * // "startDate": "my_startDate",
+ * // "totalMatchedRows": "my_totalMatchedRows",
+ * // "totals": [],
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.reports.saved.generate
* @memberOf! ()
*
@@ -2267,6 +3098,56 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.reports.saved.list
* @desc List all saved reports in the specified AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.reports.saved.list({
+ * // Account to which the saved reports belong.
+ * accountId: 'placeholder-value',
+ * // The maximum number of saved reports to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.reports.saved.list
* @memberOf! ()
*
@@ -2398,6 +3279,54 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.savedadstyles.get
* @desc List a specific saved ad style for the specified account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.savedadstyles.get({
+ * // Account for which to get the saved ad style.
+ * accountId: 'placeholder-value',
+ * // Saved ad style to retrieve.
+ * savedAdStyleId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adStyle": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.savedadstyles.get
* @memberOf! ()
*
@@ -2473,6 +3402,56 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.savedadstyles.list
* @desc List all saved ad styles in the specified account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.savedadstyles.list({
+ * // Account for which to list saved ad styles.
+ * accountId: 'placeholder-value',
+ * // The maximum number of saved ad styles to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through saved ad styles. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.savedadstyles.list
* @memberOf! ()
*
@@ -2592,6 +3571,58 @@ export namespace adsense_v1_4 {
/**
* adsense.accounts.urlchannels.list
* @desc List all URL channels in the specified ad client for the specified account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.accounts.urlchannels.list({
+ * // Account to which the ad client belongs.
+ * accountId: 'placeholder-value',
+ * // Ad client for which to list URL channels.
+ * adClientId: 'placeholder-value',
+ * // The maximum number of URL channels to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.accounts.urlchannels.list
* @memberOf! ()
*
@@ -2701,6 +3732,54 @@ export namespace adsense_v1_4 {
/**
* adsense.adclients.list
* @desc List all ad clients in this AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.adclients.list({
+ * // The maximum number of ad clients to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.adclients.list
* @memberOf! ()
*
@@ -2800,6 +3879,60 @@ export namespace adsense_v1_4 {
/**
* adsense.adunits.get
* @desc Gets the specified ad unit in the specified ad client.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.adunits.get({
+ * // Ad client for which to get the ad unit.
+ * adClientId: 'placeholder-value',
+ * // Ad unit to retrieve.
+ * adUnitId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "code": "my_code",
+ * // "contentAdsSettings": {},
+ * // "customStyle": {},
+ * // "feedAdsSettings": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mobileContentAdsSettings": {},
+ * // "name": "my_name",
+ * // "savedStyleId": "my_savedStyleId",
+ * // "status": "my_status"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.adunits.get
* @memberOf! ()
*
@@ -2872,6 +4005,54 @@ export namespace adsense_v1_4 {
/**
* adsense.adunits.getAdCode
* @desc Get ad code for the specified ad unit.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.adunits.getAdCode({
+ * // Ad client with contains the ad unit.
+ * adClientId: 'placeholder-value',
+ * // Ad unit to get the code for.
+ * adUnitId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adCode": "my_adCode",
+ * // "ampBody": "my_ampBody",
+ * // "ampHead": "my_ampHead",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.adunits.getAdCode
* @memberOf! ()
*
@@ -2945,6 +4126,58 @@ export namespace adsense_v1_4 {
/**
* adsense.adunits.list
* @desc List all ad units in the specified ad client for this AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.adunits.list({
+ * // Ad client for which to list ad units.
+ * adClientId: 'placeholder-value',
+ * // Whether to include inactive ad units. Default: true.
+ * includeInactive: 'placeholder-value',
+ * // The maximum number of ad units to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.adunits.list
* @memberOf! ()
*
@@ -3080,6 +4313,58 @@ export namespace adsense_v1_4 {
/**
* adsense.adunits.customchannels.list
* @desc List all custom channels which the specified ad unit belongs to.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.adunits.customchannels.list({
+ * // Ad client which contains the ad unit.
+ * adClientId: 'placeholder-value',
+ * // Ad unit for which to list custom channels.
+ * adUnitId: 'placeholder-value',
+ * // The maximum number of custom channels to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.adunits.customchannels.list
* @memberOf! ()
*
@@ -3189,6 +4474,41 @@ export namespace adsense_v1_4 {
/**
* adsense.alerts.delete
* @desc Dismiss (delete) the specified alert from the publisher's AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsense'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.alerts.delete({
+ * // Alert to delete.
+ * alertId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.alerts.delete
* @memberOf! ()
*
@@ -3260,6 +4580,50 @@ export namespace adsense_v1_4 {
/**
* adsense.alerts.list
* @desc List the alerts for this AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.alerts.list({
+ * // The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used if the supplied locale is invalid or unsupported.
+ * locale: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.alerts.list
* @memberOf! ()
*
@@ -3363,6 +4727,55 @@ export namespace adsense_v1_4 {
/**
* adsense.customchannels.get
* @desc Get the specified custom channel from the specified ad client.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.customchannels.get({
+ * // Ad client which contains the custom channel.
+ * adClientId: 'placeholder-value',
+ * // Custom channel to retrieve.
+ * customChannelId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "code": "my_code",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "targetingInfo": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.customchannels.get
* @memberOf! ()
*
@@ -3438,6 +4851,56 @@ export namespace adsense_v1_4 {
/**
* adsense.customchannels.list
* @desc List all custom channels in the specified ad client for this AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.customchannels.list({
+ * // Ad client for which to list custom channels.
+ * adClientId: 'placeholder-value',
+ * // The maximum number of custom channels to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.customchannels.list
* @memberOf! ()
*
@@ -3557,6 +5020,60 @@ export namespace adsense_v1_4 {
/**
* adsense.customchannels.adunits.list
* @desc List all ad units in the specified custom channel.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.customchannels.adunits.list({
+ * // Ad client which contains the custom channel.
+ * adClientId: 'placeholder-value',
+ * // Custom channel for which to list ad units.
+ * customChannelId: 'placeholder-value',
+ * // Whether to include inactive ad units. Default: true.
+ * includeInactive: 'placeholder-value',
+ * // The maximum number of ad units to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.customchannels.adunits.list
* @memberOf! ()
*
@@ -3680,6 +5197,47 @@ export namespace adsense_v1_4 {
/**
* adsense.metadata.dimensions.list
* @desc List the metadata for the dimensions available to this AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.metadata.dimensions.list({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.metadata.dimensions.list
* @memberOf! ()
*
@@ -3766,6 +5324,47 @@ export namespace adsense_v1_4 {
/**
* adsense.metadata.metrics.list
* @desc List the metadata for the metrics available to this AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.metadata.metrics.list({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.metadata.metrics.list
* @memberOf! ()
*
@@ -3852,6 +5451,47 @@ export namespace adsense_v1_4 {
/**
* adsense.payments.list
* @desc List the payments for this AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.payments.list({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.payments.list
* @memberOf! ()
*
@@ -3938,6 +5578,81 @@ export namespace adsense_v1_4 {
/**
* adsense.reports.generate
* @desc Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.reports.generate({
+ * // Accounts upon which to report.
+ * accountId: 'placeholder-value',
+ * // Optional currency to use when reporting on monetary metrics. Defaults to the account's currency if not set.
+ * currency: '[a-zA-Z]+',
+ * // Dimensions to base the report on.
+ * dimension: '[a-zA-Z_]+',
+ * // End of the date range to report on in "YYYY-MM-DD" format, inclusive.
+ * endDate:
+ * 'd{4}-d{2}-d{2}|(today|startOfMonth|startOfYear)(([-+]d+[dwmy]){0,3}?)|(latest-(d{2})-(d{2})(-d+y)?)|(latest-latest-(d{2})(-d+m)?)',
+ * // Filters to be run on the report.
+ * filter: '[a-zA-Z_]+(==|=@).+',
+ * // Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified.
+ * locale: '[a-zA-Z_]+',
+ * // The maximum number of rows of report data to return.
+ * maxResults: 'placeholder-value',
+ * // Numeric columns to include in the report.
+ * metric: '[a-zA-Z_]+',
+ * // The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending.
+ * sort: '(+|-)?[a-zA-Z_]+',
+ * // Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
+ * startDate:
+ * 'd{4}-d{2}-d{2}|(today|startOfMonth|startOfYear)(([-+]d+[dwmy]){0,3}?)|(latest-(d{2})-(d{2})(-d+y)?)|(latest-latest-(d{2})(-d+m)?)',
+ * // Index of the first row of report data to return.
+ * startIndex: 'placeholder-value',
+ * // Whether the report should be generated in the AdSense account's local timezone. If false default PST/PDT timezone will be used.
+ * useTimezoneReporting: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "averages": [],
+ * // "endDate": "my_endDate",
+ * // "headers": [],
+ * // "kind": "my_kind",
+ * // "rows": [],
+ * // "startDate": "my_startDate",
+ * // "totalMatchedRows": "my_totalMatchedRows",
+ * // "totals": [],
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.reports.generate
* @memberOf! ()
*
@@ -4094,6 +5809,63 @@ export namespace adsense_v1_4 {
/**
* adsense.reports.saved.generate
* @desc Generate an AdSense report based on the saved report ID sent in the query parameters.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.reports.saved.generate({
+ * // Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified.
+ * locale: '[a-zA-Z_]+',
+ * // The maximum number of rows of report data to return.
+ * maxResults: 'placeholder-value',
+ * // The saved report to retrieve.
+ * savedReportId: 'placeholder-value',
+ * // Index of the first row of report data to return.
+ * startIndex: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "averages": [],
+ * // "endDate": "my_endDate",
+ * // "headers": [],
+ * // "kind": "my_kind",
+ * // "rows": [],
+ * // "startDate": "my_startDate",
+ * // "totalMatchedRows": "my_totalMatchedRows",
+ * // "totals": [],
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.reports.saved.generate
* @memberOf! ()
*
@@ -4180,6 +5952,54 @@ export namespace adsense_v1_4 {
/**
* adsense.reports.saved.list
* @desc List all saved reports in this AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.reports.saved.list({
+ * // The maximum number of saved reports to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.reports.saved.list
* @memberOf! ()
*
@@ -4303,6 +6123,52 @@ export namespace adsense_v1_4 {
/**
* adsense.savedadstyles.get
* @desc Get a specific saved ad style from the user's account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.savedadstyles.get({
+ * // Saved ad style to retrieve.
+ * savedAdStyleId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adStyle": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.savedadstyles.get
* @memberOf! ()
*
@@ -4376,6 +6242,54 @@ export namespace adsense_v1_4 {
/**
* adsense.savedadstyles.list
* @desc List all saved ad styles in the user's account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.savedadstyles.list({
+ * // The maximum number of saved ad styles to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through saved ad styles. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.savedadstyles.list
* @memberOf! ()
*
@@ -4487,6 +6401,56 @@ export namespace adsense_v1_4 {
/**
* adsense.urlchannels.list
* @desc List all URL channels in the specified ad client for this AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsense.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsense = google.adsense('v1.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/adsense',
+ * 'https://www.googleapis.com/auth/adsense.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsense.urlchannels.list({
+ * // Ad client for which to list URL channels.
+ * adClientId: 'placeholder-value',
+ * // The maximum number of URL channels to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsense.urlchannels.list
* @memberOf! ()
*
diff --git a/src/apis/adsensehost/v4.1.ts b/src/apis/adsensehost/v4.1.ts
index 30c9b1f6330..e3c187f071f 100644
--- a/src/apis/adsensehost/v4.1.ts
+++ b/src/apis/adsensehost/v4.1.ts
@@ -426,6 +426,49 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.accounts.get
* @desc Get information about the selected associated AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.accounts.get({
+ * // Account to get information about.
+ * accountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "status": "my_status"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.accounts.get
* @memberOf! ()
*
@@ -497,6 +540,48 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.accounts.list
* @desc List hosted accounts associated with this AdSense account by ad client id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.accounts.list({
+ * // Ad clients to list accounts for.
+ * filterAdClientId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.accounts.list
* @memberOf! ()
*
@@ -598,6 +683,52 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.accounts.adclients.get
* @desc Get information about one of the ad clients in the specified publisher's AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.accounts.adclients.get({
+ * // Account which contains the ad client.
+ * accountId: 'placeholder-value',
+ * // Ad client to get.
+ * adClientId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "arcOptIn": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "productCode": "my_productCode",
+ * // "supportsReporting": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.accounts.adclients.get
* @memberOf! ()
*
@@ -671,6 +802,53 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.accounts.adclients.list
* @desc List all hosted ad clients in the specified hosted account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.accounts.adclients.list({
+ * // Account for which to list ad clients.
+ * accountId: 'placeholder-value',
+ * // The maximum number of ad clients to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.accounts.adclients.list
* @memberOf! ()
*
@@ -790,6 +968,57 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.accounts.adunits.delete
* @desc Delete the specified ad unit from the specified publisher AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.accounts.adunits.delete({
+ * // Account which contains the ad unit.
+ * accountId: 'placeholder-value',
+ * // Ad client for which to get ad unit.
+ * adClientId: 'placeholder-value',
+ * // Ad unit to delete.
+ * adUnitId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "code": "my_code",
+ * // "contentAdsSettings": {},
+ * // "customStyle": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mobileContentAdsSettings": {},
+ * // "name": "my_name",
+ * // "status": "my_status"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.accounts.adunits.delete
* @memberOf! ()
*
@@ -864,6 +1093,57 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.accounts.adunits.get
* @desc Get the specified host ad unit in this AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.accounts.adunits.get({
+ * // Account which contains the ad unit.
+ * accountId: 'placeholder-value',
+ * // Ad client for which to get ad unit.
+ * adClientId: 'placeholder-value',
+ * // Ad unit to get.
+ * adUnitId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "code": "my_code",
+ * // "contentAdsSettings": {},
+ * // "customStyle": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mobileContentAdsSettings": {},
+ * // "name": "my_name",
+ * // "status": "my_status"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.accounts.adunits.get
* @memberOf! ()
*
@@ -938,6 +1218,53 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.accounts.adunits.getAdCode
* @desc Get ad code for the specified ad unit, attaching the specified host custom channels.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.accounts.adunits.getAdCode({
+ * // Account which contains the ad client.
+ * accountId: 'placeholder-value',
+ * // Ad client with contains the ad unit.
+ * adClientId: 'placeholder-value',
+ * // Ad unit to get the code for.
+ * adUnitId: 'placeholder-value',
+ * // Host custom channel to attach to the ad code.
+ * hostCustomChannelId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adCode": "my_adCode",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.accounts.adunits.getAdCode
* @memberOf! ()
*
@@ -1013,6 +1340,70 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.accounts.adunits.insert
* @desc Insert the supplied ad unit into the specified publisher AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.accounts.adunits.insert({
+ * // Account which will contain the ad unit.
+ * accountId: 'placeholder-value',
+ * // Ad client into which to insert the ad unit.
+ * adClientId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "code": "my_code",
+ * // "contentAdsSettings": {},
+ * // "customStyle": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mobileContentAdsSettings": {},
+ * // "name": "my_name",
+ * // "status": "my_status"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "code": "my_code",
+ * // "contentAdsSettings": {},
+ * // "customStyle": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mobileContentAdsSettings": {},
+ * // "name": "my_name",
+ * // "status": "my_status"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.accounts.adunits.insert
* @memberOf! ()
*
@@ -1087,6 +1478,57 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.accounts.adunits.list
* @desc List all ad units in the specified publisher's AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.accounts.adunits.list({
+ * // Account which contains the ad client.
+ * accountId: 'placeholder-value',
+ * // Ad client for which to list ad units.
+ * adClientId: 'placeholder-value',
+ * // Whether to include inactive ad units. Default: true.
+ * includeInactive: 'placeholder-value',
+ * // The maximum number of ad units to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.accounts.adunits.list
* @memberOf! ()
*
@@ -1163,6 +1605,72 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.accounts.adunits.patch
* @desc Update the supplied ad unit in the specified publisher AdSense account. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.accounts.adunits.patch({
+ * // Account which contains the ad client.
+ * accountId: 'placeholder-value',
+ * // Ad client which contains the ad unit.
+ * adClientId: 'placeholder-value',
+ * // Ad unit to get.
+ * adUnitId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "code": "my_code",
+ * // "contentAdsSettings": {},
+ * // "customStyle": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mobileContentAdsSettings": {},
+ * // "name": "my_name",
+ * // "status": "my_status"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "code": "my_code",
+ * // "contentAdsSettings": {},
+ * // "customStyle": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mobileContentAdsSettings": {},
+ * // "name": "my_name",
+ * // "status": "my_status"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.accounts.adunits.patch
* @memberOf! ()
*
@@ -1238,6 +1746,70 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.accounts.adunits.update
* @desc Update the supplied ad unit in the specified publisher AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.accounts.adunits.update({
+ * // Account which contains the ad client.
+ * accountId: 'placeholder-value',
+ * // Ad client which contains the ad unit.
+ * adClientId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "code": "my_code",
+ * // "contentAdsSettings": {},
+ * // "customStyle": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mobileContentAdsSettings": {},
+ * // "name": "my_name",
+ * // "status": "my_status"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "code": "my_code",
+ * // "contentAdsSettings": {},
+ * // "customStyle": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mobileContentAdsSettings": {},
+ * // "name": "my_name",
+ * // "status": "my_status"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.accounts.adunits.update
* @memberOf! ()
*
@@ -1479,6 +2051,72 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.accounts.reports.generate
* @desc Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.accounts.reports.generate({
+ * // Hosted account upon which to report.
+ * accountId: 'placeholder-value',
+ * // Dimensions to base the report on.
+ * dimension: '[a-zA-Z_]+',
+ * // End of the date range to report on in "YYYY-MM-DD" format, inclusive.
+ * endDate:
+ * 'd{4}-d{2}-d{2}|(today|startOfMonth|startOfYear)(([-+]d+[dwmy]){0,3}?)',
+ * // Filters to be run on the report.
+ * filter: '[a-zA-Z_]+(==|=@).+',
+ * // Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified.
+ * locale: '[a-zA-Z_]+',
+ * // The maximum number of rows of report data to return.
+ * maxResults: 'placeholder-value',
+ * // Numeric columns to include in the report.
+ * metric: '[a-zA-Z_]+',
+ * // The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending.
+ * sort: '(+|-)?[a-zA-Z_]+',
+ * // Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
+ * startDate:
+ * 'd{4}-d{2}-d{2}|(today|startOfMonth|startOfYear)(([-+]d+[dwmy]){0,3}?)',
+ * // Index of the first row of report data to return.
+ * startIndex: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "averages": [],
+ * // "headers": [],
+ * // "kind": "my_kind",
+ * // "rows": [],
+ * // "totalMatchedRows": "my_totalMatchedRows",
+ * // "totals": [],
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.accounts.reports.generate
* @memberOf! ()
*
@@ -1615,6 +2253,50 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.adclients.get
* @desc Get information about one of the ad clients in the Host AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.adclients.get({
+ * // Ad client to get.
+ * adClientId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "arcOptIn": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "productCode": "my_productCode",
+ * // "supportsReporting": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.adclients.get
* @memberOf! ()
*
@@ -1686,6 +2368,51 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.adclients.list
* @desc List all host ad clients in this AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.adclients.list({
+ * // The maximum number of ad clients to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.adclients.list
* @memberOf! ()
*
@@ -1794,6 +2521,62 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.associationsessions.start
* @desc Create an association session for initiating an association with an AdSense user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.associationsessions.start({
+ * // The URL to redirect the user to once association is completed. It receives a token parameter that can then be used to retrieve the associated account.
+ * callbackUrl: 'placeholder-value',
+ * // Products to associate with the user.
+ * productCode: 'placeholder-value',
+ * // The preferred locale of the user.
+ * userLocale: 'placeholder-value',
+ * // The locale of the user's hosted website.
+ * websiteLocale: 'placeholder-value',
+ * // The URL of the user's hosted website.
+ * websiteUrl: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "productCodes": [],
+ * // "redirectUrl": "my_redirectUrl",
+ * // "status": "my_status",
+ * // "userLocale": "my_userLocale",
+ * // "websiteLocale": "my_websiteLocale",
+ * // "websiteUrl": "my_websiteUrl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.associationsessions.start
* @memberOf! ()
*
@@ -1871,6 +2654,54 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.associationsessions.verify
* @desc Verify an association session after the association callback returns from AdSense signup.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.associationsessions.verify({
+ * // The token returned to the association callback URL.
+ * token: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "productCodes": [],
+ * // "redirectUrl": "my_redirectUrl",
+ * // "status": "my_status",
+ * // "userLocale": "my_userLocale",
+ * // "websiteLocale": "my_websiteLocale",
+ * // "websiteUrl": "my_websiteUrl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.associationsessions.verify
* @memberOf! ()
*
@@ -1992,6 +2823,51 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.customchannels.delete
* @desc Delete a specific custom channel from the host AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.customchannels.delete({
+ * // Ad client from which to delete the custom channel.
+ * adClientId: 'placeholder-value',
+ * // Custom channel to delete.
+ * customChannelId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "code": "my_code",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.customchannels.delete
* @memberOf! ()
*
@@ -2067,6 +2943,51 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.customchannels.get
* @desc Get a specific custom channel from the host AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.customchannels.get({
+ * // Ad client from which to get the custom channel.
+ * adClientId: 'placeholder-value',
+ * // Custom channel to get.
+ * customChannelId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "code": "my_code",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.customchannels.get
* @memberOf! ()
*
@@ -2142,6 +3063,60 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.customchannels.insert
* @desc Add a new custom channel to the host AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.customchannels.insert({
+ * // Ad client to which the new custom channel will be added.
+ * adClientId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "code": "my_code",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "code": "my_code",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.customchannels.insert
* @memberOf! ()
*
@@ -2217,6 +3192,53 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.customchannels.list
* @desc List all host custom channels in this AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.customchannels.list({
+ * // Ad client for which to list custom channels.
+ * adClientId: 'placeholder-value',
+ * // The maximum number of custom channels to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.customchannels.list
* @memberOf! ()
*
@@ -2293,6 +3315,62 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.customchannels.patch
* @desc Update a custom channel in the host AdSense account. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.customchannels.patch({
+ * // Ad client in which the custom channel will be updated.
+ * adClientId: 'placeholder-value',
+ * // Custom channel to get.
+ * customChannelId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "code": "my_code",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "code": "my_code",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.customchannels.patch
* @memberOf! ()
*
@@ -2369,6 +3447,60 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.customchannels.update
* @desc Update a custom channel in the host AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.customchannels.update({
+ * // Ad client in which the custom channel will be updated.
+ * adClientId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "code": "my_code",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "code": "my_code",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.customchannels.update
* @memberOf! ()
*
@@ -2559,6 +3691,70 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.reports.generate
* @desc Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.reports.generate({
+ * // Dimensions to base the report on.
+ * dimension: '[a-zA-Z_]+',
+ * // End of the date range to report on in "YYYY-MM-DD" format, inclusive.
+ * endDate:
+ * 'd{4}-d{2}-d{2}|(today|startOfMonth|startOfYear)(([-+]d+[dwmy]){0,3}?)',
+ * // Filters to be run on the report.
+ * filter: '[a-zA-Z_]+(==|=@).+',
+ * // Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified.
+ * locale: '[a-zA-Z_]+',
+ * // The maximum number of rows of report data to return.
+ * maxResults: 'placeholder-value',
+ * // Numeric columns to include in the report.
+ * metric: '[a-zA-Z_]+',
+ * // The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending.
+ * sort: '(+|-)?[a-zA-Z_]+',
+ * // Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
+ * startDate:
+ * 'd{4}-d{2}-d{2}|(today|startOfMonth|startOfYear)(([-+]d+[dwmy]){0,3}?)',
+ * // Index of the first row of report data to return.
+ * startIndex: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "averages": [],
+ * // "headers": [],
+ * // "kind": "my_kind",
+ * // "rows": [],
+ * // "totalMatchedRows": "my_totalMatchedRows",
+ * // "totals": [],
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.reports.generate
* @memberOf! ()
*
@@ -2689,6 +3885,50 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.urlchannels.delete
* @desc Delete a URL channel from the host AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.urlchannels.delete({
+ * // Ad client from which to delete the URL channel.
+ * adClientId: 'placeholder-value',
+ * // URL channel to delete.
+ * urlChannelId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "urlPattern": "my_urlPattern"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.urlchannels.delete
* @memberOf! ()
*
@@ -2764,6 +4004,58 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.urlchannels.insert
* @desc Add a new URL channel to the host AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.urlchannels.insert({
+ * // Ad client to which the new URL channel will be added.
+ * adClientId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "urlPattern": "my_urlPattern"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "urlPattern": "my_urlPattern"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.urlchannels.insert
* @memberOf! ()
*
@@ -2838,6 +4130,53 @@ export namespace adsensehost_v4_1 {
/**
* adsensehost.urlchannels.list
* @desc List all host URL channels in the host AdSense account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/adsensehost.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const adsensehost = google.adsensehost('v4.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/adsensehost'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await adsensehost.urlchannels.list({
+ * // Ad client for which to list URL channels.
+ * adClientId: 'placeholder-value',
+ * // The maximum number of URL channels to include in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias adsensehost.urlchannels.list
* @memberOf! ()
*
diff --git a/src/apis/alertcenter/v1beta1.ts b/src/apis/alertcenter/v1beta1.ts
index 8bfdca5ea00..f07c9589a3a 100644
--- a/src/apis/alertcenter/v1beta1.ts
+++ b/src/apis/alertcenter/v1beta1.ts
@@ -914,6 +914,53 @@ export namespace alertcenter_v1beta1 {
/**
* alertcenter.alerts.batchDelete
* @desc Performs batch delete operation on alerts.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/alertcenter.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const alertcenter = google.alertcenter('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/apps.alerts'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await alertcenter.alerts.batchDelete({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "alertId": [],
+ * // "customerId": "my_customerId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "failedAlertStatus": {},
+ * // "successAlertIds": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias alertcenter.alerts.batchDelete
* @memberOf! ()
*
@@ -995,6 +1042,53 @@ export namespace alertcenter_v1beta1 {
/**
* alertcenter.alerts.batchUndelete
* @desc Performs batch undelete operation on alerts.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/alertcenter.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const alertcenter = google.alertcenter('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/apps.alerts'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await alertcenter.alerts.batchUndelete({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "alertId": [],
+ * // "customerId": "my_customerId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "failedAlertStatus": {},
+ * // "successAlertIds": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias alertcenter.alerts.batchUndelete
* @memberOf! ()
*
@@ -1076,6 +1170,48 @@ export namespace alertcenter_v1beta1 {
/**
* alertcenter.alerts.delete
* @desc Marks the specified alert for deletion. An alert that has been marked for deletion is removed from Alert Center after 30 days. Marking an alert for deletion has no effect on an alert which has already been marked for deletion. Attempting to mark a nonexistent alert for deletion results in a `NOT_FOUND` error.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/alertcenter.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const alertcenter = google.alertcenter('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/apps.alerts'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await alertcenter.alerts.delete({
+ * // Required. The identifier of the alert to delete.
+ * alertId: 'placeholder-value',
+ * // Optional. The unique identifier of the G Suite organization account of the
+ * // customer the alert is associated with.
+ * // Inferred from the caller identity if not provided.
+ * customerId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias alertcenter.alerts.delete
* @memberOf! ()
*
@@ -1148,6 +1284,62 @@ export namespace alertcenter_v1beta1 {
/**
* alertcenter.alerts.get
* @desc Gets the specified alert. Attempting to get a nonexistent alert returns `NOT_FOUND` error.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/alertcenter.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const alertcenter = google.alertcenter('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/apps.alerts'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await alertcenter.alerts.get({
+ * // Required. The identifier of the alert to retrieve.
+ * alertId: 'placeholder-value',
+ * // Optional. The unique identifier of the G Suite organization account of the
+ * // customer the alert is associated with.
+ * // Inferred from the caller identity if not provided.
+ * customerId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alertId": "my_alertId",
+ * // "createTime": "my_createTime",
+ * // "customerId": "my_customerId",
+ * // "data": {},
+ * // "deleted": false,
+ * // "endTime": "my_endTime",
+ * // "etag": "my_etag",
+ * // "metadata": {},
+ * // "securityInvestigationToolLink": "my_securityInvestigationToolLink",
+ * // "source": "my_source",
+ * // "startTime": "my_startTime",
+ * // "type": "my_type",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias alertcenter.alerts.get
* @memberOf! ()
*
@@ -1220,6 +1412,56 @@ export namespace alertcenter_v1beta1 {
/**
* alertcenter.alerts.getMetadata
* @desc Returns the metadata of an alert. Attempting to get metadata for a non-existent alert returns `NOT_FOUND` error.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/alertcenter.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const alertcenter = google.alertcenter('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/apps.alerts'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await alertcenter.alerts.getMetadata({
+ * // Required. The identifier of the alert this metadata belongs to.
+ * alertId: 'placeholder-value',
+ * // Optional. The unique identifier of the G Suite organization account of the
+ * // customer the alert metadata is associated with.
+ * // Inferred from the caller identity if not provided.
+ * customerId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alertId": "my_alertId",
+ * // "assignee": "my_assignee",
+ * // "customerId": "my_customerId",
+ * // "etag": "my_etag",
+ * // "severity": "my_severity",
+ * // "status": "my_status",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias alertcenter.alerts.getMetadata
* @memberOf! ()
*
@@ -1295,6 +1537,70 @@ export namespace alertcenter_v1beta1 {
/**
* alertcenter.alerts.list
* @desc Lists the alerts.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/alertcenter.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const alertcenter = google.alertcenter('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/apps.alerts'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await alertcenter.alerts.list({
+ * // Optional. The unique identifier of the G Suite organization account of the
+ * // customer the alerts are associated with.
+ * // Inferred from the caller identity if not provided.
+ * customerId: 'placeholder-value',
+ * // Optional. A query string for filtering alert results.
+ * // For more details, see [Query
+ * // filters](/admin-sdk/alertcenter/guides/query-filters) and [Supported
+ * // query filter
+ * // fields](/admin-sdk/alertcenter/reference/filter-fields#alerts.list).
+ * filter: 'placeholder-value',
+ * // Optional. The sort order of the list results.
+ * // If not specified results may be returned in arbitrary order.
+ * // You can sort the results in descending order based on the creation
+ * // timestamp using `order_by="create_time desc"`.
+ * // Currently, supported sorting are `create_time asc`, `create_time desc`,
+ * // `update_time desc`
+ * orderBy: 'placeholder-value',
+ * // Optional. The requested page size. Server may return fewer items than
+ * // requested. If unspecified, server picks an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // Optional. A token identifying a page of results the server should return.
+ * // If empty, a new iteration is started. To continue an iteration, pass in
+ * // the value from the previous ListAlertsResponse's
+ * // next_page_token field.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alerts": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias alertcenter.alerts.list
* @memberOf! ()
*
@@ -1369,6 +1675,66 @@ export namespace alertcenter_v1beta1 {
/**
* alertcenter.alerts.undelete
* @desc Restores, or "undeletes", an alert that was marked for deletion within the past 30 days. Attempting to undelete an alert which was marked for deletion over 30 days ago (which has been removed from the Alert Center database) or a nonexistent alert returns a `NOT_FOUND` error. Attempting to undelete an alert which has not been marked for deletion has no effect.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/alertcenter.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const alertcenter = google.alertcenter('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/apps.alerts'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await alertcenter.alerts.undelete({
+ * // Required. The identifier of the alert to undelete.
+ * alertId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "customerId": "my_customerId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alertId": "my_alertId",
+ * // "createTime": "my_createTime",
+ * // "customerId": "my_customerId",
+ * // "data": {},
+ * // "deleted": false,
+ * // "endTime": "my_endTime",
+ * // "etag": "my_etag",
+ * // "metadata": {},
+ * // "securityInvestigationToolLink": "my_securityInvestigationToolLink",
+ * // "source": "my_source",
+ * // "startTime": "my_startTime",
+ * // "type": "my_type",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias alertcenter.alerts.undelete
* @memberOf! ()
*
@@ -1562,6 +1928,68 @@ export namespace alertcenter_v1beta1 {
/**
* alertcenter.alerts.feedback.create
* @desc Creates new feedback for an alert. Attempting to create a feedback for a non-existent alert returns `NOT_FOUND` error. Attempting to create a feedback for an alert that is marked for deletion returns `FAILED_PRECONDITION' error.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/alertcenter.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const alertcenter = google.alertcenter('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/apps.alerts'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await alertcenter.alerts.feedback.create({
+ * // Required. The identifier of the alert this feedback belongs to.
+ * alertId: 'placeholder-value',
+ * // Optional. The unique identifier of the G Suite organization account of the
+ * // customer the alert is associated with.
+ * // Inferred from the caller identity if not provided.
+ * customerId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "alertId": "my_alertId",
+ * // "createTime": "my_createTime",
+ * // "customerId": "my_customerId",
+ * // "email": "my_email",
+ * // "feedbackId": "my_feedbackId",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alertId": "my_alertId",
+ * // "createTime": "my_createTime",
+ * // "customerId": "my_customerId",
+ * // "email": "my_email",
+ * // "feedbackId": "my_feedbackId",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias alertcenter.alerts.feedback.create
* @memberOf! ()
*
@@ -1638,6 +2066,57 @@ export namespace alertcenter_v1beta1 {
/**
* alertcenter.alerts.feedback.list
* @desc Lists all the feedback for an alert. Attempting to list feedbacks for a non-existent alert returns `NOT_FOUND` error.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/alertcenter.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const alertcenter = google.alertcenter('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/apps.alerts'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await alertcenter.alerts.feedback.list({
+ * // Required. The alert identifier.
+ * // The "-" wildcard could be used to represent all alerts.
+ * alertId: 'placeholder-value',
+ * // Optional. The unique identifier of the G Suite organization account of the
+ * // customer the alert feedback are associated with.
+ * // Inferred from the caller identity if not provided.
+ * customerId: 'placeholder-value',
+ * // Optional. A query string for filtering alert feedback results.
+ * // For more details, see [Query
+ * // filters](/admin-sdk/alertcenter/guides/query-filters) and [Supported
+ * // query filter
+ * // fields](/admin-sdk/alertcenter/reference/filter-fields#alerts.feedback.list).
+ * filter: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "feedback": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias alertcenter.alerts.feedback.list
* @memberOf! ()
*
@@ -1770,6 +2249,48 @@ export namespace alertcenter_v1beta1 {
/**
* alertcenter.getSettings
* @desc Returns customer-level settings.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/alertcenter.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const alertcenter = google.alertcenter('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/apps.alerts'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await alertcenter.getSettings({
+ * // Optional. The unique identifier of the G Suite organization account of the
+ * // customer the alert settings are associated with.
+ * // Inferred from the caller identity if not provided.
+ * customerId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "notifications": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias alertcenter.getSettings
* @memberOf! ()
*
@@ -1839,6 +2360,56 @@ export namespace alertcenter_v1beta1 {
/**
* alertcenter.updateSettings
* @desc Updates the customer-level settings.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/alertcenter.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const alertcenter = google.alertcenter('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/apps.alerts'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await alertcenter.updateSettings({
+ * // Optional. The unique identifier of the G Suite organization account of the
+ * // customer the alert settings are associated with.
+ * // Inferred from the caller identity if not provided.
+ * customerId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "notifications": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "notifications": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias alertcenter.updateSettings
* @memberOf! ()
*
diff --git a/src/apis/analytics/v3.ts b/src/apis/analytics/v3.ts
index 6af438dff23..4f703459ce9 100644
--- a/src/apis/analytics/v3.ts
+++ b/src/apis/analytics/v3.ts
@@ -2514,6 +2514,89 @@ export namespace analytics_v3 {
/**
* analytics.data.ga.get
* @desc Returns Analytics data for a view (profile).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.data.ga.get({
+ * // A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'.
+ * dimensions: '(ga:.+)?',
+ * // End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is yesterday.
+ * 'end-date': '[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)',
+ * // A comma-separated list of dimension or metric filters to be applied to Analytics data.
+ * filters: 'ga:.+',
+ * // Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
+ * ids: 'ga:[0-9]+',
+ * // The response will include empty rows if this parameter is set to true, the default is true
+ * 'include-empty-rows': 'placeholder-value',
+ * // The maximum number of entries to include in this feed.
+ * 'max-results': 'placeholder-value',
+ * // A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. At least one metric must be specified.
+ * metrics: 'ga:.+',
+ * // The selected format for the response. Default format is JSON.
+ * output: 'placeholder-value',
+ * // The desired sampling level.
+ * samplingLevel: 'placeholder-value',
+ * // An Analytics segment to be applied to data.
+ * segment: 'placeholder-value',
+ * // A comma-separated list of dimensions or metrics that determine the sort order for Analytics data.
+ * sort: '(-)?ga:.+',
+ * // Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo.
+ * 'start-date': '[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)',
+ * // An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "columnHeaders": [],
+ * // "containsSampledData": false,
+ * // "dataLastRefreshed": "my_dataLastRefreshed",
+ * // "dataTable": {},
+ * // "id": "my_id",
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "profileInfo": {},
+ * // "query": {},
+ * // "rows": [],
+ * // "sampleSize": "my_sampleSize",
+ * // "sampleSpace": "my_sampleSpace",
+ * // "selfLink": "my_selfLink",
+ * // "totalResults": 0,
+ * // "totalsForAllResults": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.data.ga.get
* @memberOf! ()
*
@@ -2664,6 +2747,81 @@ export namespace analytics_v3 {
/**
* analytics.data.mcf.get
* @desc Returns Analytics Multi-Channel Funnels data for a view (profile).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.data.mcf.get({
+ * // A comma-separated list of Multi-Channel Funnels dimensions. E.g., 'mcf:source,mcf:medium'.
+ * dimensions: '(mcf:.+)?',
+ * // End date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo.
+ * 'end-date': '[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)',
+ * // A comma-separated list of dimension or metric filters to be applied to the Analytics data.
+ * filters: 'mcf:.+',
+ * // Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
+ * ids: 'ga:[0-9]+',
+ * // The maximum number of entries to include in this feed.
+ * 'max-results': 'placeholder-value',
+ * // A comma-separated list of Multi-Channel Funnels metrics. E.g., 'mcf:totalConversions,mcf:totalConversionValue'. At least one metric must be specified.
+ * metrics: 'mcf:.+',
+ * // The desired sampling level.
+ * samplingLevel: 'placeholder-value',
+ * // A comma-separated list of dimensions or metrics that determine the sort order for the Analytics data.
+ * sort: '(-)?mcf:.+',
+ * // Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo.
+ * 'start-date': '[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)',
+ * // An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "columnHeaders": [],
+ * // "containsSampledData": false,
+ * // "id": "my_id",
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "profileInfo": {},
+ * // "query": {},
+ * // "rows": [],
+ * // "sampleSize": "my_sampleSize",
+ * // "sampleSpace": "my_sampleSpace",
+ * // "selfLink": "my_selfLink",
+ * // "totalResults": 0,
+ * // "totalsForAllResults": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.data.mcf.get
* @memberOf! ()
*
@@ -2799,6 +2957,67 @@ export namespace analytics_v3 {
/**
* analytics.data.realtime.get
* @desc Returns real time data for a view (profile).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.data.realtime.get({
+ * // A comma-separated list of real time dimensions. E.g., 'rt:medium,rt:city'.
+ * dimensions: '(ga:.+)|(rt:.+)',
+ * // A comma-separated list of dimension or metric filters to be applied to real time data.
+ * filters: '(ga:.+)|(rt:.+)',
+ * // Unique table ID for retrieving real time data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
+ * ids: 'ga:[0-9]+',
+ * // The maximum number of entries to include in this feed.
+ * 'max-results': 'placeholder-value',
+ * // A comma-separated list of real time metrics. E.g., 'rt:activeUsers'. At least one metric must be specified.
+ * metrics: '(ga:.+)|(rt:.+)',
+ * // A comma-separated list of dimensions or metrics that determine the sort order for real time data.
+ * sort: '(-)?((ga:.+)|(rt:.+))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "columnHeaders": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "profileInfo": {},
+ * // "query": {},
+ * // "rows": [],
+ * // "selfLink": "my_selfLink",
+ * // "totalResults": 0,
+ * // "totalsForAllResults": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.data.realtime.get
* @memberOf! ()
*
@@ -2985,6 +3204,59 @@ export namespace analytics_v3 {
/**
* analytics.management.accounts.list
* @desc Lists all accounts to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.accounts.list({
+ * // The maximum number of accounts to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // An index of the first account to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0,
+ * // "username": "my_username"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.accounts.list
* @memberOf! ()
*
@@ -3082,6 +3354,58 @@ export namespace analytics_v3 {
/**
* analytics.management.accountSummaries.list
* @desc Lists account summaries (lightweight tree comprised of accounts/properties/profiles) to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.accountSummaries.list({
+ * // The maximum number of account summaries to include in this response, where the largest acceptable value is 1000.
+ * 'max-results': 'placeholder-value',
+ * // An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0,
+ * // "username": "my_username"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.accountSummaries.list
* @memberOf! ()
*
@@ -3180,6 +3504,43 @@ export namespace analytics_v3 {
/**
* analytics.management.accountUserLinks.delete
* @desc Removes a user from the given account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.manage.users'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.accountUserLinks.delete({
+ * // Account ID to delete the user link for.
+ * accountId: 'placeholder-value',
+ * // Link ID to delete the user link for.
+ * linkId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.accountUserLinks.delete
* @memberOf! ()
*
@@ -3253,6 +3614,64 @@ export namespace analytics_v3 {
/**
* analytics.management.accountUserLinks.insert
* @desc Adds a new user to the given account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.manage.users'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.accountUserLinks.insert({
+ * // Account ID to create the user link for.
+ * accountId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "userRef": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "userRef": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.accountUserLinks.insert
* @memberOf! ()
*
@@ -3328,6 +3747,59 @@ export namespace analytics_v3 {
/**
* analytics.management.accountUserLinks.list
* @desc Lists account-user links for a given account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.manage.users',
+ * 'https://www.googleapis.com/auth/analytics.manage.users.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.accountUserLinks.list({
+ * // Account ID to retrieve the user links for.
+ * accountId: 'placeholder-value',
+ * // The maximum number of account-user links to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // An index of the first account-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.accountUserLinks.list
* @memberOf! ()
*
@@ -3404,6 +3876,66 @@ export namespace analytics_v3 {
/**
* analytics.management.accountUserLinks.update
* @desc Updates permissions for an existing user on the given account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.manage.users'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.accountUserLinks.update({
+ * // Account ID to update the account-user link for.
+ * accountId: 'placeholder-value',
+ * // Link ID to update the account-user link for.
+ * linkId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "userRef": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "userRef": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.accountUserLinks.update
* @memberOf! ()
*
@@ -3562,6 +4094,59 @@ export namespace analytics_v3 {
/**
* analytics.management.clientId.hashClientId
* @desc Hashes the given Client ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.clientId.hashClientId({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clientId": "my_clientId",
+ * // "kind": "my_kind",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientId": "my_clientId",
+ * // "hashedClientId": "my_hashedClientId",
+ * // "kind": "my_kind",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.clientId.hashClientId
* @memberOf! ()
*
@@ -3659,6 +4244,63 @@ export namespace analytics_v3 {
/**
* analytics.management.customDataSources.list
* @desc List custom data sources to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.customDataSources.list({
+ * // Account Id for the custom data sources to retrieve.
+ * accountId: 'd+',
+ * // The maximum number of custom data sources to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // A 1-based index of the first custom data source to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * // Web property Id for the custom data sources to retrieve.
+ * webPropertyId: 'UA-(d+)-(d+)',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0,
+ * // "username": "my_username"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.customDataSources.list
* @memberOf! ()
*
@@ -3768,6 +4410,64 @@ export namespace analytics_v3 {
/**
* analytics.management.customDimensions.get
* @desc Get a custom dimension to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.customDimensions.get({
+ * // Account ID for the custom dimension to retrieve.
+ * accountId: 'placeholder-value',
+ * // The ID of the custom dimension to retrieve.
+ * customDimensionId: 'placeholder-value',
+ * // Web property ID for the custom dimension to retrieve.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "id": "my_id",
+ * // "index": 0,
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "scope": "my_scope",
+ * // "selfLink": "my_selfLink",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.customDimensions.get
* @memberOf! ()
*
@@ -3844,6 +4544,78 @@ export namespace analytics_v3 {
/**
* analytics.management.customDimensions.insert
* @desc Create a new custom dimension.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.customDimensions.insert({
+ * // Account ID for the custom dimension to create.
+ * accountId: 'placeholder-value',
+ * // Web property ID for the custom dimension to create.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "id": "my_id",
+ * // "index": 0,
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "scope": "my_scope",
+ * // "selfLink": "my_selfLink",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "id": "my_id",
+ * // "index": 0,
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "scope": "my_scope",
+ * // "selfLink": "my_selfLink",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.customDimensions.insert
* @memberOf! ()
*
@@ -3920,6 +4692,62 @@ export namespace analytics_v3 {
/**
* analytics.management.customDimensions.list
* @desc Lists custom dimensions to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.customDimensions.list({
+ * // Account ID for the custom dimensions to retrieve.
+ * accountId: 'placeholder-value',
+ * // The maximum number of custom dimensions to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * // Web property ID for the custom dimensions to retrieve.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0,
+ * // "username": "my_username"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.customDimensions.list
* @memberOf! ()
*
@@ -3997,6 +4825,82 @@ export namespace analytics_v3 {
/**
* analytics.management.customDimensions.patch
* @desc Updates an existing custom dimension. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.customDimensions.patch({
+ * // Account ID for the custom dimension to update.
+ * accountId: 'placeholder-value',
+ * // Custom dimension ID for the custom dimension to update.
+ * customDimensionId: 'placeholder-value',
+ * // Force the update and ignore any warnings related to the custom dimension being linked to a custom data source / data set.
+ * ignoreCustomDataSourceLinks: 'placeholder-value',
+ * // Web property ID for the custom dimension to update.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "id": "my_id",
+ * // "index": 0,
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "scope": "my_scope",
+ * // "selfLink": "my_selfLink",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "id": "my_id",
+ * // "index": 0,
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "scope": "my_scope",
+ * // "selfLink": "my_selfLink",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.customDimensions.patch
* @memberOf! ()
*
@@ -4075,6 +4979,82 @@ export namespace analytics_v3 {
/**
* analytics.management.customDimensions.update
* @desc Updates an existing custom dimension.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.customDimensions.update({
+ * // Account ID for the custom dimension to update.
+ * accountId: 'placeholder-value',
+ * // Custom dimension ID for the custom dimension to update.
+ * customDimensionId: 'placeholder-value',
+ * // Force the update and ignore any warnings related to the custom dimension being linked to a custom data source / data set.
+ * ignoreCustomDataSourceLinks: 'placeholder-value',
+ * // Web property ID for the custom dimension to update.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "id": "my_id",
+ * // "index": 0,
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "scope": "my_scope",
+ * // "selfLink": "my_selfLink",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "id": "my_id",
+ * // "index": 0,
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "scope": "my_scope",
+ * // "selfLink": "my_selfLink",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.customDimensions.update
* @memberOf! ()
*
@@ -4284,6 +5264,67 @@ export namespace analytics_v3 {
/**
* analytics.management.customMetrics.get
* @desc Get a custom metric to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.customMetrics.get({
+ * // Account ID for the custom metric to retrieve.
+ * accountId: 'placeholder-value',
+ * // The ID of the custom metric to retrieve.
+ * customMetricId: 'placeholder-value',
+ * // Web property ID for the custom metric to retrieve.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "id": "my_id",
+ * // "index": 0,
+ * // "kind": "my_kind",
+ * // "max_value": "my_max_value",
+ * // "min_value": "my_min_value",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "scope": "my_scope",
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.customMetrics.get
* @memberOf! ()
*
@@ -4360,6 +5401,84 @@ export namespace analytics_v3 {
/**
* analytics.management.customMetrics.insert
* @desc Create a new custom metric.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.customMetrics.insert({
+ * // Account ID for the custom metric to create.
+ * accountId: 'placeholder-value',
+ * // Web property ID for the custom dimension to create.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "id": "my_id",
+ * // "index": 0,
+ * // "kind": "my_kind",
+ * // "max_value": "my_max_value",
+ * // "min_value": "my_min_value",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "scope": "my_scope",
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "id": "my_id",
+ * // "index": 0,
+ * // "kind": "my_kind",
+ * // "max_value": "my_max_value",
+ * // "min_value": "my_min_value",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "scope": "my_scope",
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.customMetrics.insert
* @memberOf! ()
*
@@ -4436,6 +5555,62 @@ export namespace analytics_v3 {
/**
* analytics.management.customMetrics.list
* @desc Lists custom metrics to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.customMetrics.list({
+ * // Account ID for the custom metrics to retrieve.
+ * accountId: 'placeholder-value',
+ * // The maximum number of custom metrics to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * // Web property ID for the custom metrics to retrieve.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0,
+ * // "username": "my_username"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.customMetrics.list
* @memberOf! ()
*
@@ -4513,6 +5688,88 @@ export namespace analytics_v3 {
/**
* analytics.management.customMetrics.patch
* @desc Updates an existing custom metric. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.customMetrics.patch({
+ * // Account ID for the custom metric to update.
+ * accountId: 'placeholder-value',
+ * // Custom metric ID for the custom metric to update.
+ * customMetricId: 'placeholder-value',
+ * // Force the update and ignore any warnings related to the custom metric being linked to a custom data source / data set.
+ * ignoreCustomDataSourceLinks: 'placeholder-value',
+ * // Web property ID for the custom metric to update.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "id": "my_id",
+ * // "index": 0,
+ * // "kind": "my_kind",
+ * // "max_value": "my_max_value",
+ * // "min_value": "my_min_value",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "scope": "my_scope",
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "id": "my_id",
+ * // "index": 0,
+ * // "kind": "my_kind",
+ * // "max_value": "my_max_value",
+ * // "min_value": "my_min_value",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "scope": "my_scope",
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.customMetrics.patch
* @memberOf! ()
*
@@ -4591,6 +5848,88 @@ export namespace analytics_v3 {
/**
* analytics.management.customMetrics.update
* @desc Updates an existing custom metric.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.customMetrics.update({
+ * // Account ID for the custom metric to update.
+ * accountId: 'placeholder-value',
+ * // Custom metric ID for the custom metric to update.
+ * customMetricId: 'placeholder-value',
+ * // Force the update and ignore any warnings related to the custom metric being linked to a custom data source / data set.
+ * ignoreCustomDataSourceLinks: 'placeholder-value',
+ * // Web property ID for the custom metric to update.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "id": "my_id",
+ * // "index": 0,
+ * // "kind": "my_kind",
+ * // "max_value": "my_max_value",
+ * // "min_value": "my_min_value",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "scope": "my_scope",
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "id": "my_id",
+ * // "index": 0,
+ * // "kind": "my_kind",
+ * // "max_value": "my_max_value",
+ * // "min_value": "my_min_value",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "scope": "my_scope",
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.customMetrics.update
* @memberOf! ()
*
@@ -4800,6 +6139,50 @@ export namespace analytics_v3 {
/**
* analytics.management.experiments.delete
* @desc Delete an experiment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.experiments.delete({
+ * // Account ID to which the experiment belongs
+ * accountId: 'placeholder-value',
+ * // ID of the experiment to delete
+ * experimentId: 'placeholder-value',
+ * // View (Profile) ID to which the experiment belongs
+ * profileId: 'placeholder-value',
+ * // Web property ID to which the experiment belongs
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.experiments.delete
* @memberOf! ()
*
@@ -4880,6 +6263,83 @@ export namespace analytics_v3 {
/**
* analytics.management.experiments.get
* @desc Returns an experiment to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.experiments.get({
+ * // Account ID to retrieve the experiment for.
+ * accountId: 'placeholder-value',
+ * // Experiment ID to retrieve the experiment for.
+ * experimentId: 'placeholder-value',
+ * // View (Profile) ID to retrieve the experiment for.
+ * profileId: 'placeholder-value',
+ * // Web property ID to retrieve the experiment for.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "created": "my_created",
+ * // "description": "my_description",
+ * // "editableInGaUi": false,
+ * // "endTime": "my_endTime",
+ * // "equalWeighting": false,
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "minimumExperimentLengthInDays": 0,
+ * // "name": "my_name",
+ * // "objectiveMetric": "my_objectiveMetric",
+ * // "optimizationType": "my_optimizationType",
+ * // "parentLink": {},
+ * // "profileId": "my_profileId",
+ * // "reasonExperimentEnded": "my_reasonExperimentEnded",
+ * // "rewriteVariationUrlsAsOriginal": false,
+ * // "selfLink": "my_selfLink",
+ * // "servingFramework": "my_servingFramework",
+ * // "snippet": "my_snippet",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "trafficCoverage": {},
+ * // "updated": "my_updated",
+ * // "variations": [],
+ * // "webPropertyId": "my_webPropertyId",
+ * // "winnerConfidenceLevel": {},
+ * // "winnerFound": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.experiments.get
* @memberOf! ()
*
@@ -4962,6 +6422,115 @@ export namespace analytics_v3 {
/**
* analytics.management.experiments.insert
* @desc Create a new experiment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.experiments.insert({
+ * // Account ID to create the experiment for.
+ * accountId: 'placeholder-value',
+ * // View (Profile) ID to create the experiment for.
+ * profileId: 'placeholder-value',
+ * // Web property ID to create the experiment for.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "created": "my_created",
+ * // "description": "my_description",
+ * // "editableInGaUi": false,
+ * // "endTime": "my_endTime",
+ * // "equalWeighting": false,
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "minimumExperimentLengthInDays": 0,
+ * // "name": "my_name",
+ * // "objectiveMetric": "my_objectiveMetric",
+ * // "optimizationType": "my_optimizationType",
+ * // "parentLink": {},
+ * // "profileId": "my_profileId",
+ * // "reasonExperimentEnded": "my_reasonExperimentEnded",
+ * // "rewriteVariationUrlsAsOriginal": false,
+ * // "selfLink": "my_selfLink",
+ * // "servingFramework": "my_servingFramework",
+ * // "snippet": "my_snippet",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "trafficCoverage": {},
+ * // "updated": "my_updated",
+ * // "variations": [],
+ * // "webPropertyId": "my_webPropertyId",
+ * // "winnerConfidenceLevel": {},
+ * // "winnerFound": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "created": "my_created",
+ * // "description": "my_description",
+ * // "editableInGaUi": false,
+ * // "endTime": "my_endTime",
+ * // "equalWeighting": false,
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "minimumExperimentLengthInDays": 0,
+ * // "name": "my_name",
+ * // "objectiveMetric": "my_objectiveMetric",
+ * // "optimizationType": "my_optimizationType",
+ * // "parentLink": {},
+ * // "profileId": "my_profileId",
+ * // "reasonExperimentEnded": "my_reasonExperimentEnded",
+ * // "rewriteVariationUrlsAsOriginal": false,
+ * // "selfLink": "my_selfLink",
+ * // "servingFramework": "my_servingFramework",
+ * // "snippet": "my_snippet",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "trafficCoverage": {},
+ * // "updated": "my_updated",
+ * // "variations": [],
+ * // "webPropertyId": "my_webPropertyId",
+ * // "winnerConfidenceLevel": {},
+ * // "winnerFound": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.experiments.insert
* @memberOf! ()
*
@@ -5039,6 +6608,65 @@ export namespace analytics_v3 {
/**
* analytics.management.experiments.list
* @desc Lists experiments to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.experiments.list({
+ * // Account ID to retrieve experiments for.
+ * accountId: 'd+',
+ * // The maximum number of experiments to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // View (Profile) ID to retrieve experiments for.
+ * profileId: 'd+',
+ * // An index of the first experiment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * // Web property ID to retrieve experiments for.
+ * webPropertyId: 'UA-(d+)-(d+)',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0,
+ * // "username": "my_username"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.experiments.list
* @memberOf! ()
*
@@ -5117,6 +6745,117 @@ export namespace analytics_v3 {
/**
* analytics.management.experiments.patch
* @desc Update an existing experiment. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.experiments.patch({
+ * // Account ID of the experiment to update.
+ * accountId: 'placeholder-value',
+ * // Experiment ID of the experiment to update.
+ * experimentId: 'placeholder-value',
+ * // View (Profile) ID of the experiment to update.
+ * profileId: 'placeholder-value',
+ * // Web property ID of the experiment to update.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "created": "my_created",
+ * // "description": "my_description",
+ * // "editableInGaUi": false,
+ * // "endTime": "my_endTime",
+ * // "equalWeighting": false,
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "minimumExperimentLengthInDays": 0,
+ * // "name": "my_name",
+ * // "objectiveMetric": "my_objectiveMetric",
+ * // "optimizationType": "my_optimizationType",
+ * // "parentLink": {},
+ * // "profileId": "my_profileId",
+ * // "reasonExperimentEnded": "my_reasonExperimentEnded",
+ * // "rewriteVariationUrlsAsOriginal": false,
+ * // "selfLink": "my_selfLink",
+ * // "servingFramework": "my_servingFramework",
+ * // "snippet": "my_snippet",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "trafficCoverage": {},
+ * // "updated": "my_updated",
+ * // "variations": [],
+ * // "webPropertyId": "my_webPropertyId",
+ * // "winnerConfidenceLevel": {},
+ * // "winnerFound": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "created": "my_created",
+ * // "description": "my_description",
+ * // "editableInGaUi": false,
+ * // "endTime": "my_endTime",
+ * // "equalWeighting": false,
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "minimumExperimentLengthInDays": 0,
+ * // "name": "my_name",
+ * // "objectiveMetric": "my_objectiveMetric",
+ * // "optimizationType": "my_optimizationType",
+ * // "parentLink": {},
+ * // "profileId": "my_profileId",
+ * // "reasonExperimentEnded": "my_reasonExperimentEnded",
+ * // "rewriteVariationUrlsAsOriginal": false,
+ * // "selfLink": "my_selfLink",
+ * // "servingFramework": "my_servingFramework",
+ * // "snippet": "my_snippet",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "trafficCoverage": {},
+ * // "updated": "my_updated",
+ * // "variations": [],
+ * // "webPropertyId": "my_webPropertyId",
+ * // "winnerConfidenceLevel": {},
+ * // "winnerFound": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.experiments.patch
* @memberOf! ()
*
@@ -5200,6 +6939,117 @@ export namespace analytics_v3 {
/**
* analytics.management.experiments.update
* @desc Update an existing experiment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.experiments.update({
+ * // Account ID of the experiment to update.
+ * accountId: 'placeholder-value',
+ * // Experiment ID of the experiment to update.
+ * experimentId: 'placeholder-value',
+ * // View (Profile) ID of the experiment to update.
+ * profileId: 'placeholder-value',
+ * // Web property ID of the experiment to update.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "created": "my_created",
+ * // "description": "my_description",
+ * // "editableInGaUi": false,
+ * // "endTime": "my_endTime",
+ * // "equalWeighting": false,
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "minimumExperimentLengthInDays": 0,
+ * // "name": "my_name",
+ * // "objectiveMetric": "my_objectiveMetric",
+ * // "optimizationType": "my_optimizationType",
+ * // "parentLink": {},
+ * // "profileId": "my_profileId",
+ * // "reasonExperimentEnded": "my_reasonExperimentEnded",
+ * // "rewriteVariationUrlsAsOriginal": false,
+ * // "selfLink": "my_selfLink",
+ * // "servingFramework": "my_servingFramework",
+ * // "snippet": "my_snippet",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "trafficCoverage": {},
+ * // "updated": "my_updated",
+ * // "variations": [],
+ * // "webPropertyId": "my_webPropertyId",
+ * // "winnerConfidenceLevel": {},
+ * // "winnerFound": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "created": "my_created",
+ * // "description": "my_description",
+ * // "editableInGaUi": false,
+ * // "endTime": "my_endTime",
+ * // "equalWeighting": false,
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "minimumExperimentLengthInDays": 0,
+ * // "name": "my_name",
+ * // "objectiveMetric": "my_objectiveMetric",
+ * // "optimizationType": "my_optimizationType",
+ * // "parentLink": {},
+ * // "profileId": "my_profileId",
+ * // "reasonExperimentEnded": "my_reasonExperimentEnded",
+ * // "rewriteVariationUrlsAsOriginal": false,
+ * // "selfLink": "my_selfLink",
+ * // "servingFramework": "my_servingFramework",
+ * // "snippet": "my_snippet",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "trafficCoverage": {},
+ * // "updated": "my_updated",
+ * // "variations": [],
+ * // "webPropertyId": "my_webPropertyId",
+ * // "winnerConfidenceLevel": {},
+ * // "winnerFound": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.experiments.update
* @memberOf! ()
*
@@ -5450,6 +7300,62 @@ export namespace analytics_v3 {
/**
* analytics.management.filters.delete
* @desc Delete a filter.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.filters.delete({
+ * // Account ID to delete the filter for.
+ * accountId: 'placeholder-value',
+ * // ID of the filter to be deleted.
+ * filterId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advancedDetails": {},
+ * // "created": "my_created",
+ * // "excludeDetails": {},
+ * // "id": "my_id",
+ * // "includeDetails": {},
+ * // "kind": "my_kind",
+ * // "lowercaseDetails": {},
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "searchAndReplaceDetails": {},
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "uppercaseDetails": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.filters.delete
* @memberOf! ()
*
@@ -5523,6 +7429,65 @@ export namespace analytics_v3 {
/**
* analytics.management.filters.get
* @desc Returns filters to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.filters.get({
+ * // Account ID to retrieve filters for.
+ * accountId: 'placeholder-value',
+ * // Filter ID to retrieve filters for.
+ * filterId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advancedDetails": {},
+ * // "created": "my_created",
+ * // "excludeDetails": {},
+ * // "id": "my_id",
+ * // "includeDetails": {},
+ * // "kind": "my_kind",
+ * // "lowercaseDetails": {},
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "searchAndReplaceDetails": {},
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "uppercaseDetails": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.filters.get
* @memberOf! ()
*
@@ -5596,6 +7561,82 @@ export namespace analytics_v3 {
/**
* analytics.management.filters.insert
* @desc Create a new filter.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.filters.insert({
+ * // Account ID to create filter for.
+ * accountId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advancedDetails": {},
+ * // "created": "my_created",
+ * // "excludeDetails": {},
+ * // "id": "my_id",
+ * // "includeDetails": {},
+ * // "kind": "my_kind",
+ * // "lowercaseDetails": {},
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "searchAndReplaceDetails": {},
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "uppercaseDetails": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advancedDetails": {},
+ * // "created": "my_created",
+ * // "excludeDetails": {},
+ * // "id": "my_id",
+ * // "includeDetails": {},
+ * // "kind": "my_kind",
+ * // "lowercaseDetails": {},
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "searchAndReplaceDetails": {},
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "uppercaseDetails": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.filters.insert
* @memberOf! ()
*
@@ -5668,6 +7709,60 @@ export namespace analytics_v3 {
/**
* analytics.management.filters.list
* @desc Lists all filters for an account
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.filters.list({
+ * // Account ID to retrieve filters for.
+ * accountId: 'd+',
+ * // The maximum number of filters to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0,
+ * // "username": "my_username"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.filters.list
* @memberOf! ()
*
@@ -5741,6 +7836,84 @@ export namespace analytics_v3 {
/**
* analytics.management.filters.patch
* @desc Updates an existing filter. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.filters.patch({
+ * // Account ID to which the filter belongs.
+ * accountId: 'placeholder-value',
+ * // ID of the filter to be updated.
+ * filterId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advancedDetails": {},
+ * // "created": "my_created",
+ * // "excludeDetails": {},
+ * // "id": "my_id",
+ * // "includeDetails": {},
+ * // "kind": "my_kind",
+ * // "lowercaseDetails": {},
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "searchAndReplaceDetails": {},
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "uppercaseDetails": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advancedDetails": {},
+ * // "created": "my_created",
+ * // "excludeDetails": {},
+ * // "id": "my_id",
+ * // "includeDetails": {},
+ * // "kind": "my_kind",
+ * // "lowercaseDetails": {},
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "searchAndReplaceDetails": {},
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "uppercaseDetails": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.filters.patch
* @memberOf! ()
*
@@ -5815,6 +7988,84 @@ export namespace analytics_v3 {
/**
* analytics.management.filters.update
* @desc Updates an existing filter.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.filters.update({
+ * // Account ID to which the filter belongs.
+ * accountId: 'placeholder-value',
+ * // ID of the filter to be updated.
+ * filterId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advancedDetails": {},
+ * // "created": "my_created",
+ * // "excludeDetails": {},
+ * // "id": "my_id",
+ * // "includeDetails": {},
+ * // "kind": "my_kind",
+ * // "lowercaseDetails": {},
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "searchAndReplaceDetails": {},
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "uppercaseDetails": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advancedDetails": {},
+ * // "created": "my_created",
+ * // "excludeDetails": {},
+ * // "id": "my_id",
+ * // "includeDetails": {},
+ * // "kind": "my_kind",
+ * // "lowercaseDetails": {},
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "searchAndReplaceDetails": {},
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "uppercaseDetails": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.filters.update
* @memberOf! ()
*
@@ -6008,6 +8259,72 @@ export namespace analytics_v3 {
/**
* analytics.management.goals.get
* @desc Gets a goal to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.goals.get({
+ * // Account ID to retrieve the goal for.
+ * accountId: 'placeholder-value',
+ * // Goal ID to retrieve the goal for.
+ * goalId: 'placeholder-value',
+ * // View (Profile) ID to retrieve the goal for.
+ * profileId: 'placeholder-value',
+ * // Web property ID to retrieve the goal for.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "eventDetails": {},
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "profileId": "my_profileId",
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "urlDestinationDetails": {},
+ * // "value": {},
+ * // "visitNumPagesDetails": {},
+ * // "visitTimeOnSiteDetails": {},
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.goals.get
* @memberOf! ()
*
@@ -6083,6 +8400,92 @@ export namespace analytics_v3 {
/**
* analytics.management.goals.insert
* @desc Create a new goal.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.goals.insert({
+ * // Account ID to create the goal for.
+ * accountId: 'placeholder-value',
+ * // View (Profile) ID to create the goal for.
+ * profileId: 'placeholder-value',
+ * // Web property ID to create the goal for.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "eventDetails": {},
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "profileId": "my_profileId",
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "urlDestinationDetails": {},
+ * // "value": {},
+ * // "visitNumPagesDetails": {},
+ * // "visitTimeOnSiteDetails": {},
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "eventDetails": {},
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "profileId": "my_profileId",
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "urlDestinationDetails": {},
+ * // "value": {},
+ * // "visitNumPagesDetails": {},
+ * // "visitTimeOnSiteDetails": {},
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.goals.insert
* @memberOf! ()
*
@@ -6158,6 +8561,65 @@ export namespace analytics_v3 {
/**
* analytics.management.goals.list
* @desc Lists goals to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.goals.list({
+ * // Account ID to retrieve goals for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to.
+ * accountId: 'placeholder-value',
+ * // The maximum number of goals to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // View (Profile) ID to retrieve goals for. Can either be a specific view (profile) ID or '~all', which refers to all the views (profiles) that user has access to.
+ * profileId: 'placeholder-value',
+ * // An index of the first goal to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * // Web property ID to retrieve goals for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0,
+ * // "username": "my_username"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.goals.list
* @memberOf! ()
*
@@ -6234,6 +8696,94 @@ export namespace analytics_v3 {
/**
* analytics.management.goals.patch
* @desc Updates an existing goal. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.goals.patch({
+ * // Account ID to update the goal.
+ * accountId: 'placeholder-value',
+ * // Index of the goal to be updated.
+ * goalId: 'placeholder-value',
+ * // View (Profile) ID to update the goal.
+ * profileId: 'placeholder-value',
+ * // Web property ID to update the goal.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "eventDetails": {},
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "profileId": "my_profileId",
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "urlDestinationDetails": {},
+ * // "value": {},
+ * // "visitNumPagesDetails": {},
+ * // "visitTimeOnSiteDetails": {},
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "eventDetails": {},
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "profileId": "my_profileId",
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "urlDestinationDetails": {},
+ * // "value": {},
+ * // "visitNumPagesDetails": {},
+ * // "visitTimeOnSiteDetails": {},
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.goals.patch
* @memberOf! ()
*
@@ -6310,6 +8860,94 @@ export namespace analytics_v3 {
/**
* analytics.management.goals.update
* @desc Updates an existing goal.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.goals.update({
+ * // Account ID to update the goal.
+ * accountId: 'placeholder-value',
+ * // Index of the goal to be updated.
+ * goalId: 'placeholder-value',
+ * // View (Profile) ID to update the goal.
+ * profileId: 'placeholder-value',
+ * // Web property ID to update the goal.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "eventDetails": {},
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "profileId": "my_profileId",
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "urlDestinationDetails": {},
+ * // "value": {},
+ * // "visitNumPagesDetails": {},
+ * // "visitTimeOnSiteDetails": {},
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "created": "my_created",
+ * // "eventDetails": {},
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "profileId": "my_profileId",
+ * // "selfLink": "my_selfLink",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "urlDestinationDetails": {},
+ * // "value": {},
+ * // "visitNumPagesDetails": {},
+ * // "visitTimeOnSiteDetails": {},
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.goals.update
* @memberOf! ()
*
@@ -6529,6 +9167,47 @@ export namespace analytics_v3 {
/**
* analytics.management.profileFilterLinks.delete
* @desc Delete a profile filter link.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.profileFilterLinks.delete({
+ * // Account ID to which the profile filter link belongs.
+ * accountId: 'd+',
+ * // ID of the profile filter link to delete.
+ * linkId: 'd+:d+',
+ * // Profile ID to which the filter link belongs.
+ * profileId: 'd+',
+ * // Web property Id to which the profile filter link belongs.
+ * webPropertyId: 'UA-(d+)-(d+)',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.profileFilterLinks.delete
* @memberOf! ()
*
@@ -6604,6 +9283,60 @@ export namespace analytics_v3 {
/**
* analytics.management.profileFilterLinks.get
* @desc Returns a single profile filter link.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.profileFilterLinks.get({
+ * // Account ID to retrieve profile filter link for.
+ * accountId: 'd+',
+ * // ID of the profile filter link.
+ * linkId: 'd+:d+',
+ * // Profile ID to retrieve filter link for.
+ * profileId: 'd+',
+ * // Web property Id to retrieve profile filter link for.
+ * webPropertyId: 'UA-(d+)-(d+)',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "filterRef": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "profileRef": {},
+ * // "rank": 0,
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.profileFilterLinks.get
* @memberOf! ()
*
@@ -6681,6 +9414,68 @@ export namespace analytics_v3 {
/**
* analytics.management.profileFilterLinks.insert
* @desc Create a new profile filter link.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.profileFilterLinks.insert({
+ * // Account ID to create profile filter link for.
+ * accountId: 'd+',
+ * // Profile ID to create filter link for.
+ * profileId: 'd+',
+ * // Web property Id to create profile filter link for.
+ * webPropertyId: 'UA-(d+)-(d+)',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "filterRef": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "profileRef": {},
+ * // "rank": 0,
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "filterRef": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "profileRef": {},
+ * // "rank": 0,
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.profileFilterLinks.insert
* @memberOf! ()
*
@@ -6758,6 +9553,64 @@ export namespace analytics_v3 {
/**
* analytics.management.profileFilterLinks.list
* @desc Lists all profile filter links for a profile.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.profileFilterLinks.list({
+ * // Account ID to retrieve profile filter links for.
+ * accountId: 'd+',
+ * // The maximum number of profile filter links to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // Profile ID to retrieve filter links for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has access to.
+ * profileId: 'placeholder-value',
+ * // An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * // Web property Id for profile filter links for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0,
+ * // "username": "my_username"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.profileFilterLinks.list
* @memberOf! ()
*
@@ -6836,6 +9689,70 @@ export namespace analytics_v3 {
/**
* analytics.management.profileFilterLinks.patch
* @desc Update an existing profile filter link. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.profileFilterLinks.patch({
+ * // Account ID to which profile filter link belongs.
+ * accountId: 'd+',
+ * // ID of the profile filter link to be updated.
+ * linkId: 'd+:d+',
+ * // Profile ID to which filter link belongs
+ * profileId: 'd+',
+ * // Web property Id to which profile filter link belongs
+ * webPropertyId: 'UA-(d+)-(d+)',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "filterRef": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "profileRef": {},
+ * // "rank": 0,
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "filterRef": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "profileRef": {},
+ * // "rank": 0,
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.profileFilterLinks.patch
* @memberOf! ()
*
@@ -6914,6 +9831,70 @@ export namespace analytics_v3 {
/**
* analytics.management.profileFilterLinks.update
* @desc Update an existing profile filter link.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.profileFilterLinks.update({
+ * // Account ID to which profile filter link belongs.
+ * accountId: 'd+',
+ * // ID of the profile filter link to be updated.
+ * linkId: 'd+:d+',
+ * // Profile ID to which filter link belongs
+ * profileId: 'd+',
+ * // Web property Id to which profile filter link belongs
+ * webPropertyId: 'UA-(d+)-(d+)',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "filterRef": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "profileRef": {},
+ * // "rank": 0,
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "filterRef": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "profileRef": {},
+ * // "rank": 0,
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.profileFilterLinks.update
* @memberOf! ()
*
@@ -7159,6 +10140,45 @@ export namespace analytics_v3 {
/**
* analytics.management.profiles.delete
* @desc Deletes a view (profile).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.profiles.delete({
+ * // Account ID to delete the view (profile) for.
+ * accountId: 'placeholder-value',
+ * // ID of the view (profile) to be deleted.
+ * profileId: 'placeholder-value',
+ * // Web property ID to delete the view (profile) for.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.profiles.delete
* @memberOf! ()
*
@@ -7233,6 +10253,78 @@ export namespace analytics_v3 {
/**
* analytics.management.profiles.get
* @desc Gets a view (profile) to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.profiles.get({
+ * // Account ID to retrieve the view (profile) for.
+ * accountId: '[0-9]+',
+ * // View (Profile) ID to retrieve the view (profile) for.
+ * profileId: '[0-9]+',
+ * // Web property ID to retrieve the view (profile) for.
+ * webPropertyId: 'UA-[0-9]+-[0-9]+',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "botFilteringEnabled": false,
+ * // "childLink": {},
+ * // "created": "my_created",
+ * // "currency": "my_currency",
+ * // "defaultPage": "my_defaultPage",
+ * // "eCommerceTracking": false,
+ * // "enhancedECommerceTracking": false,
+ * // "excludeQueryParameters": "my_excludeQueryParameters",
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "siteSearchCategoryParameters": "my_siteSearchCategoryParameters",
+ * // "siteSearchQueryParameters": "my_siteSearchQueryParameters",
+ * // "starred": false,
+ * // "stripSiteSearchCategoryParameters": false,
+ * // "stripSiteSearchQueryParameters": false,
+ * // "timezone": "my_timezone",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId",
+ * // "websiteUrl": "my_websiteUrl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.profiles.get
* @memberOf! ()
*
@@ -7307,6 +10399,106 @@ export namespace analytics_v3 {
/**
* analytics.management.profiles.insert
* @desc Create a new view (profile).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.profiles.insert({
+ * // Account ID to create the view (profile) for.
+ * accountId: 'placeholder-value',
+ * // Web property ID to create the view (profile) for.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "botFilteringEnabled": false,
+ * // "childLink": {},
+ * // "created": "my_created",
+ * // "currency": "my_currency",
+ * // "defaultPage": "my_defaultPage",
+ * // "eCommerceTracking": false,
+ * // "enhancedECommerceTracking": false,
+ * // "excludeQueryParameters": "my_excludeQueryParameters",
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "siteSearchCategoryParameters": "my_siteSearchCategoryParameters",
+ * // "siteSearchQueryParameters": "my_siteSearchQueryParameters",
+ * // "starred": false,
+ * // "stripSiteSearchCategoryParameters": false,
+ * // "stripSiteSearchQueryParameters": false,
+ * // "timezone": "my_timezone",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId",
+ * // "websiteUrl": "my_websiteUrl"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "botFilteringEnabled": false,
+ * // "childLink": {},
+ * // "created": "my_created",
+ * // "currency": "my_currency",
+ * // "defaultPage": "my_defaultPage",
+ * // "eCommerceTracking": false,
+ * // "enhancedECommerceTracking": false,
+ * // "excludeQueryParameters": "my_excludeQueryParameters",
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "siteSearchCategoryParameters": "my_siteSearchCategoryParameters",
+ * // "siteSearchQueryParameters": "my_siteSearchQueryParameters",
+ * // "starred": false,
+ * // "stripSiteSearchCategoryParameters": false,
+ * // "stripSiteSearchQueryParameters": false,
+ * // "timezone": "my_timezone",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId",
+ * // "websiteUrl": "my_websiteUrl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.profiles.insert
* @memberOf! ()
*
@@ -7381,6 +10573,63 @@ export namespace analytics_v3 {
/**
* analytics.management.profiles.list
* @desc Lists views (profiles) to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.profiles.list({
+ * // Account ID for the view (profiles) to retrieve. Can either be a specific account ID or '~all', which refers to all the accounts to which the user has access.
+ * accountId: 'placeholder-value',
+ * // The maximum number of views (profiles) to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * // Web property ID for the views (profiles) to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties to which the user has access.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0,
+ * // "username": "my_username"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.profiles.list
* @memberOf! ()
*
@@ -7456,6 +10705,108 @@ export namespace analytics_v3 {
/**
* analytics.management.profiles.patch
* @desc Updates an existing view (profile). This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.profiles.patch({
+ * // Account ID to which the view (profile) belongs
+ * accountId: 'placeholder-value',
+ * // ID of the view (profile) to be updated.
+ * profileId: 'placeholder-value',
+ * // Web property ID to which the view (profile) belongs
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "botFilteringEnabled": false,
+ * // "childLink": {},
+ * // "created": "my_created",
+ * // "currency": "my_currency",
+ * // "defaultPage": "my_defaultPage",
+ * // "eCommerceTracking": false,
+ * // "enhancedECommerceTracking": false,
+ * // "excludeQueryParameters": "my_excludeQueryParameters",
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "siteSearchCategoryParameters": "my_siteSearchCategoryParameters",
+ * // "siteSearchQueryParameters": "my_siteSearchQueryParameters",
+ * // "starred": false,
+ * // "stripSiteSearchCategoryParameters": false,
+ * // "stripSiteSearchQueryParameters": false,
+ * // "timezone": "my_timezone",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId",
+ * // "websiteUrl": "my_websiteUrl"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "botFilteringEnabled": false,
+ * // "childLink": {},
+ * // "created": "my_created",
+ * // "currency": "my_currency",
+ * // "defaultPage": "my_defaultPage",
+ * // "eCommerceTracking": false,
+ * // "enhancedECommerceTracking": false,
+ * // "excludeQueryParameters": "my_excludeQueryParameters",
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "siteSearchCategoryParameters": "my_siteSearchCategoryParameters",
+ * // "siteSearchQueryParameters": "my_siteSearchQueryParameters",
+ * // "starred": false,
+ * // "stripSiteSearchCategoryParameters": false,
+ * // "stripSiteSearchQueryParameters": false,
+ * // "timezone": "my_timezone",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId",
+ * // "websiteUrl": "my_websiteUrl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.profiles.patch
* @memberOf! ()
*
@@ -7531,6 +10882,108 @@ export namespace analytics_v3 {
/**
* analytics.management.profiles.update
* @desc Updates an existing view (profile).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.profiles.update({
+ * // Account ID to which the view (profile) belongs
+ * accountId: 'placeholder-value',
+ * // ID of the view (profile) to be updated.
+ * profileId: 'placeholder-value',
+ * // Web property ID to which the view (profile) belongs
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "botFilteringEnabled": false,
+ * // "childLink": {},
+ * // "created": "my_created",
+ * // "currency": "my_currency",
+ * // "defaultPage": "my_defaultPage",
+ * // "eCommerceTracking": false,
+ * // "enhancedECommerceTracking": false,
+ * // "excludeQueryParameters": "my_excludeQueryParameters",
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "siteSearchCategoryParameters": "my_siteSearchCategoryParameters",
+ * // "siteSearchQueryParameters": "my_siteSearchQueryParameters",
+ * // "starred": false,
+ * // "stripSiteSearchCategoryParameters": false,
+ * // "stripSiteSearchQueryParameters": false,
+ * // "timezone": "my_timezone",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId",
+ * // "websiteUrl": "my_websiteUrl"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "botFilteringEnabled": false,
+ * // "childLink": {},
+ * // "created": "my_created",
+ * // "currency": "my_currency",
+ * // "defaultPage": "my_defaultPage",
+ * // "eCommerceTracking": false,
+ * // "enhancedECommerceTracking": false,
+ * // "excludeQueryParameters": "my_excludeQueryParameters",
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "siteSearchCategoryParameters": "my_siteSearchCategoryParameters",
+ * // "siteSearchQueryParameters": "my_siteSearchQueryParameters",
+ * // "starred": false,
+ * // "stripSiteSearchCategoryParameters": false,
+ * // "stripSiteSearchQueryParameters": false,
+ * // "timezone": "my_timezone",
+ * // "type": "my_type",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId",
+ * // "websiteUrl": "my_websiteUrl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.profiles.update
* @memberOf! ()
*
@@ -7749,6 +11202,47 @@ export namespace analytics_v3 {
/**
* analytics.management.profileUserLinks.delete
* @desc Removes a user from the given view (profile).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.manage.users'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.profileUserLinks.delete({
+ * // Account ID to delete the user link for.
+ * accountId: 'placeholder-value',
+ * // Link ID to delete the user link for.
+ * linkId: 'placeholder-value',
+ * // View (Profile) ID to delete the user link for.
+ * profileId: 'placeholder-value',
+ * // Web Property ID to delete the user link for.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.profileUserLinks.delete
* @memberOf! ()
*
@@ -7824,6 +11318,68 @@ export namespace analytics_v3 {
/**
* analytics.management.profileUserLinks.insert
* @desc Adds a new user to the given view (profile).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.manage.users'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.profileUserLinks.insert({
+ * // Account ID to create the user link for.
+ * accountId: 'placeholder-value',
+ * // View (Profile) ID to create the user link for.
+ * profileId: 'placeholder-value',
+ * // Web Property ID to create the user link for.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "userRef": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "userRef": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.profileUserLinks.insert
* @memberOf! ()
*
@@ -7901,6 +11457,63 @@ export namespace analytics_v3 {
/**
* analytics.management.profileUserLinks.list
* @desc Lists profile-user links for a given view (profile).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.manage.users',
+ * 'https://www.googleapis.com/auth/analytics.manage.users.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.profileUserLinks.list({
+ * // Account ID which the given view (profile) belongs to.
+ * accountId: 'placeholder-value',
+ * // The maximum number of profile-user links to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // View (Profile) ID to retrieve the profile-user links for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has access to.
+ * profileId: 'placeholder-value',
+ * // An index of the first profile-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * // Web Property ID which the given view (profile) belongs to. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.profileUserLinks.list
* @memberOf! ()
*
@@ -7979,6 +11592,70 @@ export namespace analytics_v3 {
/**
* analytics.management.profileUserLinks.update
* @desc Updates permissions for an existing user on the given view (profile).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.manage.users'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.profileUserLinks.update({
+ * // Account ID to update the user link for.
+ * accountId: 'placeholder-value',
+ * // Link ID to update the user link for.
+ * linkId: 'placeholder-value',
+ * // View (Profile ID) to update the user link for.
+ * profileId: 'placeholder-value',
+ * // Web Property ID to update the user link for.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "userRef": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "userRef": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.profileUserLinks.update
* @memberOf! ()
*
@@ -8171,6 +11848,45 @@ export namespace analytics_v3 {
/**
* analytics.management.remarketingAudience.delete
* @desc Delete a remarketing audience.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.remarketingAudience.delete({
+ * // Account ID to which the remarketing audience belongs.
+ * accountId: 'placeholder-value',
+ * // The ID of the remarketing audience to delete.
+ * remarketingAudienceId: 'placeholder-value',
+ * // Web property ID to which the remarketing audience belongs.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.remarketingAudience.delete
* @memberOf! ()
*
@@ -8245,6 +11961,66 @@ export namespace analytics_v3 {
/**
* analytics.management.remarketingAudience.get
* @desc Gets a remarketing audience to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.remarketingAudience.get({
+ * // The account ID of the remarketing audience to retrieve.
+ * accountId: 'placeholder-value',
+ * // The ID of the remarketing audience to retrieve.
+ * remarketingAudienceId: 'placeholder-value',
+ * // The web property ID of the remarketing audience to retrieve.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "audienceDefinition": {},
+ * // "audienceType": "my_audienceType",
+ * // "created": "my_created",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "linkedAdAccounts": [],
+ * // "linkedViews": [],
+ * // "name": "my_name",
+ * // "stateBasedAudienceDefinition": {},
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.remarketingAudience.get
* @memberOf! ()
*
@@ -8321,6 +12097,82 @@ export namespace analytics_v3 {
/**
* analytics.management.remarketingAudience.insert
* @desc Creates a new remarketing audience.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.remarketingAudience.insert({
+ * // The account ID for which to create the remarketing audience.
+ * accountId: 'placeholder-value',
+ * // Web property ID for which to create the remarketing audience.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "audienceDefinition": {},
+ * // "audienceType": "my_audienceType",
+ * // "created": "my_created",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "linkedAdAccounts": [],
+ * // "linkedViews": [],
+ * // "name": "my_name",
+ * // "stateBasedAudienceDefinition": {},
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "audienceDefinition": {},
+ * // "audienceType": "my_audienceType",
+ * // "created": "my_created",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "linkedAdAccounts": [],
+ * // "linkedViews": [],
+ * // "name": "my_name",
+ * // "stateBasedAudienceDefinition": {},
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.remarketingAudience.insert
* @memberOf! ()
*
@@ -8397,6 +12249,64 @@ export namespace analytics_v3 {
/**
* analytics.management.remarketingAudience.list
* @desc Lists remarketing audiences to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.remarketingAudience.list({
+ * // The account ID of the remarketing audiences to retrieve.
+ * accountId: 'placeholder-value',
+ * // The maximum number of remarketing audiences to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ *
+ * type: 'placeholder-value',
+ * // The web property ID of the remarketing audiences to retrieve.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0,
+ * // "username": "my_username"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.remarketingAudience.list
* @memberOf! ()
*
@@ -8477,6 +12387,84 @@ export namespace analytics_v3 {
/**
* analytics.management.remarketingAudience.patch
* @desc Updates an existing remarketing audience. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.remarketingAudience.patch({
+ * // The account ID of the remarketing audience to update.
+ * accountId: 'placeholder-value',
+ * // The ID of the remarketing audience to update.
+ * remarketingAudienceId: 'placeholder-value',
+ * // The web property ID of the remarketing audience to update.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "audienceDefinition": {},
+ * // "audienceType": "my_audienceType",
+ * // "created": "my_created",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "linkedAdAccounts": [],
+ * // "linkedViews": [],
+ * // "name": "my_name",
+ * // "stateBasedAudienceDefinition": {},
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "audienceDefinition": {},
+ * // "audienceType": "my_audienceType",
+ * // "created": "my_created",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "linkedAdAccounts": [],
+ * // "linkedViews": [],
+ * // "name": "my_name",
+ * // "stateBasedAudienceDefinition": {},
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.remarketingAudience.patch
* @memberOf! ()
*
@@ -8554,6 +12542,84 @@ export namespace analytics_v3 {
/**
* analytics.management.remarketingAudience.update
* @desc Updates an existing remarketing audience.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.remarketingAudience.update({
+ * // The account ID of the remarketing audience to update.
+ * accountId: 'placeholder-value',
+ * // The ID of the remarketing audience to update.
+ * remarketingAudienceId: 'placeholder-value',
+ * // The web property ID of the remarketing audience to update.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "audienceDefinition": {},
+ * // "audienceType": "my_audienceType",
+ * // "created": "my_created",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "linkedAdAccounts": [],
+ * // "linkedViews": [],
+ * // "name": "my_name",
+ * // "stateBasedAudienceDefinition": {},
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "audienceDefinition": {},
+ * // "audienceType": "my_audienceType",
+ * // "created": "my_created",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "linkedAdAccounts": [],
+ * // "linkedViews": [],
+ * // "name": "my_name",
+ * // "stateBasedAudienceDefinition": {},
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.remarketingAudience.update
* @memberOf! ()
*
@@ -8778,6 +12844,59 @@ export namespace analytics_v3 {
/**
* analytics.management.segments.list
* @desc Lists segments to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.segments.list({
+ * // The maximum number of segments to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // An index of the first segment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0,
+ * // "username": "my_username"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.segments.list
* @memberOf! ()
*
@@ -8875,6 +12994,47 @@ export namespace analytics_v3 {
/**
* analytics.management.unsampledReports.delete
* @desc Deletes an unsampled report.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.unsampledReports.delete({
+ * // Account ID to delete the unsampled report for.
+ * accountId: 'placeholder-value',
+ * // View (Profile) ID to delete the unsampled report for.
+ * profileId: 'placeholder-value',
+ * // ID of the unsampled report to be deleted.
+ * unsampledReportId: 'placeholder-value',
+ * // Web property ID to delete the unsampled reports for.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.unsampledReports.delete
* @memberOf! ()
*
@@ -8960,6 +13120,74 @@ export namespace analytics_v3 {
/**
* analytics.management.unsampledReports.get
* @desc Returns a single unsampled report.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.unsampledReports.get({
+ * // Account ID to retrieve unsampled report for.
+ * accountId: 'placeholder-value',
+ * // View (Profile) ID to retrieve unsampled report for.
+ * profileId: 'placeholder-value',
+ * // ID of the unsampled report to retrieve.
+ * unsampledReportId: 'placeholder-value',
+ * // Web property ID to retrieve unsampled reports for.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "cloudStorageDownloadDetails": {},
+ * // "created": "my_created",
+ * // "dimensions": "my_dimensions",
+ * // "downloadType": "my_downloadType",
+ * // "driveDownloadDetails": {},
+ * // "end-date": "my_end-date",
+ * // "filters": "my_filters",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "metrics": "my_metrics",
+ * // "profileId": "my_profileId",
+ * // "segment": "my_segment",
+ * // "selfLink": "my_selfLink",
+ * // "start-date": "my_start-date",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.unsampledReports.get
* @memberOf! ()
*
@@ -9047,6 +13275,97 @@ export namespace analytics_v3 {
/**
* analytics.management.unsampledReports.insert
* @desc Create a new unsampled report.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.unsampledReports.insert({
+ * // Account ID to create the unsampled report for.
+ * accountId: 'placeholder-value',
+ * // View (Profile) ID to create the unsampled report for.
+ * profileId: 'placeholder-value',
+ * // Web property ID to create the unsampled report for.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "cloudStorageDownloadDetails": {},
+ * // "created": "my_created",
+ * // "dimensions": "my_dimensions",
+ * // "downloadType": "my_downloadType",
+ * // "driveDownloadDetails": {},
+ * // "end-date": "my_end-date",
+ * // "filters": "my_filters",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "metrics": "my_metrics",
+ * // "profileId": "my_profileId",
+ * // "segment": "my_segment",
+ * // "selfLink": "my_selfLink",
+ * // "start-date": "my_start-date",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "cloudStorageDownloadDetails": {},
+ * // "created": "my_created",
+ * // "dimensions": "my_dimensions",
+ * // "downloadType": "my_downloadType",
+ * // "driveDownloadDetails": {},
+ * // "end-date": "my_end-date",
+ * // "filters": "my_filters",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "metrics": "my_metrics",
+ * // "profileId": "my_profileId",
+ * // "segment": "my_segment",
+ * // "selfLink": "my_selfLink",
+ * // "start-date": "my_start-date",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "updated": "my_updated",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.unsampledReports.insert
* @memberOf! ()
*
@@ -9124,6 +13443,65 @@ export namespace analytics_v3 {
/**
* analytics.management.unsampledReports.list
* @desc Lists unsampled reports to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.unsampledReports.list({
+ * // Account ID to retrieve unsampled reports for. Must be a specific account ID, ~all is not supported.
+ * accountId: 'placeholder-value',
+ * // The maximum number of unsampled reports to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // View (Profile) ID to retrieve unsampled reports for. Must be a specific view (profile) ID, ~all is not supported.
+ * profileId: 'placeholder-value',
+ * // An index of the first unsampled report to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * // Web property ID to retrieve unsampled reports for. Must be a specific web property ID, ~all is not supported.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0,
+ * // "username": "my_username"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.unsampledReports.list
* @memberOf! ()
*
@@ -9311,6 +13689,56 @@ export namespace analytics_v3 {
/**
* analytics.management.uploads.deleteUploadData
* @desc Delete data associated with a previous upload.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.uploads.deleteUploadData({
+ * // Account Id for the uploads to be deleted.
+ * accountId: 'd+',
+ * // Custom data source Id for the uploads to be deleted.
+ * customDataSourceId: '.{22}',
+ * // Web property Id for the uploads to be deleted.
+ * webPropertyId: 'UA-(d+)-(d+)',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "customDataImportUids": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.uploads.deleteUploadData
* @memberOf! ()
*
@@ -9386,6 +13814,62 @@ export namespace analytics_v3 {
/**
* analytics.management.uploads.get
* @desc List uploads to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.uploads.get({
+ * // Account Id for the upload to retrieve.
+ * accountId: 'd+',
+ * // Custom data source Id for upload to retrieve.
+ * customDataSourceId: '.{22}',
+ * // Upload Id to retrieve.
+ * uploadId: '.{22}',
+ * // Web property Id for the upload to retrieve.
+ * webPropertyId: 'UA-(d+)-(d+)',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "customDataSourceId": "my_customDataSourceId",
+ * // "errors": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "status": "my_status",
+ * // "uploadTime": "my_uploadTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.uploads.get
* @memberOf! ()
*
@@ -9471,6 +13955,64 @@ export namespace analytics_v3 {
/**
* analytics.management.uploads.list
* @desc List uploads to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.uploads.list({
+ * // Account Id for the uploads to retrieve.
+ * accountId: 'd+',
+ * // Custom data source Id for uploads to retrieve.
+ * customDataSourceId: '.{22}',
+ * // The maximum number of uploads to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // A 1-based index of the first upload to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * // Web property Id for the uploads to retrieve.
+ * webPropertyId: 'UA-(d+)-(d+)',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.uploads.list
* @memberOf! ()
*
@@ -9547,6 +14089,67 @@ export namespace analytics_v3 {
/**
* analytics.management.uploads.uploadData
* @desc Upload data for a custom data source.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.uploads.uploadData({
+ * // Account Id associated with the upload.
+ * accountId: 'd+',
+ * // Custom data source Id to which the data being uploaded belongs.
+ * customDataSourceId: 'placeholder-value',
+ * // Web property UA-string associated with the upload.
+ * webPropertyId: 'UA-d+-d+',
+ *
+ * requestBody: {
+ * // request body parameters
+ * },
+ * media: {
+ * mimeType: 'placeholder-value',
+ * body: 'placeholder-value',
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "customDataSourceId": "my_customDataSourceId",
+ * // "errors": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "status": "my_status",
+ * // "uploadTime": "my_uploadTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.uploads.uploadData
* @memberOf! ()
*
@@ -9753,6 +14356,69 @@ export namespace analytics_v3 {
/**
* analytics.management.webproperties.get
* @desc Gets a web property to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.webproperties.get({
+ * // Account ID to retrieve the web property for.
+ * accountId: '[0-9]+',
+ * // ID to retrieve the web property for.
+ * webPropertyId: 'UA-[0-9]+-[0-9]+',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "childLink": {},
+ * // "created": "my_created",
+ * // "dataRetentionResetOnNewActivity": false,
+ * // "dataRetentionTtl": "my_dataRetentionTtl",
+ * // "defaultProfileId": "my_defaultProfileId",
+ * // "id": "my_id",
+ * // "industryVertical": "my_industryVertical",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "level": "my_level",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "permissions": {},
+ * // "profileCount": 0,
+ * // "selfLink": "my_selfLink",
+ * // "starred": false,
+ * // "updated": "my_updated",
+ * // "websiteUrl": "my_websiteUrl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.webproperties.get
* @memberOf! ()
*
@@ -9828,6 +14494,90 @@ export namespace analytics_v3 {
/**
* analytics.management.webproperties.insert
* @desc Create a new property if the account has fewer than 20 properties. Web properties are visible in the Google Analytics interface only if they have at least one profile.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.webproperties.insert({
+ * // Account ID to create the web property for.
+ * accountId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "childLink": {},
+ * // "created": "my_created",
+ * // "dataRetentionResetOnNewActivity": false,
+ * // "dataRetentionTtl": "my_dataRetentionTtl",
+ * // "defaultProfileId": "my_defaultProfileId",
+ * // "id": "my_id",
+ * // "industryVertical": "my_industryVertical",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "level": "my_level",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "permissions": {},
+ * // "profileCount": 0,
+ * // "selfLink": "my_selfLink",
+ * // "starred": false,
+ * // "updated": "my_updated",
+ * // "websiteUrl": "my_websiteUrl"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "childLink": {},
+ * // "created": "my_created",
+ * // "dataRetentionResetOnNewActivity": false,
+ * // "dataRetentionTtl": "my_dataRetentionTtl",
+ * // "defaultProfileId": "my_defaultProfileId",
+ * // "id": "my_id",
+ * // "industryVertical": "my_industryVertical",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "level": "my_level",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "permissions": {},
+ * // "profileCount": 0,
+ * // "selfLink": "my_selfLink",
+ * // "starred": false,
+ * // "updated": "my_updated",
+ * // "websiteUrl": "my_websiteUrl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.webproperties.insert
* @memberOf! ()
*
@@ -9903,6 +14653,61 @@ export namespace analytics_v3 {
/**
* analytics.management.webproperties.list
* @desc Lists web properties to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.webproperties.list({
+ * // Account ID to retrieve web properties for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to.
+ * accountId: 'placeholder-value',
+ * // The maximum number of web properties to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0,
+ * // "username": "my_username"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.webproperties.list
* @memberOf! ()
*
@@ -9979,6 +14784,92 @@ export namespace analytics_v3 {
/**
* analytics.management.webproperties.patch
* @desc Updates an existing web property. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.webproperties.patch({
+ * // Account ID to which the web property belongs
+ * accountId: 'placeholder-value',
+ * // Web property ID
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "childLink": {},
+ * // "created": "my_created",
+ * // "dataRetentionResetOnNewActivity": false,
+ * // "dataRetentionTtl": "my_dataRetentionTtl",
+ * // "defaultProfileId": "my_defaultProfileId",
+ * // "id": "my_id",
+ * // "industryVertical": "my_industryVertical",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "level": "my_level",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "permissions": {},
+ * // "profileCount": 0,
+ * // "selfLink": "my_selfLink",
+ * // "starred": false,
+ * // "updated": "my_updated",
+ * // "websiteUrl": "my_websiteUrl"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "childLink": {},
+ * // "created": "my_created",
+ * // "dataRetentionResetOnNewActivity": false,
+ * // "dataRetentionTtl": "my_dataRetentionTtl",
+ * // "defaultProfileId": "my_defaultProfileId",
+ * // "id": "my_id",
+ * // "industryVertical": "my_industryVertical",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "level": "my_level",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "permissions": {},
+ * // "profileCount": 0,
+ * // "selfLink": "my_selfLink",
+ * // "starred": false,
+ * // "updated": "my_updated",
+ * // "websiteUrl": "my_websiteUrl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.webproperties.patch
* @memberOf! ()
*
@@ -10055,6 +14946,92 @@ export namespace analytics_v3 {
/**
* analytics.management.webproperties.update
* @desc Updates an existing web property.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.webproperties.update({
+ * // Account ID to which the web property belongs
+ * accountId: 'placeholder-value',
+ * // Web property ID
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "childLink": {},
+ * // "created": "my_created",
+ * // "dataRetentionResetOnNewActivity": false,
+ * // "dataRetentionTtl": "my_dataRetentionTtl",
+ * // "defaultProfileId": "my_defaultProfileId",
+ * // "id": "my_id",
+ * // "industryVertical": "my_industryVertical",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "level": "my_level",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "permissions": {},
+ * // "profileCount": 0,
+ * // "selfLink": "my_selfLink",
+ * // "starred": false,
+ * // "updated": "my_updated",
+ * // "websiteUrl": "my_websiteUrl"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "childLink": {},
+ * // "created": "my_created",
+ * // "dataRetentionResetOnNewActivity": false,
+ * // "dataRetentionTtl": "my_dataRetentionTtl",
+ * // "defaultProfileId": "my_defaultProfileId",
+ * // "id": "my_id",
+ * // "industryVertical": "my_industryVertical",
+ * // "internalWebPropertyId": "my_internalWebPropertyId",
+ * // "kind": "my_kind",
+ * // "level": "my_level",
+ * // "name": "my_name",
+ * // "parentLink": {},
+ * // "permissions": {},
+ * // "profileCount": 0,
+ * // "selfLink": "my_selfLink",
+ * // "starred": false,
+ * // "updated": "my_updated",
+ * // "websiteUrl": "my_websiteUrl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.webproperties.update
* @memberOf! ()
*
@@ -10234,6 +15211,45 @@ export namespace analytics_v3 {
/**
* analytics.management.webPropertyAdWordsLinks.delete
* @desc Deletes a web property-Google Ads link.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.webPropertyAdWordsLinks.delete({
+ * // ID of the account which the given web property belongs to.
+ * accountId: 'placeholder-value',
+ * // Web property Google Ads link ID.
+ * webPropertyAdWordsLinkId: 'placeholder-value',
+ * // Web property ID to delete the Google Ads link for.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.webPropertyAdWordsLinks.delete
* @memberOf! ()
*
@@ -10312,6 +15328,59 @@ export namespace analytics_v3 {
/**
* analytics.management.webPropertyAdWordsLinks.get
* @desc Returns a web property-Google Ads link to which the user has access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.webPropertyAdWordsLinks.get({
+ * // ID of the account which the given web property belongs to.
+ * accountId: 'placeholder-value',
+ * // Web property-Google Ads link ID.
+ * webPropertyAdWordsLinkId: 'placeholder-value',
+ * // Web property ID to retrieve the Google Ads link for.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adWordsAccounts": [],
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "profileIds": [],
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.webPropertyAdWordsLinks.get
* @memberOf! ()
*
@@ -10392,6 +15461,68 @@ export namespace analytics_v3 {
/**
* analytics.management.webPropertyAdWordsLinks.insert
* @desc Creates a webProperty-Google Ads link.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.webPropertyAdWordsLinks.insert({
+ * // ID of the Google Analytics account to create the link for.
+ * accountId: 'placeholder-value',
+ * // Web property ID to create the link for.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adWordsAccounts": [],
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "profileIds": [],
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adWordsAccounts": [],
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "profileIds": [],
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.webPropertyAdWordsLinks.insert
* @memberOf! ()
*
@@ -10468,6 +15599,61 @@ export namespace analytics_v3 {
/**
* analytics.management.webPropertyAdWordsLinks.list
* @desc Lists webProperty-Google Ads links for a given web property.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.webPropertyAdWordsLinks.list({
+ * // ID of the account which the given web property belongs to.
+ * accountId: 'd+',
+ * // The maximum number of webProperty-Google Ads links to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // An index of the first webProperty-Google Ads link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * // Web property ID to retrieve the Google Ads links for.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.webPropertyAdWordsLinks.list
* @memberOf! ()
*
@@ -10545,6 +15731,70 @@ export namespace analytics_v3 {
/**
* analytics.management.webPropertyAdWordsLinks.patch
* @desc Updates an existing webProperty-Google Ads link. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.webPropertyAdWordsLinks.patch({
+ * // ID of the account which the given web property belongs to.
+ * accountId: 'placeholder-value',
+ * // Web property-Google Ads link ID.
+ * webPropertyAdWordsLinkId: 'placeholder-value',
+ * // Web property ID to retrieve the Google Ads link for.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adWordsAccounts": [],
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "profileIds": [],
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adWordsAccounts": [],
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "profileIds": [],
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.webPropertyAdWordsLinks.patch
* @memberOf! ()
*
@@ -10626,6 +15876,70 @@ export namespace analytics_v3 {
/**
* analytics.management.webPropertyAdWordsLinks.update
* @desc Updates an existing webProperty-Google Ads link.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.edit'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.webPropertyAdWordsLinks.update({
+ * // ID of the account which the given web property belongs to.
+ * accountId: 'placeholder-value',
+ * // Web property-Google Ads link ID.
+ * webPropertyAdWordsLinkId: 'placeholder-value',
+ * // Web property ID to retrieve the Google Ads link for.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adWordsAccounts": [],
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "profileIds": [],
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adWordsAccounts": [],
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "profileIds": [],
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.webPropertyAdWordsLinks.update
* @memberOf! ()
*
@@ -10850,6 +16164,45 @@ export namespace analytics_v3 {
/**
* analytics.management.webpropertyUserLinks.delete
* @desc Removes a user from the given web property.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.manage.users'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.webpropertyUserLinks.delete({
+ * // Account ID to delete the user link for.
+ * accountId: 'placeholder-value',
+ * // Link ID to delete the user link for.
+ * linkId: 'placeholder-value',
+ * // Web Property ID to delete the user link for.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.webpropertyUserLinks.delete
* @memberOf! ()
*
@@ -10924,6 +16277,66 @@ export namespace analytics_v3 {
/**
* analytics.management.webpropertyUserLinks.insert
* @desc Adds a new user to the given web property.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.manage.users'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.webpropertyUserLinks.insert({
+ * // Account ID to create the user link for.
+ * accountId: 'placeholder-value',
+ * // Web Property ID to create the user link for.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "userRef": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "userRef": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.webpropertyUserLinks.insert
* @memberOf! ()
*
@@ -11000,6 +16413,61 @@ export namespace analytics_v3 {
/**
* analytics.management.webpropertyUserLinks.list
* @desc Lists webProperty-user links for a given web property.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics.manage.users',
+ * 'https://www.googleapis.com/auth/analytics.manage.users.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.webpropertyUserLinks.list({
+ * // Account ID which the given web property belongs to.
+ * accountId: 'placeholder-value',
+ * // The maximum number of webProperty-user Links to include in this response.
+ * 'max-results': 'placeholder-value',
+ * // An index of the first webProperty-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ * 'start-index': 'placeholder-value',
+ * // Web Property ID for the webProperty-user links to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to.
+ * webPropertyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "itemsPerPage": 0,
+ * // "kind": "my_kind",
+ * // "nextLink": "my_nextLink",
+ * // "previousLink": "my_previousLink",
+ * // "startIndex": 0,
+ * // "totalResults": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.webpropertyUserLinks.list
* @memberOf! ()
*
@@ -11077,6 +16545,68 @@ export namespace analytics_v3 {
/**
* analytics.management.webpropertyUserLinks.update
* @desc Updates permissions for an existing user on the given web property.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.manage.users'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.management.webpropertyUserLinks.update({
+ * // Account ID to update the account-user link for.
+ * accountId: 'placeholder-value',
+ * // Link ID to update the account-user link for.
+ * linkId: 'placeholder-value',
+ * // Web property ID to update the account-user link for.
+ * webPropertyId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "userRef": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entity": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "permissions": {},
+ * // "selfLink": "my_selfLink",
+ * // "userRef": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.management.webpropertyUserLinks.update
* @memberOf! ()
*
@@ -11261,6 +16791,54 @@ export namespace analytics_v3 {
/**
* analytics.metadata.columns.list
* @desc Lists all columns for a report type
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.edit',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.metadata.columns.list({
+ * // Report type. Allowed Values: 'ga'. Where 'ga' corresponds to the Core Reporting API
+ * reportType: 'ga',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attributeNames": [],
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "totalResults": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.metadata.columns.list
* @memberOf! ()
*
@@ -11352,6 +16930,61 @@ export namespace analytics_v3 {
/**
* analytics.provisioning.createAccountTicket
* @desc Creates an account ticket.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.provision'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.provisioning.createAccountTicket({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "account": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "profile": {},
+ * // "redirectUri": "my_redirectUri",
+ * // "webproperty": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "account": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "profile": {},
+ * // "redirectUri": "my_redirectUri",
+ * // "webproperty": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.provisioning.createAccountTicket
* @memberOf! ()
*
@@ -11427,6 +17060,59 @@ export namespace analytics_v3 {
/**
* analytics.provisioning.createAccountTree
* @desc Provision account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.provision'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.provisioning.createAccountTree({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountName": "my_accountName",
+ * // "kind": "my_kind",
+ * // "profileName": "my_profileName",
+ * // "timezone": "my_timezone",
+ * // "webpropertyName": "my_webpropertyName",
+ * // "websiteUrl": "my_websiteUrl"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "account": {},
+ * // "kind": "my_kind",
+ * // "profile": {},
+ * // "webproperty": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.provisioning.createAccountTree
* @memberOf! ()
*
@@ -11545,6 +17231,61 @@ export namespace analytics_v3 {
/**
* analytics.userDeletion.userDeletionRequest.upsert
* @desc Insert or update a user deletion requests.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analytics.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analytics = google.analytics('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/analytics.user.deletion'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analytics.userDeletion.userDeletionRequest.upsert({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deletionRequestTime": "my_deletionRequestTime",
+ * // "firebaseProjectId": "my_firebaseProjectId",
+ * // "id": {},
+ * // "kind": "my_kind",
+ * // "propertyId": "my_propertyId",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deletionRequestTime": "my_deletionRequestTime",
+ * // "firebaseProjectId": "my_firebaseProjectId",
+ * // "id": {},
+ * // "kind": "my_kind",
+ * // "propertyId": "my_propertyId",
+ * // "webPropertyId": "my_webPropertyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analytics.userDeletion.userDeletionRequest.upsert
* @memberOf! ()
*
diff --git a/src/apis/analyticsreporting/v4.ts b/src/apis/analyticsreporting/v4.ts
index 7e9efb78f43..a7daaa808e2 100644
--- a/src/apis/analyticsreporting/v4.ts
+++ b/src/apis/analyticsreporting/v4.ts
@@ -1096,6 +1096,57 @@ export namespace analyticsreporting_v4 {
/**
* analyticsreporting.reports.batchGet
* @desc Returns the Analytics data.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analyticsreporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analyticsreporting = google.analyticsreporting('v4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analyticsreporting.reports.batchGet({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "reportRequests": [],
+ * // "useResourceQuotas": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "queryCost": 0,
+ * // "reports": [],
+ * // "resourceQuotasRemaining": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analyticsreporting.reports.batchGet
* @memberOf! ()
*
@@ -1189,6 +1240,62 @@ export namespace analyticsreporting_v4 {
/**
* analyticsreporting.userActivity.search
* @desc Returns User Activity data.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/analyticsreporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const analyticsreporting = google.analyticsreporting('v4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/analytics',
+ * 'https://www.googleapis.com/auth/analytics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await analyticsreporting.userActivity.search({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "activityTypes": [],
+ * // "dateRange": {},
+ * // "pageSize": 0,
+ * // "pageToken": "my_pageToken",
+ * // "user": {},
+ * // "viewId": "my_viewId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "sampleRate": {},
+ * // "sessions": [],
+ * // "totalRows": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias analyticsreporting.userActivity.search
* @memberOf! ()
*
diff --git a/src/apis/androiddeviceprovisioning/v1.ts b/src/apis/androiddeviceprovisioning/v1.ts
index beba95bafaa..e19730f7ead 100644
--- a/src/apis/androiddeviceprovisioning/v1.ts
+++ b/src/apis/androiddeviceprovisioning/v1.ts
@@ -808,6 +808,50 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.customers.list
* @desc Lists the user's customer accounts.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.customers.list({
+ * // The maximum number of customers to show in a page of results.
+ * // A number between 1 and 100 (inclusive).
+ * pageSize: 'placeholder-value',
+ * // A token specifying which result page to return.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "customers": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.customers.list
* @memberOf! ()
*
@@ -912,6 +956,73 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.customers.configurations.create
* @desc Creates a new configuration. Once created, a customer can apply the configuration to devices.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.customers.configurations.create({
+ * // Required. The customer that manages the configuration. An API resource name
+ * // in the format `customers/[CUSTOMER_ID]`.
+ * parent: 'customers/my-customer',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "companyName": "my_companyName",
+ * // "configurationId": "my_configurationId",
+ * // "configurationName": "my_configurationName",
+ * // "contactEmail": "my_contactEmail",
+ * // "contactPhone": "my_contactPhone",
+ * // "customMessage": "my_customMessage",
+ * // "dpcExtras": "my_dpcExtras",
+ * // "dpcResourcePath": "my_dpcResourcePath",
+ * // "isDefault": false,
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "companyName": "my_companyName",
+ * // "configurationId": "my_configurationId",
+ * // "configurationName": "my_configurationName",
+ * // "contactEmail": "my_contactEmail",
+ * // "contactPhone": "my_contactPhone",
+ * // "customMessage": "my_customMessage",
+ * // "dpcExtras": "my_dpcExtras",
+ * // "dpcResourcePath": "my_dpcResourcePath",
+ * // "isDefault": false,
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.customers.configurations.create
* @memberOf! ()
*
@@ -988,6 +1099,46 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.customers.configurations.delete
* @desc Deletes an unused configuration. The API call fails if the customer has devices with the configuration applied.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.customers.configurations.delete({
+ * // Required. The configuration to delete. An API resource name in the format
+ * // `customers/[CUSTOMER_ID]/configurations/[CONFIGURATION_ID]`. If the
+ * // configuration is applied to any devices, the API call fails.
+ * name: 'customers/my-customer/configurations/my-configuration',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.customers.configurations.delete
* @memberOf! ()
*
@@ -1058,6 +1209,56 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.customers.configurations.get
* @desc Gets the details of a configuration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.customers.configurations.get({
+ * // Required. The configuration to get. An API resource name in the format
+ * // `customers/[CUSTOMER_ID]/configurations/[CONFIGURATION_ID]`.
+ * name: 'customers/my-customer/configurations/my-configuration',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "companyName": "my_companyName",
+ * // "configurationId": "my_configurationId",
+ * // "configurationName": "my_configurationName",
+ * // "contactEmail": "my_contactEmail",
+ * // "contactPhone": "my_contactPhone",
+ * // "customMessage": "my_customMessage",
+ * // "dpcExtras": "my_dpcExtras",
+ * // "dpcResourcePath": "my_dpcResourcePath",
+ * // "isDefault": false,
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.customers.configurations.get
* @memberOf! ()
*
@@ -1130,6 +1331,47 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.customers.configurations.list
* @desc Lists a customer's configurations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.customers.configurations.list({
+ * // Required. The customer that manages the listed configurations. An API
+ * // resource name in the format `customers/[CUSTOMER_ID]`.
+ * parent: 'customers/my-customer',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "configurations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.customers.configurations.list
* @memberOf! ()
*
@@ -1214,6 +1456,79 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.customers.configurations.patch
* @desc Updates a configuration's field values.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.customers.configurations.patch({
+ * // Output only. The API resource name in the format
+ * // `customers/[CUSTOMER_ID]/configurations/[CONFIGURATION_ID]`. Assigned by
+ * // the server.
+ * name: 'customers/my-customer/configurations/my-configuration',
+ * // Required. The field mask applied to the target `Configuration` before
+ * // updating the fields. To learn more about using field masks, read
+ * // [FieldMask](/protocol-buffers/docs/reference/google.protobuf#fieldmask) in
+ * // the Protocol Buffers documentation.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "companyName": "my_companyName",
+ * // "configurationId": "my_configurationId",
+ * // "configurationName": "my_configurationName",
+ * // "contactEmail": "my_contactEmail",
+ * // "contactPhone": "my_contactPhone",
+ * // "customMessage": "my_customMessage",
+ * // "dpcExtras": "my_dpcExtras",
+ * // "dpcResourcePath": "my_dpcResourcePath",
+ * // "isDefault": false,
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "companyName": "my_companyName",
+ * // "configurationId": "my_configurationId",
+ * // "configurationName": "my_configurationName",
+ * // "contactEmail": "my_contactEmail",
+ * // "contactPhone": "my_contactPhone",
+ * // "customMessage": "my_customMessage",
+ * // "dpcExtras": "my_dpcExtras",
+ * // "dpcResourcePath": "my_dpcResourcePath",
+ * // "isDefault": false,
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.customers.configurations.patch
* @memberOf! ()
*
@@ -1370,6 +1685,56 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.customers.devices.applyConfiguration
* @desc Applies a Configuration to the device to register the device for zero-touch enrollment. After applying a configuration to a device, the device automatically provisions itself on first boot, or next factory reset.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.customers.devices.applyConfiguration(
+ * {
+ * // Required. The customer managing the device. An API resource name in the
+ * // format `customers/[CUSTOMER_ID]`.
+ * parent: 'customers/my-customer',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "configuration": "my_configuration",
+ * // "device": {}
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.customers.devices.applyConfiguration
* @memberOf! ()
*
@@ -1444,6 +1809,52 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.customers.devices.get
* @desc Gets the details of a device.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.customers.devices.get({
+ * // Required. The device to get. An API resource name in the format
+ * // `customers/[CUSTOMER_ID]/devices/[DEVICE_ID]`.
+ * name: 'customers/my-customer/devices/my-device',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "claims": [],
+ * // "configuration": "my_configuration",
+ * // "deviceId": "my_deviceId",
+ * // "deviceIdentifier": {},
+ * // "deviceMetadata": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.customers.devices.get
* @memberOf! ()
*
@@ -1514,6 +1925,53 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.customers.devices.list
* @desc Lists a customer's devices.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.customers.devices.list({
+ * // The maximum number of devices to show in a page of results.
+ * // Must be between 1 and 100 inclusive.
+ * pageSize: 'placeholder-value',
+ * // A token specifying which result page to return.
+ * pageToken: 'placeholder-value',
+ * // Required. The customer managing the devices. An API resource name in the
+ * // format `customers/[CUSTOMER_ID]`.
+ * parent: 'customers/my-customer',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "devices": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.customers.devices.list
* @memberOf! ()
*
@@ -1598,6 +2056,55 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.customers.devices.removeConfiguration
* @desc Removes a configuration from device.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.customers.devices.removeConfiguration(
+ * {
+ * // Required. The customer managing the device in the format
+ * // `customers/[CUSTOMER_ID]`.
+ * parent: 'customers/my-customer',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "device": {}
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.customers.devices.removeConfiguration
* @memberOf! ()
*
@@ -1671,6 +2178,53 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.customers.devices.unclaim
* @desc Unclaims a device from a customer and removes it from zero-touch enrollment. After removing a device, a customer must contact their reseller to register the device into zero-touch enrollment again.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.customers.devices.unclaim({
+ * // Required. The customer managing the device. An API resource name in the
+ * // format `customers/[CUSTOMER_ID]`.
+ * parent: 'customers/my-customer',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "device": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.customers.devices.unclaim
* @memberOf! ()
*
@@ -1836,6 +2390,47 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.customers.dpcs.list
* @desc Lists the DPCs (device policy controllers) that support zero-touch enrollment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.customers.dpcs.list({
+ * // Required. The customer that can use the DPCs in configurations. An API
+ * // resource name in the format `customers/[CUSTOMER_ID]`.
+ * parent: 'customers/my-customer',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dpcs": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.customers.dpcs.list
* @memberOf! ()
*
@@ -1930,6 +2525,50 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.operations.get({
+ * // The name of the operation resource.
+ * name: 'operations/.*',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.operations.get
* @memberOf! ()
*
@@ -2033,6 +2672,60 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.partners.customers.create
* @desc Creates a customer for zero-touch enrollment. After the method returns successfully, admin and owner roles can manage devices and EMM configs by calling API methods or using their zero-touch enrollment portal. The customer receives an email that welcomes them to zero-touch enrollment and explains how to sign into the portal.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.partners.customers.create({
+ * // Required. The parent resource ID in the format `partners/[PARTNER_ID]` that
+ * // identifies the reseller.
+ * parent: 'partners/my-partner',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "customer": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adminEmails": [],
+ * // "companyId": "my_companyId",
+ * // "companyName": "my_companyName",
+ * // "name": "my_name",
+ * // "ownerEmails": [],
+ * // "termsStatus": "my_termsStatus"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.partners.customers.create
* @memberOf! ()
*
@@ -2107,6 +2800,53 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.partners.customers.list
* @desc Lists the customers that are enrolled to the reseller identified by the `partnerId` argument. This list includes customers that the reseller created and customers that enrolled themselves using the portal.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.partners.customers.list({
+ * // The maximum number of results to be returned. If not specified or 0, all
+ * // the records are returned.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results returned by the server.
+ * pageToken: 'placeholder-value',
+ * // Required. The ID of the reseller partner.
+ * partnerId: '[^/]+',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "customers": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "totalSize": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.partners.customers.list
* @memberOf! ()
*
@@ -2231,6 +2971,58 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.partners.devices.claim
* @desc Claims a device for a customer and adds it to zero-touch enrollment. If the device is already claimed by another customer, the call returns an error.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.partners.devices.claim({
+ * // Required. The ID of the reseller partner.
+ * partnerId: '[^/]+',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "customerId": "my_customerId",
+ * // "deviceIdentifier": {},
+ * // "deviceMetadata": {},
+ * // "sectionType": "my_sectionType"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deviceId": "my_deviceId",
+ * // "deviceName": "my_deviceName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.partners.devices.claim
* @memberOf! ()
*
@@ -2307,6 +3099,58 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.partners.devices.claimAsync
* @desc Claims a batch of devices for a customer asynchronously. Adds the devices to zero-touch enrollment. To learn more, read [Long‑running batch operations](/zero-touch/guides/how-it-works#operations).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.partners.devices.claimAsync({
+ * // Required. The ID of the reseller partner.
+ * partnerId: '[^/]+',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "claims": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.partners.devices.claimAsync
* @memberOf! ()
*
@@ -2382,6 +3226,60 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.partners.devices.findByIdentifier
* @desc Finds devices by hardware identifiers, such as IMEI.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.partners.devices.findByIdentifier(
+ * {
+ * // Required. The ID of the reseller partner.
+ * partnerId: '[^/]+',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deviceIdentifier": {},
+ * // "limit": "my_limit",
+ * // "pageToken": "my_pageToken"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "devices": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "totalSize": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.partners.devices.findByIdentifier
* @memberOf! ()
*
@@ -2474,6 +3372,59 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.partners.devices.findByOwner
* @desc Finds devices claimed for customers. The results only contain devices registered to the reseller that's identified by the `partnerId` argument. The customer's devices purchased from other resellers don't appear in the results.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.partners.devices.findByOwner({
+ * // Required. The ID of the reseller partner.
+ * partnerId: '[^/]+',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "customerId": [],
+ * // "limit": "my_limit",
+ * // "pageToken": "my_pageToken",
+ * // "sectionType": "my_sectionType"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "devices": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "totalSize": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.partners.devices.findByOwner
* @memberOf! ()
*
@@ -2556,6 +3507,52 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.partners.devices.get
* @desc Gets a device.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.partners.devices.get({
+ * // Required. The device API resource name in the format
+ * // `partners/[PARTNER_ID]/devices/[DEVICE_ID]`.
+ * name: 'partners/my-partner/devices/my-device',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "claims": [],
+ * // "configuration": "my_configuration",
+ * // "deviceId": "my_deviceId",
+ * // "deviceIdentifier": {},
+ * // "deviceMetadata": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.partners.devices.get
* @memberOf! ()
*
@@ -2626,6 +3623,56 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.partners.devices.metadata
* @desc Updates reseller metadata associated with the device.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.partners.devices.metadata({
+ * // Required. The ID of the device.
+ * deviceId: '[^/]+',
+ * // Required. The owner of the newly set metadata. Set this to the partner ID.
+ * metadataOwnerId: '[^/]+',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deviceMetadata": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.partners.devices.metadata
* @memberOf! ()
*
@@ -2703,6 +3750,56 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.partners.devices.unclaim
* @desc Unclaims a device from a customer and removes it from zero-touch enrollment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.partners.devices.unclaim({
+ * // Required. The ID of the reseller partner.
+ * partnerId: '[^/]+',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deviceId": "my_deviceId",
+ * // "deviceIdentifier": {},
+ * // "sectionType": "my_sectionType",
+ * // "vacationModeDays": 0,
+ * // "vacationModeExpireTime": "my_vacationModeExpireTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.partners.devices.unclaim
* @memberOf! ()
*
@@ -2776,6 +3873,58 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.partners.devices.unclaimAsync
* @desc Unclaims a batch of devices for a customer asynchronously. Removes the devices from zero-touch enrollment. To learn more, read [Long‑running batch operations](/zero-touch/guides/how-it-works#operations).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.partners.devices.unclaimAsync({
+ * // Required. The reseller partner ID.
+ * partnerId: '[^/]+',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "unclaims": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.partners.devices.unclaimAsync
* @memberOf! ()
*
@@ -2851,6 +4000,60 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.partners.devices.updateMetadataAsync
* @desc Updates the reseller metadata attached to a batch of devices. This method updates devices asynchronously and returns an `Operation` that can be used to track progress. Read [Long‑running batch operations](/zero-touch/guides/how-it-works#operations).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.partners.devices.updateMetadataAsync(
+ * {
+ * // Required. The reseller partner ID.
+ * partnerId: '[^/]+',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "updates": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.partners.devices.updateMetadataAsync
* @memberOf! ()
*
@@ -3088,6 +4291,52 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.partners.vendors.list
* @desc Lists the vendors of the partner.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.partners.vendors.list({
+ * // The maximum number of results to be returned.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results returned by the server.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name in the format `partners/[PARTNER_ID]`.
+ * parent: 'partners/my-partner',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "totalSize": 0,
+ * // "vendors": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.partners.vendors.list
* @memberOf! ()
*
@@ -3193,6 +4442,53 @@ export namespace androiddeviceprovisioning_v1 {
/**
* androiddeviceprovisioning.partners.vendors.customers.list
* @desc Lists the customers of the vendor.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androiddeviceprovisioning.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androiddeviceprovisioning = google.androiddeviceprovisioning('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androiddeviceprovisioning.partners.vendors.customers.list({
+ * // The maximum number of results to be returned.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results returned by the server.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name in the format
+ * // `partners/[PARTNER_ID]/vendors/[VENDOR_ID]`.
+ * parent: 'partners/my-partner/vendors/my-vendor',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "customers": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "totalSize": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androiddeviceprovisioning.partners.vendors.customers.list
* @memberOf! ()
*
diff --git a/src/apis/androidenterprise/v1.ts b/src/apis/androidenterprise/v1.ts
index 28548174d08..00c13316b10 100644
--- a/src/apis/androidenterprise/v1.ts
+++ b/src/apis/androidenterprise/v1.ts
@@ -1563,6 +1563,45 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.devices.forceReportUpload
* @desc Uploads a report containing any changes in app states on the device since the last report was generated. You can call this method up to 3 times every 24 hours for a given device.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.devices.forceReportUpload({
+ * // The ID of the device.
+ * deviceId: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.devices.forceReportUpload
* @memberOf! ()
*
@@ -1637,6 +1676,54 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.devices.get
* @desc Retrieves the details of a device.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.devices.get({
+ * // The ID of the device.
+ * deviceId: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "androidId": "my_androidId",
+ * // "kind": "my_kind",
+ * // "managementType": "my_managementType",
+ * // "policy": {},
+ * // "report": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.devices.get
* @memberOf! ()
*
@@ -1710,6 +1797,51 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.devices.getState
* @desc Retrieves whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is only supported for Google-managed users.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.devices.getState({
+ * // The ID of the device.
+ * deviceId: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountState": "my_accountState",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.devices.getState
* @memberOf! ()
*
@@ -1785,6 +1917,49 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.devices.list
* @desc Retrieves the IDs of all of a user's devices.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.devices.list({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "device": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.devices.list
* @memberOf! ()
*
@@ -1859,6 +2034,60 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.devices.setState
* @desc Sets whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is only supported for Google-managed users.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.devices.setState({
+ * // The ID of the device.
+ * deviceId: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountState": "my_accountState",
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountState": "my_accountState",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.devices.setState
* @memberOf! ()
*
@@ -1935,6 +2164,70 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.devices.update
* @desc Updates the device policy
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.devices.update({
+ * // The ID of the device.
+ * deviceId: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // Mask that identifies which fields to update. If not set, all modifiable fields will be modified.
+ * //
+ * // When set in a query parameter, this field should be specified as updateMask=,,...
+ * updateMask: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "androidId": "my_androidId",
+ * // "kind": "my_kind",
+ * // "managementType": "my_managementType",
+ * // "policy": {},
+ * // "report": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "androidId": "my_androidId",
+ * // "kind": "my_kind",
+ * // "managementType": "my_managementType",
+ * // "policy": {},
+ * // "report": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.devices.update
* @memberOf! ()
*
@@ -2143,6 +2436,41 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.enterprises.acknowledgeNotificationSet
* @desc Acknowledges notifications that were received from Enterprises.PullNotificationSet to prevent subsequent calls from returning the same notifications.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.enterprises.acknowledgeNotificationSet({
+ * // The notification set ID as returned by Enterprises.PullNotificationSet. This must be provided.
+ * notificationSetId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.enterprises.acknowledgeNotificationSet
* @memberOf! ()
*
@@ -2215,6 +2543,52 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.enterprises.completeSignup
* @desc Completes the signup flow, by specifying the Completion token and Enterprise token. This request must not be called multiple times for a given Enterprise Token.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.enterprises.completeSignup({
+ * // The Completion token initially returned by GenerateSignupUrl.
+ * completionToken: 'placeholder-value',
+ * // The Enterprise token appended to the Callback URL.
+ * enterpriseToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "administrator": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "primaryDomain": "my_primaryDomain"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.enterprises.completeSignup
* @memberOf! ()
*
@@ -2289,6 +2663,62 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.enterprises.createWebToken
* @desc Returns a unique token to access an embeddable UI. To generate a web UI, pass the generated token into the managed Google Play javascript API. Each token may only be used to start one UI session. See the javascript API documentation for further information.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.enterprises.createWebToken({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "managedConfigurations": {},
+ * // "parent": "my_parent",
+ * // "permission": [],
+ * // "playSearch": {},
+ * // "privateApps": {},
+ * // "storeBuilder": {},
+ * // "webApps": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "token": "my_token"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.enterprises.createWebToken
* @memberOf! ()
*
@@ -2368,6 +2798,62 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.enterprises.enroll
* @desc Enrolls an enterprise with the calling EMM.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.enterprises.enroll({
+ * // The token provided by the enterprise to register the EMM.
+ * token: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "administrator": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "primaryDomain": "my_primaryDomain"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "administrator": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "primaryDomain": "my_primaryDomain"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.enterprises.enroll
* @memberOf! ()
*
@@ -2443,6 +2929,49 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.enterprises.generateSignupUrl
* @desc Generates a sign-up URL.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.enterprises.generateSignupUrl({
+ * // The callback URL to which the Admin will be redirected after successfully creating an enterprise. Before redirecting there the system will add a single query parameter to this URL named "enterpriseToken" which will contain an opaque token to be used for the CompleteSignup request.
+ * // Beware that this means that the URL will be parsed, the parameter added and then a new URL formatted, i.e. there may be some minor formatting changes and, more importantly, the URL must be well-formed so that it can be parsed.
+ * callbackUrl: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "completionToken": "my_completionToken",
+ * // "kind": "my_kind",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.enterprises.generateSignupUrl
* @memberOf! ()
*
@@ -2516,6 +3045,50 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.enterprises.get
* @desc Retrieves the name and domain of an enterprise.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.enterprises.get({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "administrator": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "primaryDomain": "my_primaryDomain"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.enterprises.get
* @memberOf! ()
*
@@ -2588,6 +3161,50 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.enterprises.getServiceAccount
* @desc Returns a service account and credentials. The service account can be bound to the enterprise by calling setAccount. The service account is unique to this enterprise and EMM, and will be deleted if the enterprise is unbound. The credentials contain private key data and are not stored server-side. This method can only be called after calling Enterprises.Enroll or Enterprises.CompleteSignup, and before Enterprises.SetAccount; at other times it will return an error. Subsequent calls after the first will generate a new, unique set of credentials, and invalidate the previously generated credentials. Once the service account is bound to the enterprise, it can be managed using the serviceAccountKeys resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.enterprises.getServiceAccount({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The type of credential to return with the service account. Required.
+ * keyType: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "key": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.enterprises.getServiceAccount
* @memberOf! ()
*
@@ -2665,6 +3282,48 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.enterprises.getStoreLayout
* @desc Returns the store layout for the enterprise. If the store layout has not been set, returns "basic" as the store layout type and no homepage.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.enterprises.getStoreLayout({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "homepageId": "my_homepageId",
+ * // "kind": "my_kind",
+ * // "storeLayoutType": "my_storeLayoutType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.enterprises.getStoreLayout
* @memberOf! ()
*
@@ -2739,6 +3398,47 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.enterprises.list
* @desc Looks up an enterprise by domain name. This is only supported for enterprises created via the Google-initiated creation flow. Lookup of the id is not needed for enterprises created via the EMM-initiated flow since the EMM learns the enterprise ID in the callback specified in the Enterprises.generateSignupUrl call.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.enterprises.list({
+ * // The exact primary domain name of the enterprise to look up.
+ * domain: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "enterprise": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.enterprises.list
* @memberOf! ()
*
@@ -2814,6 +3514,51 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.enterprises.pullNotificationSet
* @desc Pulls and returns a notification set for the enterprises associated with the service account authenticated for the request. The notification set may be empty if no notification are pending. A notification set returned needs to be acknowledged within 20 seconds by calling Enterprises.AcknowledgeNotificationSet, unless the notification set is empty. Notifications that are not acknowledged within the 20 seconds will eventually be included again in the response to another PullNotificationSet request, and those that are never acknowledged will ultimately be deleted according to the Google Cloud Platform Pub/Sub system policy. Multiple requests might be performed concurrently to retrieve notifications, in which case the pending notifications (if any) will be split among each caller, if any are pending. If no notifications are present, an empty notification list is returned. Subsequent requests may return more notifications once they become available.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.enterprises.pullNotificationSet({
+ * // The request mode for pulling notifications.
+ * // Specifying waitForNotifications will cause the request to block and wait until one or more notifications are present, or return an empty notification list if no notifications are present after some time.
+ * // Speciying returnImmediately will cause the request to immediately return the pending notifications, or an empty list if no notifications are present.
+ * // If omitted, defaults to waitForNotifications.
+ * requestMode: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "notification": [],
+ * // "notificationSetId": "my_notificationSetId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.enterprises.pullNotificationSet
* @memberOf! ()
*
@@ -2889,6 +3634,47 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.enterprises.sendTestPushNotification
* @desc Sends a test notification to validate the EMM integration with the Google Cloud Pub/Sub service for this enterprise.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.enterprises.sendTestPushNotification({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "messageId": "my_messageId",
+ * // "topicName": "my_topicName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.enterprises.sendTestPushNotification
* @memberOf! ()
*
@@ -2988,6 +3774,56 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.enterprises.setAccount
* @desc Sets the account that will be used to authenticate to the API as the enterprise.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.enterprises.setAccount({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountEmail": "my_accountEmail",
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountEmail": "my_accountEmail",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.enterprises.setAccount
* @memberOf! ()
*
@@ -3063,6 +3899,58 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.enterprises.setStoreLayout
* @desc Sets the store layout for the enterprise. By default, storeLayoutType is set to "basic" and the basic store layout is enabled. The basic layout only contains apps approved by the admin, and that have been added to the available product set for a user (using the setAvailableProductSet call). Apps on the page are sorted in order of their product ID value. If you create a custom store layout (by setting storeLayoutType = "custom" and setting a homepage), the basic store layout is disabled.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.enterprises.setStoreLayout({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "homepageId": "my_homepageId",
+ * // "kind": "my_kind",
+ * // "storeLayoutType": "my_storeLayoutType"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "homepageId": "my_homepageId",
+ * // "kind": "my_kind",
+ * // "storeLayoutType": "my_storeLayoutType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.enterprises.setStoreLayout
* @memberOf! ()
*
@@ -3138,6 +4026,41 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.enterprises.unenroll
* @desc Unenrolls an enterprise from the calling EMM.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.enterprises.unenroll({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.enterprises.unenroll
* @memberOf! ()
*
@@ -3412,6 +4335,45 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.entitlements.delete
* @desc Removes an entitlement to an app for a user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.entitlements.delete({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm".
+ * entitlementId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.entitlements.delete
* @memberOf! ()
*
@@ -3486,6 +4448,52 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.entitlements.get
* @desc Retrieves details of an entitlement.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.entitlements.get({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm".
+ * entitlementId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "productId": "my_productId",
+ * // "reason": "my_reason"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.entitlements.get
* @memberOf! ()
*
@@ -3561,6 +4569,49 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.entitlements.list
* @desc Lists all entitlements for the specified user. Only the ID is set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.entitlements.list({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entitlement": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.entitlements.list
* @memberOf! ()
*
@@ -3638,6 +4689,64 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.entitlements.update
* @desc Adds or updates an entitlement to an app for a user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.entitlements.update({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm".
+ * entitlementId: 'placeholder-value',
+ * // Set to true to also install the product on all the user's devices where possible. Failure to install on one or more devices will not prevent this operation from returning successfully, as long as the entitlement was successfully assigned to the user.
+ * install: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "productId": "my_productId",
+ * // "reason": "my_reason"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "productId": "my_productId",
+ * // "reason": "my_reason"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.entitlements.update
* @memberOf! ()
*
@@ -3808,6 +4917,54 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.grouplicenses.get
* @desc Retrieves details of an enterprise's group license for a product.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.grouplicenses.get({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the product the group license is for, e.g. "app:com.google.android.gm".
+ * groupLicenseId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "acquisitionKind": "my_acquisitionKind",
+ * // "approval": "my_approval",
+ * // "kind": "my_kind",
+ * // "numProvisioned": 0,
+ * // "numPurchased": 0,
+ * // "permissions": "my_permissions",
+ * // "productId": "my_productId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.grouplicenses.get
* @memberOf! ()
*
@@ -3883,6 +5040,47 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.grouplicenses.list
* @desc Retrieves IDs of all products for which the enterprise has a group license.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.grouplicenses.list({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "groupLicense": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.grouplicenses.list
* @memberOf! ()
*
@@ -4000,6 +5198,49 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.grouplicenseusers.list
* @desc Retrieves the IDs of the users who have been granted entitlements under the license.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.grouplicenseusers.list({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the product the group license is for, e.g. "app:com.google.android.gm".
+ * groupLicenseId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "user": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.grouplicenseusers.list
* @memberOf! ()
*
@@ -4108,6 +5349,47 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.installs.delete
* @desc Requests to remove an app from a device. A call to get or list will still show the app as installed on the device until it is actually removed.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.installs.delete({
+ * // The Android ID of the device.
+ * deviceId: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the product represented by the install, e.g. "app:com.google.android.gm".
+ * installId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.installs.delete
* @memberOf! ()
*
@@ -4182,6 +5464,55 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.installs.get
* @desc Retrieves details of an installation of an app on a device.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.installs.get({
+ * // The Android ID of the device.
+ * deviceId: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the product represented by the install, e.g. "app:com.google.android.gm".
+ * installId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "installState": "my_installState",
+ * // "kind": "my_kind",
+ * // "productId": "my_productId",
+ * // "versionCode": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.installs.get
* @memberOf! ()
*
@@ -4256,6 +5587,51 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.installs.list
* @desc Retrieves the details of all apps installed on the specified device.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.installs.list({
+ * // The Android ID of the device.
+ * deviceId: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "install": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.installs.list
* @memberOf! ()
*
@@ -4333,6 +5709,66 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.installs.update
* @desc Requests to install the latest version of an app to a device. If the app is already installed, then it is updated to the latest version if necessary.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.installs.update({
+ * // The Android ID of the device.
+ * deviceId: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the product represented by the install, e.g. "app:com.google.android.gm".
+ * installId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "installState": "my_installState",
+ * // "kind": "my_kind",
+ * // "productId": "my_productId",
+ * // "versionCode": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "installState": "my_installState",
+ * // "kind": "my_kind",
+ * // "productId": "my_productId",
+ * // "versionCode": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.installs.update
* @memberOf! ()
*
@@ -4509,6 +5945,47 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.managedconfigurationsfordevice.delete
* @desc Removes a per-device managed configuration for an app for the specified device.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.managedconfigurationsfordevice.delete({
+ * // The Android ID of the device.
+ * deviceId: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm".
+ * managedConfigurationForDeviceId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.managedconfigurationsfordevice.delete
* @memberOf! ()
*
@@ -4594,6 +6071,55 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.managedconfigurationsfordevice.get
* @desc Retrieves details of a per-device managed configuration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.managedconfigurationsfordevice.get({
+ * // The Android ID of the device.
+ * deviceId: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm".
+ * managedConfigurationForDeviceId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "configurationVariables": {},
+ * // "kind": "my_kind",
+ * // "managedProperty": [],
+ * // "productId": "my_productId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.managedconfigurationsfordevice.get
* @memberOf! ()
*
@@ -4683,6 +6209,51 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.managedconfigurationsfordevice.list
* @desc Lists all the per-device managed configurations for the specified device. Only the ID is set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.managedconfigurationsfordevice.list({
+ * // The Android ID of the device.
+ * deviceId: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "managedConfigurationForDevice": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.managedconfigurationsfordevice.list
* @memberOf! ()
*
@@ -4782,6 +6353,66 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.managedconfigurationsfordevice.update
* @desc Adds or updates a per-device managed configuration for an app for the specified device.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.managedconfigurationsfordevice.update({
+ * // The Android ID of the device.
+ * deviceId: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm".
+ * managedConfigurationForDeviceId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "configurationVariables": {},
+ * // "kind": "my_kind",
+ * // "managedProperty": [],
+ * // "productId": "my_productId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "configurationVariables": {},
+ * // "kind": "my_kind",
+ * // "managedProperty": [],
+ * // "productId": "my_productId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.managedconfigurationsfordevice.update
* @memberOf! ()
*
@@ -4977,6 +6608,45 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.managedconfigurationsforuser.delete
* @desc Removes a per-user managed configuration for an app for the specified user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.managedconfigurationsforuser.delete({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm".
+ * managedConfigurationForUserId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.managedconfigurationsforuser.delete
* @memberOf! ()
*
@@ -5055,8 +6725,55 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.managedconfigurationsforuser.get
* @desc Retrieves details of a per-user managed configuration for an app for the specified user.
- * @alias androidenterprise.managedconfigurationsforuser.get
- * @memberOf! ()
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.managedconfigurationsforuser.get({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm".
+ * managedConfigurationForUserId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "configurationVariables": {},
+ * // "kind": "my_kind",
+ * // "managedProperty": [],
+ * // "productId": "my_productId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
+ * @alias androidenterprise.managedconfigurationsforuser.get
+ * @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.enterpriseId The ID of the enterprise.
@@ -5137,6 +6854,49 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.managedconfigurationsforuser.list
* @desc Lists all the per-user managed configurations for the specified user. Only the ID is set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.managedconfigurationsforuser.list({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "managedConfigurationForUser": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.managedconfigurationsforuser.list
* @memberOf! ()
*
@@ -5229,6 +6989,64 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.managedconfigurationsforuser.update
* @desc Adds or updates the managed configuration settings for an app for the specified user. If you support the Managed configurations iframe, you can apply managed configurations to a user by specifying an mcmId and its associated configuration variables (if any) in the request. Alternatively, all EMMs can apply managed configurations by passing a list of managed properties.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.managedconfigurationsforuser.update({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm".
+ * managedConfigurationForUserId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "configurationVariables": {},
+ * // "kind": "my_kind",
+ * // "managedProperty": [],
+ * // "productId": "my_productId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "configurationVariables": {},
+ * // "kind": "my_kind",
+ * // "managedProperty": [],
+ * // "productId": "my_productId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.managedconfigurationsforuser.update
* @memberOf! ()
*
@@ -5401,6 +7219,49 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.managedconfigurationssettings.list
* @desc Lists all the managed configurations settings for the specified app.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.managedconfigurationssettings.list({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the product for which the managed configurations settings applies to.
+ * productId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "managedConfigurationsSettings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.managedconfigurationssettings.list
* @memberOf! ()
*
@@ -5523,6 +7384,51 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.permissions.get
* @desc Retrieves details of an Android app permission for display to an enterprise admin.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.permissions.get({
+ * // The BCP47 tag for the user's preferred language (e.g. "en-US", "de")
+ * language: 'placeholder-value',
+ * // The ID of the permission.
+ * permissionId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "description": "my_description",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "permissionId": "my_permissionId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.permissions.get
* @memberOf! ()
*
@@ -5619,6 +7525,52 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.products.approve
* @desc Approves the specified product and the relevant app permissions, if any. The maximum number of products that you can approve per enterprise customer is 1,000. To learn how to use managed Google Play to design and create a store layout to display approved products to your users, see Store Layout Design.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.products.approve({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the product.
+ * productId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "approvalUrlInfo": {},
+ * // "approvedPermissions": "my_approvedPermissions"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.products.approve
* @memberOf! ()
*
@@ -5692,6 +7644,50 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.products.generateApprovalUrl
* @desc Generates a URL that can be rendered in an iframe to display the permissions (if any) of a product. An enterprise admin must view these permissions and accept them on behalf of their organization in order to approve that product. Admins should accept the displayed permissions by interacting with a separate UI element in the EMM console, which in turn should trigger the use of this URL as the approvalUrlInfo.approvalUrl property in a Products.approve call to approve the product. This URL can only be used to display permissions for up to 1 day.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.products.generateApprovalUrl({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The BCP 47 language code used for permission names and descriptions in the returned iframe, for instance "en-US".
+ * languageCode: 'placeholder-value',
+ * // The ID of the product.
+ * productId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.products.generateApprovalUrl
* @memberOf! ()
*
@@ -5779,6 +7775,74 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.products.get
* @desc Retrieves details of a product for display to an enterprise admin.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.products.get({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The BCP47 tag for the user's preferred language (e.g. "en-US", "de").
+ * language: 'placeholder-value',
+ * // The ID of the product, e.g. "app:com.google.android.gm".
+ * productId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appTracks": [],
+ * // "appVersion": [],
+ * // "authorName": "my_authorName",
+ * // "availableCountries": [],
+ * // "availableTracks": [],
+ * // "category": "my_category",
+ * // "contentRating": "my_contentRating",
+ * // "description": "my_description",
+ * // "detailsUrl": "my_detailsUrl",
+ * // "distributionChannel": "my_distributionChannel",
+ * // "features": [],
+ * // "iconUrl": "my_iconUrl",
+ * // "kind": "my_kind",
+ * // "lastUpdatedTimestampMillis": "my_lastUpdatedTimestampMillis",
+ * // "minAndroidSdkVersion": 0,
+ * // "permissions": [],
+ * // "productId": "my_productId",
+ * // "productPricing": "my_productPricing",
+ * // "recentChanges": "my_recentChanges",
+ * // "requiresContainerApp": false,
+ * // "screenshotUrls": [],
+ * // "signingCertificate": {},
+ * // "smallIconUrl": "my_smallIconUrl",
+ * // "title": "my_title",
+ * // "workDetailsUrl": "my_workDetailsUrl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.products.get
* @memberOf! ()
*
@@ -5852,6 +7916,51 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.products.getAppRestrictionsSchema
* @desc Retrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed configurations have been defined. This schema can be used to populate a UI that allows an admin to configure the product. To apply a managed configuration based on the schema obtained using this API, see Managed Configurations through Play.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.products.getAppRestrictionsSchema({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The BCP47 tag for the user's preferred language (e.g. "en-US", "de").
+ * language: 'placeholder-value',
+ * // The ID of the product.
+ * productId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "restrictions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.products.getAppRestrictionsSchema
* @memberOf! ()
*
@@ -5932,6 +8041,50 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.products.getPermissions
* @desc Retrieves the Android app permissions required by this app.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.products.getPermissions({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the product.
+ * productId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "permission": [],
+ * // "productId": "my_productId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.products.getPermissions
* @memberOf! ()
*
@@ -6009,6 +8162,59 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.products.list
* @desc Finds approved products that match a query, or all approved products if there is no query.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.products.list({
+ * // Specifies whether to search among all products (false) or among only products that have been approved (true). Only "true" is supported, and should be specified.
+ * approved: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). Results are returned in the language best matching the preferred language.
+ * language: 'placeholder-value',
+ * // Specifies the maximum number of products that can be returned per request. If not specified, uses a default value of 100, which is also the maximum retrievable within a single response.
+ * maxResults: 'placeholder-value',
+ * // The search query as typed in the Google Play store search box. If omitted, all approved apps will be returned (using the pagination parameters), including apps that are not available in the store (e.g. unpublished apps).
+ * query: 'placeholder-value',
+ * // A pagination token is contained in a request's response when there are more products. The token can be used in a subsequent request to obtain more products, and so forth. This parameter cannot be used in the initial request.
+ * token: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "pageInfo": {},
+ * // "product": [],
+ * // "tokenPagination": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.products.list
* @memberOf! ()
*
@@ -6089,6 +8295,43 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.products.unapprove
* @desc Unapproves the specified product (and the relevant app permissions, if any)
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.products.unapprove({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the product.
+ * productId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.products.unapprove
* @memberOf! ()
*
@@ -6312,6 +8555,43 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.serviceaccountkeys.delete
* @desc Removes and invalidates the specified credentials for the service account associated with this enterprise. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.serviceaccountkeys.delete({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the key.
+ * keyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.serviceaccountkeys.delete
* @memberOf! ()
*
@@ -6385,6 +8665,62 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.serviceaccountkeys.insert
* @desc Generates new credentials for the service account associated with this enterprise. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount. Only the type of the key should be populated in the resource to be inserted.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.serviceaccountkeys.insert({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "data": "my_data",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "publicData": "my_publicData",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "data": "my_data",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "publicData": "my_publicData",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.serviceaccountkeys.insert
* @memberOf! ()
*
@@ -6460,6 +8796,46 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.serviceaccountkeys.list
* @desc Lists all active credentials for the service account associated with this enterprise. Only the ID and key type are returned. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.serviceaccountkeys.list({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "serviceAccountKey": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.serviceaccountkeys.list
* @memberOf! ()
*
@@ -6596,6 +8972,45 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.storelayoutclusters.delete
* @desc Deletes a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.storelayoutclusters.delete({
+ * // The ID of the cluster.
+ * clusterId: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the page.
+ * pageId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.storelayoutclusters.delete
* @memberOf! ()
*
@@ -6670,6 +9085,54 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.storelayoutclusters.get
* @desc Retrieves details of a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.storelayoutclusters.get({
+ * // The ID of the cluster.
+ * clusterId: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the page.
+ * pageId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": [],
+ * // "orderInPage": "my_orderInPage",
+ * // "productId": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.storelayoutclusters.get
* @memberOf! ()
*
@@ -6746,6 +9209,64 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.storelayoutclusters.insert
* @desc Inserts a new cluster in a page.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.storelayoutclusters.insert({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the page.
+ * pageId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": [],
+ * // "orderInPage": "my_orderInPage",
+ * // "productId": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": [],
+ * // "orderInPage": "my_orderInPage",
+ * // "productId": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.storelayoutclusters.insert
* @memberOf! ()
*
@@ -6822,6 +9343,49 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.storelayoutclusters.list
* @desc Retrieves the details of all clusters on the specified page.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.storelayoutclusters.list({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the page.
+ * pageId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cluster": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.storelayoutclusters.list
* @memberOf! ()
*
@@ -6906,6 +9470,66 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.storelayoutclusters.update
* @desc Updates a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.storelayoutclusters.update({
+ * // The ID of the cluster.
+ * clusterId: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the page.
+ * pageId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": [],
+ * // "orderInPage": "my_orderInPage",
+ * // "productId": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": [],
+ * // "orderInPage": "my_orderInPage",
+ * // "productId": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.storelayoutclusters.update
* @memberOf! ()
*
@@ -7093,6 +9717,43 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.storelayoutpages.delete
* @desc Deletes a store page.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.storelayoutpages.delete({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the page.
+ * pageId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.storelayoutpages.delete
* @memberOf! ()
*
@@ -7166,6 +9827,51 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.storelayoutpages.get
* @desc Retrieves details of a store page.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.storelayoutpages.get({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the page.
+ * pageId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "link": [],
+ * // "name": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.storelayoutpages.get
* @memberOf! ()
*
@@ -7241,6 +9947,60 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.storelayoutpages.insert
* @desc Inserts a new store page.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.storelayoutpages.insert({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "link": [],
+ * // "name": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "link": [],
+ * // "name": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.storelayoutpages.insert
* @memberOf! ()
*
@@ -7316,6 +10076,47 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.storelayoutpages.list
* @desc Retrieves the details of all pages in the store.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.storelayoutpages.list({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "page": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.storelayoutpages.list
* @memberOf! ()
*
@@ -7399,6 +10200,62 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.storelayoutpages.update
* @desc Updates the content of a store page.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.storelayoutpages.update({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the page.
+ * pageId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "link": [],
+ * // "name": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "link": [],
+ * // "name": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.storelayoutpages.update
* @memberOf! ()
*
@@ -7565,6 +10422,43 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.users.delete
* @desc Deleted an EMM-managed user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.users.delete({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.users.delete
* @memberOf! ()
*
@@ -7637,6 +10531,49 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.users.generateAuthenticationToken
* @desc Generates an authentication token which the device policy client can use to provision the given EMM-managed user account on a device. The generated token is single-use and expires after a few minutes. You can provision a maximum of 10 devices per user. This call only works with EMM-managed accounts.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.users.generateAuthenticationToken({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "token": "my_token"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.users.generateAuthenticationToken
* @memberOf! ()
*
@@ -7714,6 +10651,50 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.users.generateToken
* @desc Generates a token (activation code) to allow this user to configure their managed account in the Android Setup Wizard. Revokes any previously generated token. This call only works with Google managed accounts.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.users.generateToken({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "token": "my_token",
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.users.generateToken
* @memberOf! ()
*
@@ -7789,6 +10770,54 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.users.get
* @desc Retrieves a user's details.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.users.get({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountIdentifier": "my_accountIdentifier",
+ * // "accountType": "my_accountType",
+ * // "displayName": "my_displayName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "managementType": "my_managementType",
+ * // "primaryEmail": "my_primaryEmail"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.users.get
* @memberOf! ()
*
@@ -7861,6 +10890,51 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.users.getAvailableProductSet
* @desc Retrieves the set of products a user is entitled to access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.users.getAvailableProductSet({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "productId": [],
+ * // "productSetBehavior": "my_productSetBehavior",
+ * // "productVisibility": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.users.getAvailableProductSet
* @memberOf! ()
*
@@ -7938,6 +11012,66 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.users.insert
* @desc Creates a new EMM-managed user. The Users resource passed in the body of the request should include an accountIdentifier and an accountType. If a corresponding user already exists with the same account identifier, the user will be updated with the resource. In this case only the displayName field can be changed.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.users.insert({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountIdentifier": "my_accountIdentifier",
+ * // "accountType": "my_accountType",
+ * // "displayName": "my_displayName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "managementType": "my_managementType",
+ * // "primaryEmail": "my_primaryEmail"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountIdentifier": "my_accountIdentifier",
+ * // "accountType": "my_accountType",
+ * // "displayName": "my_displayName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "managementType": "my_managementType",
+ * // "primaryEmail": "my_primaryEmail"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.users.insert
* @memberOf! ()
*
@@ -8009,6 +11143,49 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.users.list
* @desc Looks up a user by primary email address. This is only supported for Google-managed users. Lookup of the id is not needed for EMM-managed users because the id is already returned in the result of the Users.insert call.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.users.list({
+ * // The exact primary email address of the user to look up.
+ * email: 'placeholder-value',
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "user": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.users.list
* @memberOf! ()
*
@@ -8082,6 +11259,43 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.users.revokeDeviceAccess
* @desc Revokes access to all devices currently provisioned to the user. The user will no longer be able to use the managed Play store on any of their managed devices. This call only works with EMM-managed accounts.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.users.revokeDeviceAccess({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.users.revokeDeviceAccess
* @memberOf! ()
*
@@ -8155,6 +11369,43 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.users.revokeToken
* @desc Revokes a previously generated token (activation code) for the user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.users.revokeToken({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.users.revokeToken
* @memberOf! ()
*
@@ -8228,6 +11479,62 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.users.setAvailableProductSet
* @desc Modifies the set of products that a user is entitled to access (referred to as whitelisted products). Only products that are approved or products that were previously approved (products with revoked approval) can be whitelisted.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.users.setAvailableProductSet({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "productId": [],
+ * // "productSetBehavior": "my_productSetBehavior",
+ * // "productVisibility": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "productId": [],
+ * // "productSetBehavior": "my_productSetBehavior",
+ * // "productVisibility": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.users.setAvailableProductSet
* @memberOf! ()
*
@@ -8306,6 +11613,68 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.users.update
* @desc Updates the details of an EMM-managed user. Can be used with EMM-managed users only (not Google managed users). Pass the new details in the Users resource in the request body. Only the displayName field can be changed. Other fields must either be unset or have the currently active value.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.users.update({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the user.
+ * userId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountIdentifier": "my_accountIdentifier",
+ * // "accountType": "my_accountType",
+ * // "displayName": "my_displayName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "managementType": "my_managementType",
+ * // "primaryEmail": "my_primaryEmail"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountIdentifier": "my_accountIdentifier",
+ * // "accountType": "my_accountType",
+ * // "displayName": "my_displayName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "managementType": "my_managementType",
+ * // "primaryEmail": "my_primaryEmail"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.users.update
* @memberOf! ()
*
@@ -8569,6 +11938,43 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.webapps.delete
* @desc Deletes an existing web app.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.webapps.delete({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the web app.
+ * webAppId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.webapps.delete
* @memberOf! ()
*
@@ -8641,6 +12047,54 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.webapps.get
* @desc Gets an existing web app.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.webapps.get({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the web app.
+ * webAppId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayMode": "my_displayMode",
+ * // "icons": [],
+ * // "isPublished": false,
+ * // "startUrl": "my_startUrl",
+ * // "title": "my_title",
+ * // "versionCode": "my_versionCode",
+ * // "webAppId": "my_webAppId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.webapps.get
* @memberOf! ()
*
@@ -8713,6 +12167,66 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.webapps.insert
* @desc Creates a new web app for the enterprise.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.webapps.insert({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "displayMode": "my_displayMode",
+ * // "icons": [],
+ * // "isPublished": false,
+ * // "startUrl": "my_startUrl",
+ * // "title": "my_title",
+ * // "versionCode": "my_versionCode",
+ * // "webAppId": "my_webAppId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayMode": "my_displayMode",
+ * // "icons": [],
+ * // "isPublished": false,
+ * // "startUrl": "my_startUrl",
+ * // "title": "my_title",
+ * // "versionCode": "my_versionCode",
+ * // "webAppId": "my_webAppId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.webapps.insert
* @memberOf! ()
*
@@ -8785,6 +12299,47 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.webapps.list
* @desc Retrieves the details of all web apps for a given enterprise.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.webapps.list({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "webApp": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.webapps.list
* @memberOf! ()
*
@@ -8858,6 +12413,68 @@ export namespace androidenterprise_v1 {
/**
* androidenterprise.webapps.update
* @desc Updates an existing web app.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidenterprise.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidenterprise = google.androidenterprise('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidenterprise'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidenterprise.webapps.update({
+ * // The ID of the enterprise.
+ * enterpriseId: 'placeholder-value',
+ * // The ID of the web app.
+ * webAppId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "displayMode": "my_displayMode",
+ * // "icons": [],
+ * // "isPublished": false,
+ * // "startUrl": "my_startUrl",
+ * // "title": "my_title",
+ * // "versionCode": "my_versionCode",
+ * // "webAppId": "my_webAppId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayMode": "my_displayMode",
+ * // "icons": [],
+ * // "isPublished": false,
+ * // "startUrl": "my_startUrl",
+ * // "title": "my_title",
+ * // "versionCode": "my_versionCode",
+ * // "webAppId": "my_webAppId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidenterprise.webapps.update
* @memberOf! ()
*
diff --git a/src/apis/androidmanagement/v1.ts b/src/apis/androidmanagement/v1.ts
index 823e509af6c..606e8696f16 100644
--- a/src/apis/androidmanagement/v1.ts
+++ b/src/apis/androidmanagement/v1.ts
@@ -1931,6 +1931,74 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.create
* @desc Creates an enterprise. This is the last step in the enterprise signup flow.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.create({
+ * // The enterprise token appended to the callback URL.
+ * enterpriseToken: 'placeholder-value',
+ * // The ID of the Google Cloud Platform project which will own the enterprise.
+ * projectId: 'placeholder-value',
+ * // The name of the SignupUrl used to sign up for the enterprise.
+ * signupUrlName: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "appAutoApprovalEnabled": false,
+ * // "enabledNotificationTypes": [],
+ * // "enterpriseDisplayName": "my_enterpriseDisplayName",
+ * // "logo": {},
+ * // "name": "my_name",
+ * // "primaryColor": 0,
+ * // "pubsubTopic": "my_pubsubTopic",
+ * // "signinDetails": [],
+ * // "termsAndConditions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appAutoApprovalEnabled": false,
+ * // "enabledNotificationTypes": [],
+ * // "enterpriseDisplayName": "my_enterpriseDisplayName",
+ * // "logo": {},
+ * // "name": "my_name",
+ * // "primaryColor": 0,
+ * // "pubsubTopic": "my_pubsubTopic",
+ * // "signinDetails": [],
+ * // "termsAndConditions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.create
* @memberOf! ()
*
@@ -2006,6 +2074,54 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.get
* @desc Gets an enterprise.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.get({
+ * // The name of the enterprise in the form enterprises/{enterpriseId}.
+ * name: 'enterprises/my-enterprise',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appAutoApprovalEnabled": false,
+ * // "enabledNotificationTypes": [],
+ * // "enterpriseDisplayName": "my_enterpriseDisplayName",
+ * // "logo": {},
+ * // "name": "my_name",
+ * // "primaryColor": 0,
+ * // "pubsubTopic": "my_pubsubTopic",
+ * // "signinDetails": [],
+ * // "termsAndConditions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.get
* @memberOf! ()
*
@@ -2077,6 +2193,72 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.patch
* @desc Updates an enterprise.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.patch({
+ * // The name of the enterprise in the form enterprises/{enterpriseId}.
+ * name: 'enterprises/my-enterprise',
+ * // The field mask indicating the fields to update. If not set, all modifiable fields will be modified.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "appAutoApprovalEnabled": false,
+ * // "enabledNotificationTypes": [],
+ * // "enterpriseDisplayName": "my_enterpriseDisplayName",
+ * // "logo": {},
+ * // "name": "my_name",
+ * // "primaryColor": 0,
+ * // "pubsubTopic": "my_pubsubTopic",
+ * // "signinDetails": [],
+ * // "termsAndConditions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appAutoApprovalEnabled": false,
+ * // "enabledNotificationTypes": [],
+ * // "enterpriseDisplayName": "my_enterpriseDisplayName",
+ * // "logo": {},
+ * // "name": "my_name",
+ * // "primaryColor": 0,
+ * // "pubsubTopic": "my_pubsubTopic",
+ * // "signinDetails": [],
+ * // "termsAndConditions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.patch
* @memberOf! ()
*
@@ -2216,6 +2398,52 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.applications.get
* @desc Gets info about an application.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.applications.get({
+ * // The preferred language for localized application info, as a BCP47 tag (e.g. "en-US", "de"). If not specified the default language of the application will be used.
+ * languageCode: 'placeholder-value',
+ * // The name of the application in the form enterprises/{enterpriseId}/applications/{package_name}.
+ * name: 'enterprises/my-enterprise/applications/my-application',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appTracks": [],
+ * // "managedProperties": [],
+ * // "name": "my_name",
+ * // "permissions": [],
+ * // "title": "my_title"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.applications.get
* @memberOf! ()
*
@@ -2317,6 +2545,48 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.devices.delete
* @desc Deletes a device. This operation wipes the device.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.devices.delete({
+ * // The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}.
+ * name: 'enterprises/my-enterprise/devices/my-device',
+ * // Optional flags that control the device wiping behavior.
+ * wipeDataFlags: 'placeholder-value',
+ * // Optional. A short message displayed to the user before wiping the work profile on personal devices. This has no effect on company owned devices. The maximum message length is 200 characters.
+ * wipeReasonMessage: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.devices.delete
* @memberOf! ()
*
@@ -2389,6 +2659,77 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.devices.get
* @desc Gets a device.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.devices.get({
+ * // The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}.
+ * name: 'enterprises/my-enterprise/devices/my-device',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "apiLevel": 0,
+ * // "applicationReports": [],
+ * // "appliedPolicyName": "my_appliedPolicyName",
+ * // "appliedPolicyVersion": "my_appliedPolicyVersion",
+ * // "appliedState": "my_appliedState",
+ * // "deviceSettings": {},
+ * // "disabledReason": {},
+ * // "displays": [],
+ * // "enrollmentTime": "my_enrollmentTime",
+ * // "enrollmentTokenData": "my_enrollmentTokenData",
+ * // "enrollmentTokenName": "my_enrollmentTokenName",
+ * // "hardwareInfo": {},
+ * // "hardwareStatusSamples": [],
+ * // "lastPolicyComplianceReportTime": "my_lastPolicyComplianceReportTime",
+ * // "lastPolicySyncTime": "my_lastPolicySyncTime",
+ * // "lastStatusReportTime": "my_lastStatusReportTime",
+ * // "managementMode": "my_managementMode",
+ * // "memoryEvents": [],
+ * // "memoryInfo": {},
+ * // "name": "my_name",
+ * // "networkInfo": {},
+ * // "nonComplianceDetails": [],
+ * // "policyCompliant": false,
+ * // "policyName": "my_policyName",
+ * // "powerManagementEvents": [],
+ * // "previousDeviceNames": [],
+ * // "securityPosture": {},
+ * // "softwareInfo": {},
+ * // "state": "my_state",
+ * // "systemProperties": {},
+ * // "user": {},
+ * // "userName": "my_userName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.devices.get
* @memberOf! ()
*
@@ -2459,6 +2800,64 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.devices.issueCommand
* @desc Issues a command to a device. The Operation resource returned contains a Command in its metadata field. Use the get operation method to get the status of the command.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.devices.issueCommand({
+ * // The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}.
+ * name: 'enterprises/my-enterprise/devices/my-device',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "duration": "my_duration",
+ * // "errorCode": "my_errorCode",
+ * // "newPassword": "my_newPassword",
+ * // "resetPasswordFlags": [],
+ * // "type": "my_type",
+ * // "userName": "my_userName"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.devices.issueCommand
* @memberOf! ()
*
@@ -2535,6 +2934,51 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.devices.list
* @desc Lists devices for a given enterprise.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.devices.list({
+ * // The requested page size. The actual page size may be fixed to a min or max value.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results returned by the server.
+ * pageToken: 'placeholder-value',
+ * // The name of the enterprise in the form enterprises/{enterpriseId}.
+ * parent: 'enterprises/my-enterprise',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "devices": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.devices.list
* @memberOf! ()
*
@@ -2612,6 +3056,118 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.devices.patch
* @desc Updates a device.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.devices.patch({
+ * // The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}.
+ * name: 'enterprises/my-enterprise/devices/my-device',
+ * // The field mask indicating the fields to update. If not set, all modifiable fields will be modified.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "apiLevel": 0,
+ * // "applicationReports": [],
+ * // "appliedPolicyName": "my_appliedPolicyName",
+ * // "appliedPolicyVersion": "my_appliedPolicyVersion",
+ * // "appliedState": "my_appliedState",
+ * // "deviceSettings": {},
+ * // "disabledReason": {},
+ * // "displays": [],
+ * // "enrollmentTime": "my_enrollmentTime",
+ * // "enrollmentTokenData": "my_enrollmentTokenData",
+ * // "enrollmentTokenName": "my_enrollmentTokenName",
+ * // "hardwareInfo": {},
+ * // "hardwareStatusSamples": [],
+ * // "lastPolicyComplianceReportTime": "my_lastPolicyComplianceReportTime",
+ * // "lastPolicySyncTime": "my_lastPolicySyncTime",
+ * // "lastStatusReportTime": "my_lastStatusReportTime",
+ * // "managementMode": "my_managementMode",
+ * // "memoryEvents": [],
+ * // "memoryInfo": {},
+ * // "name": "my_name",
+ * // "networkInfo": {},
+ * // "nonComplianceDetails": [],
+ * // "policyCompliant": false,
+ * // "policyName": "my_policyName",
+ * // "powerManagementEvents": [],
+ * // "previousDeviceNames": [],
+ * // "securityPosture": {},
+ * // "softwareInfo": {},
+ * // "state": "my_state",
+ * // "systemProperties": {},
+ * // "user": {},
+ * // "userName": "my_userName"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "apiLevel": 0,
+ * // "applicationReports": [],
+ * // "appliedPolicyName": "my_appliedPolicyName",
+ * // "appliedPolicyVersion": "my_appliedPolicyVersion",
+ * // "appliedState": "my_appliedState",
+ * // "deviceSettings": {},
+ * // "disabledReason": {},
+ * // "displays": [],
+ * // "enrollmentTime": "my_enrollmentTime",
+ * // "enrollmentTokenData": "my_enrollmentTokenData",
+ * // "enrollmentTokenName": "my_enrollmentTokenName",
+ * // "hardwareInfo": {},
+ * // "hardwareStatusSamples": [],
+ * // "lastPolicyComplianceReportTime": "my_lastPolicyComplianceReportTime",
+ * // "lastPolicySyncTime": "my_lastPolicySyncTime",
+ * // "lastStatusReportTime": "my_lastStatusReportTime",
+ * // "managementMode": "my_managementMode",
+ * // "memoryEvents": [],
+ * // "memoryInfo": {},
+ * // "name": "my_name",
+ * // "networkInfo": {},
+ * // "nonComplianceDetails": [],
+ * // "policyCompliant": false,
+ * // "policyName": "my_policyName",
+ * // "powerManagementEvents": [],
+ * // "previousDeviceNames": [],
+ * // "securityPosture": {},
+ * // "softwareInfo": {},
+ * // "state": "my_state",
+ * // "systemProperties": {},
+ * // "user": {},
+ * // "userName": "my_userName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.devices.patch
* @memberOf! ()
*
@@ -2782,6 +3338,44 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.devices.operations.cancel
* @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.devices.operations.cancel({
+ * // The name of the operation resource to be cancelled.
+ * name: 'enterprises/my-enterprise/devices/my-device/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.devices.operations.cancel
* @memberOf! ()
*
@@ -2852,6 +3446,44 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.devices.operations.delete
* @desc Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.devices.operations.delete({
+ * // The name of the operation resource to be deleted.
+ * name: 'enterprises/my-enterprise/devices/my-device/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.devices.operations.delete
* @memberOf! ()
*
@@ -2922,6 +3554,50 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.devices.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.devices.operations.get({
+ * // The name of the operation resource.
+ * name: 'enterprises/my-enterprise/devices/my-device/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.devices.operations.get
* @memberOf! ()
*
@@ -2994,6 +3670,53 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.devices.operations.list
* @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/x/operations. To override the binding, API services can add a binding such as "/v1/{name=users/x}/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.devices.operations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The name of the operation's parent resource.
+ * name: 'enterprises/my-enterprise/devices/my-device/operations',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.devices.operations.list
* @memberOf! ()
*
@@ -3139,6 +3862,70 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.enrollmentTokens.create
* @desc Creates an enrollment token for a given enterprise.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.enrollmentTokens.create({
+ * // The name of the enterprise in the form enterprises/{enterpriseId}.
+ * parent: 'enterprises/my-enterprise',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "additionalData": "my_additionalData",
+ * // "duration": "my_duration",
+ * // "expirationTimestamp": "my_expirationTimestamp",
+ * // "name": "my_name",
+ * // "oneTimeOnly": false,
+ * // "policyName": "my_policyName",
+ * // "qrCode": "my_qrCode",
+ * // "user": {},
+ * // "value": "my_value"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "additionalData": "my_additionalData",
+ * // "duration": "my_duration",
+ * // "expirationTimestamp": "my_expirationTimestamp",
+ * // "name": "my_name",
+ * // "oneTimeOnly": false,
+ * // "policyName": "my_policyName",
+ * // "qrCode": "my_qrCode",
+ * // "user": {},
+ * // "value": "my_value"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.enrollmentTokens.create
* @memberOf! ()
*
@@ -3215,6 +4002,44 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.enrollmentTokens.delete
* @desc Deletes an enrollment token. This operation invalidates the token, preventing its future use.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.enrollmentTokens.delete({
+ * // The name of the enrollment token in the form enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}.
+ * name: 'enterprises/my-enterprise/enrollmentTokens/my-enrollmentToken',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.enrollmentTokens.delete
* @memberOf! ()
*
@@ -3322,6 +4147,44 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.policies.delete
* @desc Deletes a policy. This operation is only permitted if no devices are currently referencing the policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.policies.delete({
+ * // The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}.
+ * name: 'enterprises/my-enterprise/policies/my-policie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.policies.delete
* @memberOf! ()
*
@@ -3392,6 +4255,125 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.policies.get
* @desc Gets a policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.policies.get({
+ * // The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}.
+ * name: 'enterprises/my-enterprise/policies/my-policie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountTypesWithManagementDisabled": [],
+ * // "addUserDisabled": false,
+ * // "adjustVolumeDisabled": false,
+ * // "advancedSecurityOverrides": {},
+ * // "alwaysOnVpnPackage": {},
+ * // "androidDevicePolicyTracks": [],
+ * // "appAutoUpdatePolicy": "my_appAutoUpdatePolicy",
+ * // "applications": [],
+ * // "autoTimeRequired": false,
+ * // "blockApplicationsEnabled": false,
+ * // "bluetoothConfigDisabled": false,
+ * // "bluetoothContactSharingDisabled": false,
+ * // "bluetoothDisabled": false,
+ * // "cameraDisabled": false,
+ * // "cellBroadcastsConfigDisabled": false,
+ * // "choosePrivateKeyRules": [],
+ * // "complianceRules": [],
+ * // "createWindowsDisabled": false,
+ * // "credentialsConfigDisabled": false,
+ * // "dataRoamingDisabled": false,
+ * // "debuggingFeaturesAllowed": false,
+ * // "defaultPermissionPolicy": "my_defaultPermissionPolicy",
+ * // "deviceOwnerLockScreenInfo": {},
+ * // "encryptionPolicy": "my_encryptionPolicy",
+ * // "ensureVerifyAppsEnabled": false,
+ * // "factoryResetDisabled": false,
+ * // "frpAdminEmails": [],
+ * // "funDisabled": false,
+ * // "installAppsDisabled": false,
+ * // "installUnknownSourcesAllowed": false,
+ * // "keyguardDisabled": false,
+ * // "keyguardDisabledFeatures": [],
+ * // "kioskCustomLauncherEnabled": false,
+ * // "kioskCustomization": {},
+ * // "locationMode": "my_locationMode",
+ * // "longSupportMessage": {},
+ * // "maximumTimeToLock": "my_maximumTimeToLock",
+ * // "minimumApiLevel": 0,
+ * // "mobileNetworksConfigDisabled": false,
+ * // "modifyAccountsDisabled": false,
+ * // "mountPhysicalMediaDisabled": false,
+ * // "name": "my_name",
+ * // "networkEscapeHatchEnabled": false,
+ * // "networkResetDisabled": false,
+ * // "openNetworkConfiguration": {},
+ * // "outgoingBeamDisabled": false,
+ * // "outgoingCallsDisabled": false,
+ * // "passwordPolicies": [],
+ * // "passwordRequirements": {},
+ * // "permissionGrants": [],
+ * // "permittedAccessibilityServices": {},
+ * // "permittedInputMethods": {},
+ * // "persistentPreferredActivities": [],
+ * // "playStoreMode": "my_playStoreMode",
+ * // "policyEnforcementRules": [],
+ * // "privateKeySelectionEnabled": false,
+ * // "recommendedGlobalProxy": {},
+ * // "removeUserDisabled": false,
+ * // "safeBootDisabled": false,
+ * // "screenCaptureDisabled": false,
+ * // "setUserIconDisabled": false,
+ * // "setWallpaperDisabled": false,
+ * // "setupActions": [],
+ * // "shareLocationDisabled": false,
+ * // "shortSupportMessage": {},
+ * // "skipFirstUseHintsEnabled": false,
+ * // "smsDisabled": false,
+ * // "statusBarDisabled": false,
+ * // "statusReportingSettings": {},
+ * // "stayOnPluggedModes": [],
+ * // "systemUpdate": {},
+ * // "tetheringConfigDisabled": false,
+ * // "uninstallAppsDisabled": false,
+ * // "unmuteMicrophoneDisabled": false,
+ * // "usbFileTransferDisabled": false,
+ * // "usbMassStorageEnabled": false,
+ * // "version": "my_version",
+ * // "vpnConfigDisabled": false,
+ * // "wifiConfigDisabled": false,
+ * // "wifiConfigsLockdownEnabled": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.policies.get
* @memberOf! ()
*
@@ -3462,6 +4444,51 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.policies.list
* @desc Lists policies for a given enterprise.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.policies.list({
+ * // The requested page size. The actual page size may be fixed to a min or max value.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results returned by the server.
+ * pageToken: 'placeholder-value',
+ * // The name of the enterprise in the form enterprises/{enterpriseId}.
+ * parent: 'enterprises/my-enterprise',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "policies": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.policies.list
* @memberOf! ()
*
@@ -3541,6 +4568,214 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.policies.patch
* @desc Updates or creates a policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.policies.patch({
+ * // The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}.
+ * name: 'enterprises/my-enterprise/policies/my-policie',
+ * // The field mask indicating the fields to update. If not set, all modifiable fields will be modified.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountTypesWithManagementDisabled": [],
+ * // "addUserDisabled": false,
+ * // "adjustVolumeDisabled": false,
+ * // "advancedSecurityOverrides": {},
+ * // "alwaysOnVpnPackage": {},
+ * // "androidDevicePolicyTracks": [],
+ * // "appAutoUpdatePolicy": "my_appAutoUpdatePolicy",
+ * // "applications": [],
+ * // "autoTimeRequired": false,
+ * // "blockApplicationsEnabled": false,
+ * // "bluetoothConfigDisabled": false,
+ * // "bluetoothContactSharingDisabled": false,
+ * // "bluetoothDisabled": false,
+ * // "cameraDisabled": false,
+ * // "cellBroadcastsConfigDisabled": false,
+ * // "choosePrivateKeyRules": [],
+ * // "complianceRules": [],
+ * // "createWindowsDisabled": false,
+ * // "credentialsConfigDisabled": false,
+ * // "dataRoamingDisabled": false,
+ * // "debuggingFeaturesAllowed": false,
+ * // "defaultPermissionPolicy": "my_defaultPermissionPolicy",
+ * // "deviceOwnerLockScreenInfo": {},
+ * // "encryptionPolicy": "my_encryptionPolicy",
+ * // "ensureVerifyAppsEnabled": false,
+ * // "factoryResetDisabled": false,
+ * // "frpAdminEmails": [],
+ * // "funDisabled": false,
+ * // "installAppsDisabled": false,
+ * // "installUnknownSourcesAllowed": false,
+ * // "keyguardDisabled": false,
+ * // "keyguardDisabledFeatures": [],
+ * // "kioskCustomLauncherEnabled": false,
+ * // "kioskCustomization": {},
+ * // "locationMode": "my_locationMode",
+ * // "longSupportMessage": {},
+ * // "maximumTimeToLock": "my_maximumTimeToLock",
+ * // "minimumApiLevel": 0,
+ * // "mobileNetworksConfigDisabled": false,
+ * // "modifyAccountsDisabled": false,
+ * // "mountPhysicalMediaDisabled": false,
+ * // "name": "my_name",
+ * // "networkEscapeHatchEnabled": false,
+ * // "networkResetDisabled": false,
+ * // "openNetworkConfiguration": {},
+ * // "outgoingBeamDisabled": false,
+ * // "outgoingCallsDisabled": false,
+ * // "passwordPolicies": [],
+ * // "passwordRequirements": {},
+ * // "permissionGrants": [],
+ * // "permittedAccessibilityServices": {},
+ * // "permittedInputMethods": {},
+ * // "persistentPreferredActivities": [],
+ * // "playStoreMode": "my_playStoreMode",
+ * // "policyEnforcementRules": [],
+ * // "privateKeySelectionEnabled": false,
+ * // "recommendedGlobalProxy": {},
+ * // "removeUserDisabled": false,
+ * // "safeBootDisabled": false,
+ * // "screenCaptureDisabled": false,
+ * // "setUserIconDisabled": false,
+ * // "setWallpaperDisabled": false,
+ * // "setupActions": [],
+ * // "shareLocationDisabled": false,
+ * // "shortSupportMessage": {},
+ * // "skipFirstUseHintsEnabled": false,
+ * // "smsDisabled": false,
+ * // "statusBarDisabled": false,
+ * // "statusReportingSettings": {},
+ * // "stayOnPluggedModes": [],
+ * // "systemUpdate": {},
+ * // "tetheringConfigDisabled": false,
+ * // "uninstallAppsDisabled": false,
+ * // "unmuteMicrophoneDisabled": false,
+ * // "usbFileTransferDisabled": false,
+ * // "usbMassStorageEnabled": false,
+ * // "version": "my_version",
+ * // "vpnConfigDisabled": false,
+ * // "wifiConfigDisabled": false,
+ * // "wifiConfigsLockdownEnabled": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountTypesWithManagementDisabled": [],
+ * // "addUserDisabled": false,
+ * // "adjustVolumeDisabled": false,
+ * // "advancedSecurityOverrides": {},
+ * // "alwaysOnVpnPackage": {},
+ * // "androidDevicePolicyTracks": [],
+ * // "appAutoUpdatePolicy": "my_appAutoUpdatePolicy",
+ * // "applications": [],
+ * // "autoTimeRequired": false,
+ * // "blockApplicationsEnabled": false,
+ * // "bluetoothConfigDisabled": false,
+ * // "bluetoothContactSharingDisabled": false,
+ * // "bluetoothDisabled": false,
+ * // "cameraDisabled": false,
+ * // "cellBroadcastsConfigDisabled": false,
+ * // "choosePrivateKeyRules": [],
+ * // "complianceRules": [],
+ * // "createWindowsDisabled": false,
+ * // "credentialsConfigDisabled": false,
+ * // "dataRoamingDisabled": false,
+ * // "debuggingFeaturesAllowed": false,
+ * // "defaultPermissionPolicy": "my_defaultPermissionPolicy",
+ * // "deviceOwnerLockScreenInfo": {},
+ * // "encryptionPolicy": "my_encryptionPolicy",
+ * // "ensureVerifyAppsEnabled": false,
+ * // "factoryResetDisabled": false,
+ * // "frpAdminEmails": [],
+ * // "funDisabled": false,
+ * // "installAppsDisabled": false,
+ * // "installUnknownSourcesAllowed": false,
+ * // "keyguardDisabled": false,
+ * // "keyguardDisabledFeatures": [],
+ * // "kioskCustomLauncherEnabled": false,
+ * // "kioskCustomization": {},
+ * // "locationMode": "my_locationMode",
+ * // "longSupportMessage": {},
+ * // "maximumTimeToLock": "my_maximumTimeToLock",
+ * // "minimumApiLevel": 0,
+ * // "mobileNetworksConfigDisabled": false,
+ * // "modifyAccountsDisabled": false,
+ * // "mountPhysicalMediaDisabled": false,
+ * // "name": "my_name",
+ * // "networkEscapeHatchEnabled": false,
+ * // "networkResetDisabled": false,
+ * // "openNetworkConfiguration": {},
+ * // "outgoingBeamDisabled": false,
+ * // "outgoingCallsDisabled": false,
+ * // "passwordPolicies": [],
+ * // "passwordRequirements": {},
+ * // "permissionGrants": [],
+ * // "permittedAccessibilityServices": {},
+ * // "permittedInputMethods": {},
+ * // "persistentPreferredActivities": [],
+ * // "playStoreMode": "my_playStoreMode",
+ * // "policyEnforcementRules": [],
+ * // "privateKeySelectionEnabled": false,
+ * // "recommendedGlobalProxy": {},
+ * // "removeUserDisabled": false,
+ * // "safeBootDisabled": false,
+ * // "screenCaptureDisabled": false,
+ * // "setUserIconDisabled": false,
+ * // "setWallpaperDisabled": false,
+ * // "setupActions": [],
+ * // "shareLocationDisabled": false,
+ * // "shortSupportMessage": {},
+ * // "skipFirstUseHintsEnabled": false,
+ * // "smsDisabled": false,
+ * // "statusBarDisabled": false,
+ * // "statusReportingSettings": {},
+ * // "stayOnPluggedModes": [],
+ * // "systemUpdate": {},
+ * // "tetheringConfigDisabled": false,
+ * // "uninstallAppsDisabled": false,
+ * // "unmuteMicrophoneDisabled": false,
+ * // "usbFileTransferDisabled": false,
+ * // "usbMassStorageEnabled": false,
+ * // "version": "my_version",
+ * // "vpnConfigDisabled": false,
+ * // "wifiConfigDisabled": false,
+ * // "wifiConfigsLockdownEnabled": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.policies.patch
* @memberOf! ()
*
@@ -3686,6 +4921,64 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.webApps.create
* @desc Creates a web app.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.webApps.create({
+ * // The name of the enterprise in the form enterprises/{enterpriseId}.
+ * parent: 'enterprises/my-enterprise',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "displayMode": "my_displayMode",
+ * // "icons": [],
+ * // "name": "my_name",
+ * // "startUrl": "my_startUrl",
+ * // "title": "my_title",
+ * // "versionCode": "my_versionCode"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayMode": "my_displayMode",
+ * // "icons": [],
+ * // "name": "my_name",
+ * // "startUrl": "my_startUrl",
+ * // "title": "my_title",
+ * // "versionCode": "my_versionCode"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.webApps.create
* @memberOf! ()
*
@@ -3760,6 +5053,44 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.webApps.delete
* @desc Deletes a web app.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.webApps.delete({
+ * // The name of the web app in the form enterprises/{enterpriseId}/webApps/{packageName}.
+ * name: 'enterprises/my-enterprise/webApps/my-webApp',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.webApps.delete
* @memberOf! ()
*
@@ -3830,6 +5161,51 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.webApps.get
* @desc Gets a web app.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.webApps.get({
+ * // The name of the web app in the form enterprises/{enterpriseId}/webApp/{packageName}.
+ * name: 'enterprises/my-enterprise/webApps/my-webApp',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayMode": "my_displayMode",
+ * // "icons": [],
+ * // "name": "my_name",
+ * // "startUrl": "my_startUrl",
+ * // "title": "my_title",
+ * // "versionCode": "my_versionCode"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.webApps.get
* @memberOf! ()
*
@@ -3900,6 +5276,51 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.webApps.list
* @desc Lists web apps for a given enterprise.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.webApps.list({
+ * // The requested page size. The actual page size may be fixed to a min or max value.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results returned by the server.
+ * pageToken: 'placeholder-value',
+ * // The name of the enterprise in the form enterprises/{enterpriseId}.
+ * parent: 'enterprises/my-enterprise',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "webApps": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.webApps.list
* @memberOf! ()
*
@@ -3977,6 +5398,66 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.webApps.patch
* @desc Updates a web app.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.webApps.patch({
+ * // The name of the web app in the form enterprises/{enterpriseId}/webApps/{packageName}.
+ * name: 'enterprises/my-enterprise/webApps/my-webApp',
+ * // The field mask indicating the fields to update. If not set, all modifiable fields will be modified.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "displayMode": "my_displayMode",
+ * // "icons": [],
+ * // "name": "my_name",
+ * // "startUrl": "my_startUrl",
+ * // "title": "my_title",
+ * // "versionCode": "my_versionCode"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayMode": "my_displayMode",
+ * // "icons": [],
+ * // "name": "my_name",
+ * // "startUrl": "my_startUrl",
+ * // "title": "my_title",
+ * // "versionCode": "my_versionCode"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.webApps.patch
* @memberOf! ()
*
@@ -4139,6 +5620,62 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.enterprises.webTokens.create
* @desc Creates a web token to access an embeddable managed Google Play web UI for a given enterprise.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.enterprises.webTokens.create({
+ * // The name of the enterprise in the form enterprises/{enterpriseId}.
+ * parent: 'enterprises/my-enterprise',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "enabledFeatures": [],
+ * // "name": "my_name",
+ * // "parentFrameUrl": "my_parentFrameUrl",
+ * // "permissions": [],
+ * // "value": "my_value"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "enabledFeatures": [],
+ * // "name": "my_name",
+ * // "parentFrameUrl": "my_parentFrameUrl",
+ * // "permissions": [],
+ * // "value": "my_value"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.enterprises.webTokens.create
* @memberOf! ()
*
@@ -4238,6 +5775,49 @@ export namespace androidmanagement_v1 {
/**
* androidmanagement.signupUrls.create
* @desc Creates an enterprise signup URL.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidmanagement.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidmanagement = google.androidmanagement('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidmanagement'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidmanagement.signupUrls.create({
+ * // The callback URL that the admin will be redirected to after successfully creating an enterprise. Before redirecting there the system will add a query parameter to this URL named enterpriseToken which will contain an opaque token to be used for the create enterprise request. The URL will be parsed then reformatted in order to add the enterpriseToken parameter, so there may be some minor formatting changes.
+ * callbackUrl: 'placeholder-value',
+ * // The ID of the Google Cloud Platform project which will own the enterprise.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidmanagement.signupUrls.create
* @memberOf! ()
*
diff --git a/src/apis/androidpublisher/v1.1.ts b/src/apis/androidpublisher/v1.1.ts
index 43ac68eeb24..b8336b31909 100644
--- a/src/apis/androidpublisher/v1.1.ts
+++ b/src/apis/androidpublisher/v1.1.ts
@@ -140,6 +140,56 @@ export namespace androidpublisher_v1_1 {
/**
* androidpublisher.inapppurchases.get
* @desc Checks the purchase and consumption status of an inapp item.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v1.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.inapppurchases.get({
+ * // The package name of the application the inapp product was sold in (for example, 'com.some.thing').
+ * packageName: 'placeholder-value',
+ * // The inapp product SKU (for example, 'com.some.thing.inapp1').
+ * productId: 'placeholder-value',
+ * // The token provided to the user's device when the inapp product was purchased.
+ * token: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "consumptionState": 0,
+ * // "developerPayload": "my_developerPayload",
+ * // "kind": "my_kind",
+ * // "orderId": "my_orderId",
+ * // "purchaseState": 0,
+ * // "purchaseTime": "my_purchaseTime",
+ * // "purchaseType": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.inapppurchases.get
* @memberOf! ()
*
diff --git a/src/apis/androidpublisher/v2.ts b/src/apis/androidpublisher/v2.ts
index f6c34cade0a..a8d14aa6db4 100644
--- a/src/apis/androidpublisher/v2.ts
+++ b/src/apis/androidpublisher/v2.ts
@@ -188,6 +188,56 @@ export namespace androidpublisher_v2 {
/**
* androidpublisher.purchases.products.get
* @desc Checks the purchase and consumption status of an inapp item.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.purchases.products.get({
+ * // The package name of the application the inapp product was sold in (for example, 'com.some.thing').
+ * packageName: 'placeholder-value',
+ * // The inapp product SKU (for example, 'com.some.thing.inapp1').
+ * productId: 'placeholder-value',
+ * // The token provided to the user's device when the inapp product was purchased.
+ * token: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "consumptionState": 0,
+ * // "developerPayload": "my_developerPayload",
+ * // "kind": "my_kind",
+ * // "orderId": "my_orderId",
+ * // "purchaseState": 0,
+ * // "purchaseTimeMillis": "my_purchaseTimeMillis",
+ * // "purchaseType": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.purchases.products.get
* @memberOf! ()
*
@@ -292,6 +342,58 @@ export namespace androidpublisher_v2 {
/**
* androidpublisher.purchases.voidedpurchases.list
* @desc Lists the purchases that were canceled, refunded or charged-back.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.purchases.voidedpurchases.list({
+ * // The time, in milliseconds since the Epoch, of the newest voided purchase that you want to see in the response. The value of this parameter cannot be greater than the current time and is ignored if a pagination token is set. Default value is current time. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response.
+ * endTime: 'placeholder-value',
+ *
+ * maxResults: 'placeholder-value',
+ * // The package name of the application for which voided purchases need to be returned (for example, 'com.some.thing').
+ * packageName: 'placeholder-value',
+ *
+ * startIndex: 'placeholder-value',
+ * // The time, in milliseconds since the Epoch, of the oldest voided purchase that you want to see in the response. The value of this parameter cannot be older than 30 days and is ignored if a pagination token is set. Default value is current time minus 30 days. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response.
+ * startTime: 'placeholder-value',
+ *
+ * token: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "pageInfo": {},
+ * // "tokenPagination": {},
+ * // "voidedPurchases": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.purchases.voidedpurchases.list
* @memberOf! ()
*
diff --git a/src/apis/androidpublisher/v3.ts b/src/apis/androidpublisher/v3.ts
index 90e7bbec3cd..80dbc640633 100644
--- a/src/apis/androidpublisher/v3.ts
+++ b/src/apis/androidpublisher/v3.ts
@@ -1056,6 +1056,49 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.commit
* @desc Commits/applies the changes made in this edit back to the app.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.commit({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "expiryTimeSeconds": "my_expiryTimeSeconds",
+ * // "id": "my_id"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.commit
* @memberOf! ()
*
@@ -1128,6 +1171,43 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.delete
* @desc Deletes an edit for an app. Creating a new edit will automatically delete any of your previous edits so this method need only be called if you want to preemptively abandon an edit.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.delete({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.delete
* @memberOf! ()
*
@@ -1200,6 +1280,49 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.get
* @desc Returns information about the edit specified. Calls will fail if the edit is no long active (e.g. has been deleted, superseded or expired).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.get({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "expiryTimeSeconds": "my_expiryTimeSeconds",
+ * // "id": "my_id"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.get
* @memberOf! ()
*
@@ -1272,6 +1395,56 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.insert
* @desc Creates a new edit for an app, populated with the app's current state.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.insert({
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "expiryTimeSeconds": "my_expiryTimeSeconds",
+ * // "id": "my_id"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "expiryTimeSeconds": "my_expiryTimeSeconds",
+ * // "id": "my_id"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.insert
* @memberOf! ()
*
@@ -1343,6 +1516,49 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.validate
* @desc Checks that the edit can be successfully committed. The edit's changes are not applied to the live app.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.validate({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "expiryTimeSeconds": "my_expiryTimeSeconds",
+ * // "id": "my_id"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.validate
* @memberOf! ()
*
@@ -1499,6 +1715,56 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.apks.addexternallyhosted
* @desc Creates a new APK without uploading the APK itself to Google Play, instead hosting the APK at a specified URL. This function is only available to enterprises using Google Play for Work whose application is configured to restrict distribution to the enterprise domain.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.apks.addexternallyhosted({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "externallyHostedApk": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "externallyHostedApk": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.apks.addexternallyhosted
* @memberOf! ()
*
@@ -1583,6 +1849,49 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.apks.list
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.apks.list({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "apks": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.apks.list
* @memberOf! ()
*
@@ -1656,6 +1965,58 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.apks.upload
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.apks.upload({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * requestBody: {
+ * // request body parameters
+ * },
+ * media: {
+ * mimeType: 'placeholder-value',
+ * body: 'placeholder-value',
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "binary": {},
+ * // "testBinary": {},
+ * // "versionCode": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.apks.upload
* @memberOf! ()
*
@@ -1815,6 +2176,49 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.bundles.list
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.bundles.list({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bundles": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.bundles.list
* @memberOf! ()
*
@@ -1890,6 +2294,60 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.bundles.upload
* @desc Uploads a new Android App Bundle to this edit. If you are using the Google API client libraries, please increase the timeout of the http request before calling this endpoint (a timeout of 2 minutes is recommended). See: https://developers.google.com/api-client-library/java/google-api-java-client/errors for an example in java.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.bundles.upload({
+ * // Must be set to true if the bundle installation may trigger a warning on user devices (for example, if installation size may be over a threshold, typically 100 MB).
+ * ackBundleInstallationWarning: 'placeholder-value',
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * requestBody: {
+ * // request body parameters
+ * },
+ * media: {
+ * mimeType: 'placeholder-value',
+ * body: 'placeholder-value',
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "sha1": "my_sha1",
+ * // "sha256": "my_sha256",
+ * // "versionCode": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.bundles.upload
* @memberOf! ()
*
@@ -2035,6 +2493,60 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.deobfuscationfiles.upload
* @desc Uploads the deobfuscation file of the specified APK. If a deobfuscation or symbolication file already exists, it will be replaced. See https://developer.android.com/studio/build/shrink-code to learn more about deobfuscation files.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.deobfuscationfiles.upload({
+ * // The version code of the APK whose deobfuscation file is being uploaded.
+ * apkVersionCode: 'placeholder-value',
+ *
+ * deobfuscationFileType: 'placeholder-value',
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier of the Android app for which the deobfuscation files are being uploaded; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * requestBody: {
+ * // request body parameters
+ * },
+ * media: {
+ * mimeType: 'placeholder-value',
+ * body: 'placeholder-value',
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deobfuscationFile": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.deobfuscationfiles.upload
* @memberOf! ()
*
@@ -2190,6 +2702,51 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.details.get
* @desc Fetches app details for this edit. This includes the default language and developer support contact information.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.details.get({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "contactEmail": "my_contactEmail",
+ * // "contactPhone": "my_contactPhone",
+ * // "contactWebsite": "my_contactWebsite",
+ * // "defaultLanguage": "my_defaultLanguage"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.details.get
* @memberOf! ()
*
@@ -2265,6 +2822,62 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.details.patch
* @desc Updates app details for this edit. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.details.patch({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "contactEmail": "my_contactEmail",
+ * // "contactPhone": "my_contactPhone",
+ * // "contactWebsite": "my_contactWebsite",
+ * // "defaultLanguage": "my_defaultLanguage"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "contactEmail": "my_contactEmail",
+ * // "contactPhone": "my_contactPhone",
+ * // "contactWebsite": "my_contactWebsite",
+ * // "defaultLanguage": "my_defaultLanguage"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.details.patch
* @memberOf! ()
*
@@ -2341,6 +2954,62 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.details.update
* @desc Updates app details for this edit.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.details.update({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "contactEmail": "my_contactEmail",
+ * // "contactPhone": "my_contactPhone",
+ * // "contactWebsite": "my_contactWebsite",
+ * // "defaultLanguage": "my_defaultLanguage"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "contactEmail": "my_contactEmail",
+ * // "contactPhone": "my_contactPhone",
+ * // "contactWebsite": "my_contactWebsite",
+ * // "defaultLanguage": "my_defaultLanguage"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.details.update
* @memberOf! ()
*
@@ -2483,6 +3152,53 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.expansionfiles.get
* @desc Fetches the Expansion File configuration for the APK specified.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.expansionfiles.get({
+ * // The version code of the APK whose Expansion File configuration is being read or modified.
+ * apkVersionCode: 'placeholder-value',
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ *
+ * expansionFileType: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "fileSize": "my_fileSize",
+ * // "referencesVersion": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.expansionfiles.get
* @memberOf! ()
*
@@ -2570,6 +3286,62 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.expansionfiles.patch
* @desc Updates the APK's Expansion File configuration to reference another APK's Expansion Files. To add a new Expansion File use the Upload method. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.expansionfiles.patch({
+ * // The version code of the APK whose Expansion File configuration is being read or modified.
+ * apkVersionCode: 'placeholder-value',
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ *
+ * expansionFileType: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fileSize": "my_fileSize",
+ * // "referencesVersion": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "fileSize": "my_fileSize",
+ * // "referencesVersion": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.expansionfiles.patch
* @memberOf! ()
*
@@ -2658,6 +3430,62 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.expansionfiles.update
* @desc Updates the APK's Expansion File configuration to reference another APK's Expansion Files. To add a new Expansion File use the Upload method.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.expansionfiles.update({
+ * // The version code of the APK whose Expansion File configuration is being read or modified.
+ * apkVersionCode: 'placeholder-value',
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ *
+ * expansionFileType: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fileSize": "my_fileSize",
+ * // "referencesVersion": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "fileSize": "my_fileSize",
+ * // "referencesVersion": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.expansionfiles.update
* @memberOf! ()
*
@@ -2746,6 +3574,60 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.expansionfiles.upload
* @desc Uploads and attaches a new Expansion File to the APK specified.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.expansionfiles.upload({
+ * // The version code of the APK whose Expansion File configuration is being read or modified.
+ * apkVersionCode: 'placeholder-value',
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ *
+ * expansionFileType: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * requestBody: {
+ * // request body parameters
+ * },
+ * media: {
+ * mimeType: 'placeholder-value',
+ * body: 'placeholder-value',
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "expansionFile": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.expansionfiles.upload
* @memberOf! ()
*
@@ -2983,6 +3865,49 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.images.delete
* @desc Deletes the image (specified by id) from the edit.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.images.delete({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier an image within the set of images attached to this edit.
+ * imageId: 'placeholder-value',
+ *
+ * imageType: 'placeholder-value',
+ * // The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT".
+ * language: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.images.delete
* @memberOf! ()
*
@@ -3071,6 +3996,52 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.images.deleteall
* @desc Deletes all images for the specified language and image type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.images.deleteall({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ *
+ * imageType: 'placeholder-value',
+ * // The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT".
+ * language: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deleted": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.images.deleteall
* @memberOf! ()
*
@@ -3152,6 +4123,52 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.images.list
* @desc Lists all images for the specified language and image type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.images.list({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ *
+ * imageType: 'placeholder-value',
+ * // The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT".
+ * language: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "images": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.images.list
* @memberOf! ()
*
@@ -3229,6 +4246,60 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.images.upload
* @desc Uploads a new image and adds it to the list of images for the specified language and image type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.images.upload({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ *
+ * imageType: 'placeholder-value',
+ * // The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT".
+ * language: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * requestBody: {
+ * // request body parameters
+ * },
+ * media: {
+ * mimeType: 'placeholder-value',
+ * body: 'placeholder-value',
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "image": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.images.upload
* @memberOf! ()
*
@@ -3443,6 +4514,45 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.listings.delete
* @desc Deletes the specified localized store listing from an edit.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.listings.delete({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT".
+ * language: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.listings.delete
* @memberOf! ()
*
@@ -3517,6 +4627,43 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.listings.deleteall
* @desc Deletes all localized listings from an edit.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.listings.deleteall({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.listings.deleteall
* @memberOf! ()
*
@@ -3590,6 +4737,54 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.listings.get
* @desc Fetches information about a localized store listing.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.listings.get({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT".
+ * language: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "fullDescription": "my_fullDescription",
+ * // "language": "my_language",
+ * // "shortDescription": "my_shortDescription",
+ * // "title": "my_title",
+ * // "video": "my_video"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.listings.get
* @memberOf! ()
*
@@ -3664,6 +4859,49 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.listings.list
* @desc Returns all of the localized store listings attached to this edit.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.listings.list({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "listings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.listings.list
* @memberOf! ()
*
@@ -3741,6 +4979,66 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.listings.patch
* @desc Creates or updates a localized store listing. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.listings.patch({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT".
+ * language: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fullDescription": "my_fullDescription",
+ * // "language": "my_language",
+ * // "shortDescription": "my_shortDescription",
+ * // "title": "my_title",
+ * // "video": "my_video"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "fullDescription": "my_fullDescription",
+ * // "language": "my_language",
+ * // "shortDescription": "my_shortDescription",
+ * // "title": "my_title",
+ * // "video": "my_video"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.listings.patch
* @memberOf! ()
*
@@ -3816,6 +5114,66 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.listings.update
* @desc Creates or updates a localized store listing.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.listings.update({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT".
+ * language: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fullDescription": "my_fullDescription",
+ * // "language": "my_language",
+ * // "shortDescription": "my_shortDescription",
+ * // "title": "my_title",
+ * // "video": "my_video"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "fullDescription": "my_fullDescription",
+ * // "language": "my_language",
+ * // "shortDescription": "my_shortDescription",
+ * // "title": "my_title",
+ * // "video": "my_video"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.listings.update
* @memberOf! ()
*
@@ -4020,6 +5378,53 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.testers.get
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.testers.get({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * // The track to read or modify.
+ * track: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoEnrolledAndroidGroups": [],
+ * // "autoEnrolledGoogleGroups": [],
+ * // "excludedGoogleGroups": [],
+ * // "googleGroups": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.testers.get
* @memberOf! ()
*
@@ -4093,6 +5498,64 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.testers.patch
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.testers.patch({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * // The track to read or modify.
+ * track: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoEnrolledAndroidGroups": [],
+ * // "autoEnrolledGoogleGroups": [],
+ * // "excludedGoogleGroups": [],
+ * // "googleGroups": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoEnrolledAndroidGroups": [],
+ * // "autoEnrolledGoogleGroups": [],
+ * // "excludedGoogleGroups": [],
+ * // "googleGroups": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.testers.patch
* @memberOf! ()
*
@@ -4167,6 +5630,64 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.testers.update
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.testers.update({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * // The track to read or modify.
+ * track: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoEnrolledAndroidGroups": [],
+ * // "autoEnrolledGoogleGroups": [],
+ * // "excludedGoogleGroups": [],
+ * // "googleGroups": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoEnrolledAndroidGroups": [],
+ * // "autoEnrolledGoogleGroups": [],
+ * // "excludedGoogleGroups": [],
+ * // "googleGroups": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.testers.update
* @memberOf! ()
*
@@ -4320,6 +5841,51 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.tracks.get
* @desc Fetches the track configuration for the specified track type. Includes the APK version codes that are in this track.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.tracks.get({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * // The track to read or modify.
+ * track: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "releases": [],
+ * // "track": "my_track"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.tracks.get
* @memberOf! ()
*
@@ -4393,6 +5959,49 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.tracks.list
* @desc Lists all the track configurations for this edit.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.tracks.list({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "tracks": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.tracks.list
* @memberOf! ()
*
@@ -4468,6 +6077,60 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.tracks.patch
* @desc Updates the track configuration for the specified track type. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.tracks.patch({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * // The track to read or modify.
+ * track: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "releases": [],
+ * // "track": "my_track"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "releases": [],
+ * // "track": "my_track"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.tracks.patch
* @memberOf! ()
*
@@ -4543,6 +6206,60 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.edits.tracks.update
* @desc Updates the track configuration for the specified track type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.edits.tracks.update({
+ * // Unique identifier for this edit.
+ * editId: 'placeholder-value',
+ * // Unique identifier for the Android app that is being updated; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * // The track to read or modify.
+ * track: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "releases": [],
+ * // "track": "my_track"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "releases": [],
+ * // "track": "my_track"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.edits.tracks.update
* @memberOf! ()
*
@@ -4711,6 +6428,43 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.inappproducts.delete
* @desc Delete an in-app product for an app.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.inappproducts.delete({
+ * // Unique identifier for the Android app with the in-app product; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * // Unique identifier for the in-app product.
+ * sku: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.inappproducts.delete
* @memberOf! ()
*
@@ -4784,6 +6538,57 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.inappproducts.get
* @desc Returns information about the in-app product specified.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.inappproducts.get({
+ * packageName: 'placeholder-value',
+ * // Unique identifier for the in-app product.
+ * sku: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "defaultLanguage": "my_defaultLanguage",
+ * // "defaultPrice": {},
+ * // "gracePeriod": "my_gracePeriod",
+ * // "listings": {},
+ * // "packageName": "my_packageName",
+ * // "prices": {},
+ * // "purchaseType": "my_purchaseType",
+ * // "sku": "my_sku",
+ * // "status": "my_status",
+ * // "subscriptionPeriod": "my_subscriptionPeriod",
+ * // "trialPeriod": "my_trialPeriod"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.inappproducts.get
* @memberOf! ()
*
@@ -4859,6 +6664,76 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.inappproducts.insert
* @desc Creates a new in-app product for an app.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.inappproducts.insert({
+ * // If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false.
+ * autoConvertMissingPrices: 'placeholder-value',
+ * // Unique identifier for the Android app; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "defaultLanguage": "my_defaultLanguage",
+ * // "defaultPrice": {},
+ * // "gracePeriod": "my_gracePeriod",
+ * // "listings": {},
+ * // "packageName": "my_packageName",
+ * // "prices": {},
+ * // "purchaseType": "my_purchaseType",
+ * // "sku": "my_sku",
+ * // "status": "my_status",
+ * // "subscriptionPeriod": "my_subscriptionPeriod",
+ * // "trialPeriod": "my_trialPeriod"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "defaultLanguage": "my_defaultLanguage",
+ * // "defaultPrice": {},
+ * // "gracePeriod": "my_gracePeriod",
+ * // "listings": {},
+ * // "packageName": "my_packageName",
+ * // "prices": {},
+ * // "purchaseType": "my_purchaseType",
+ * // "sku": "my_sku",
+ * // "status": "my_status",
+ * // "subscriptionPeriod": "my_subscriptionPeriod",
+ * // "trialPeriod": "my_trialPeriod"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.inappproducts.insert
* @memberOf! ()
*
@@ -4935,6 +6810,54 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.inappproducts.list
* @desc List all the in-app products for an Android app, both subscriptions and managed in-app products..
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.inappproducts.list({
+ * maxResults: 'placeholder-value',
+ * // Unique identifier for the Android app with in-app products; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * startIndex: 'placeholder-value',
+ *
+ * token: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "inappproduct": [],
+ * // "kind": "my_kind",
+ * // "pageInfo": {},
+ * // "tokenPagination": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.inappproducts.list
* @memberOf! ()
*
@@ -5019,6 +6942,78 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.inappproducts.patch
* @desc Updates the details of an in-app product. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.inappproducts.patch({
+ * // If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false.
+ * autoConvertMissingPrices: 'placeholder-value',
+ * // Unique identifier for the Android app with the in-app product; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * // Unique identifier for the in-app product.
+ * sku: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "defaultLanguage": "my_defaultLanguage",
+ * // "defaultPrice": {},
+ * // "gracePeriod": "my_gracePeriod",
+ * // "listings": {},
+ * // "packageName": "my_packageName",
+ * // "prices": {},
+ * // "purchaseType": "my_purchaseType",
+ * // "sku": "my_sku",
+ * // "status": "my_status",
+ * // "subscriptionPeriod": "my_subscriptionPeriod",
+ * // "trialPeriod": "my_trialPeriod"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "defaultLanguage": "my_defaultLanguage",
+ * // "defaultPrice": {},
+ * // "gracePeriod": "my_gracePeriod",
+ * // "listings": {},
+ * // "packageName": "my_packageName",
+ * // "prices": {},
+ * // "purchaseType": "my_purchaseType",
+ * // "sku": "my_sku",
+ * // "status": "my_status",
+ * // "subscriptionPeriod": "my_subscriptionPeriod",
+ * // "trialPeriod": "my_trialPeriod"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.inappproducts.patch
* @memberOf! ()
*
@@ -5096,6 +7091,78 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.inappproducts.update
* @desc Updates the details of an in-app product.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.inappproducts.update({
+ * // If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false.
+ * autoConvertMissingPrices: 'placeholder-value',
+ * // Unique identifier for the Android app with the in-app product; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * // Unique identifier for the in-app product.
+ * sku: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "defaultLanguage": "my_defaultLanguage",
+ * // "defaultPrice": {},
+ * // "gracePeriod": "my_gracePeriod",
+ * // "listings": {},
+ * // "packageName": "my_packageName",
+ * // "prices": {},
+ * // "purchaseType": "my_purchaseType",
+ * // "sku": "my_sku",
+ * // "status": "my_status",
+ * // "subscriptionPeriod": "my_subscriptionPeriod",
+ * // "trialPeriod": "my_trialPeriod"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "defaultLanguage": "my_defaultLanguage",
+ * // "defaultPrice": {},
+ * // "gracePeriod": "my_gracePeriod",
+ * // "listings": {},
+ * // "packageName": "my_packageName",
+ * // "prices": {},
+ * // "purchaseType": "my_purchaseType",
+ * // "sku": "my_sku",
+ * // "status": "my_status",
+ * // "subscriptionPeriod": "my_subscriptionPeriod",
+ * // "trialPeriod": "my_trialPeriod"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.inappproducts.update
* @memberOf! ()
*
@@ -5308,6 +7375,56 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.internalappsharingartifacts.uploadapk
* @desc Uploads an APK to internal app sharing. If you are using the Google API client libraries, please increase the timeout of the http request before calling this endpoint (a timeout of 2 minutes is recommended). See: https://developers.google.com/api-client-library/java/google-api-java-client/errors for an example in java.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.internalappsharingartifacts.uploadapk({
+ * // Unique identifier for the Android app; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * requestBody: {
+ * // request body parameters
+ * },
+ * media: {
+ * mimeType: 'placeholder-value',
+ * body: 'placeholder-value',
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificateFingerprint": "my_certificateFingerprint",
+ * // "downloadUrl": "my_downloadUrl",
+ * // "sha256": "my_sha256"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.internalappsharingartifacts.uploadapk
* @memberOf! ()
*
@@ -5396,6 +7513,56 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.internalappsharingartifacts.uploadbundle
* @desc Uploads an app bundle to internal app sharing. If you are using the Google API client libraries, please increase the timeout of the http request before calling this endpoint (a timeout of 2 minutes is recommended). See: https://developers.google.com/api-client-library/java/google-api-java-client/errors for an example in java.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.internalappsharingartifacts.uploadbundle({
+ * // Unique identifier for the Android app; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * requestBody: {
+ * // request body parameters
+ * },
+ * media: {
+ * mimeType: 'placeholder-value',
+ * body: 'placeholder-value',
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificateFingerprint": "my_certificateFingerprint",
+ * // "downloadUrl": "my_downloadUrl",
+ * // "sha256": "my_sha256"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.internalappsharingartifacts.uploadbundle
* @memberOf! ()
*
@@ -5556,6 +7723,45 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.orders.refund
* @desc Refund a user's subscription or in-app purchase order.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.orders.refund({
+ * // The order ID provided to the user when the subscription or in-app order was purchased.
+ * orderId: 'placeholder-value',
+ * // The package name of the application for which this subscription or in-app item was purchased (for example, 'com.some.thing').
+ * packageName: 'placeholder-value',
+ * // Whether to revoke the purchased item. If set to true, access to the subscription or in-app item will be terminated immediately. If the item is a recurring subscription, all future payments will also be terminated. Consumed in-app items need to be handled by developer's app. (optional)
+ * revoke: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.orders.refund
* @memberOf! ()
*
@@ -5671,6 +7877,53 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.purchases.products.acknowledge
* @desc Acknowledges a purchase of an inapp item.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.purchases.products.acknowledge({
+ * // The package name of the application the inapp product was sold in (for example, 'com.some.thing').
+ * packageName: 'placeholder-value',
+ * // The inapp product SKU (for example, 'com.some.thing.inapp1').
+ * productId: 'placeholder-value',
+ * // The token provided to the user's device when the subscription was purchased.
+ * token: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "developerPayload": "my_developerPayload"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.purchases.products.acknowledge
* @memberOf! ()
*
@@ -5746,6 +7999,60 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.purchases.products.get
* @desc Checks the purchase and consumption status of an inapp item.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.purchases.products.get({
+ * // The package name of the application the inapp product was sold in (for example, 'com.some.thing').
+ * packageName: 'placeholder-value',
+ * // The inapp product SKU (for example, 'com.some.thing.inapp1').
+ * productId: 'placeholder-value',
+ * // The token provided to the user's device when the inapp product was purchased.
+ * token: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "acknowledgementState": 0,
+ * // "consumptionState": 0,
+ * // "developerPayload": "my_developerPayload",
+ * // "kind": "my_kind",
+ * // "orderId": "my_orderId",
+ * // "productId": "my_productId",
+ * // "purchaseState": 0,
+ * // "purchaseTimeMillis": "my_purchaseTimeMillis",
+ * // "purchaseToken": "my_purchaseToken",
+ * // "purchaseType": 0,
+ * // "quantity": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.purchases.products.get
* @memberOf! ()
*
@@ -5875,6 +8182,53 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.purchases.subscriptions.acknowledge
* @desc Acknowledges a subscription purchase.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.purchases.subscriptions.acknowledge({
+ * // The package name of the application for which this subscription was purchased (for example, 'com.some.thing').
+ * packageName: 'placeholder-value',
+ * // The purchased subscription ID (for example, 'monthly001').
+ * subscriptionId: 'placeholder-value',
+ * // The token provided to the user's device when the subscription was purchased.
+ * token: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "developerPayload": "my_developerPayload"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.purchases.subscriptions.acknowledge
* @memberOf! ()
*
@@ -5950,6 +8304,45 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.purchases.subscriptions.cancel
* @desc Cancels a user's subscription purchase. The subscription remains valid until its expiration time.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.purchases.subscriptions.cancel({
+ * // The package name of the application for which this subscription was purchased (for example, 'com.some.thing').
+ * packageName: 'placeholder-value',
+ * // The purchased subscription ID (for example, 'monthly001').
+ * subscriptionId: 'placeholder-value',
+ * // The token provided to the user's device when the subscription was purchased.
+ * token: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.purchases.subscriptions.cancel
* @memberOf! ()
*
@@ -6024,6 +8417,58 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.purchases.subscriptions.defer
* @desc Defers a user's subscription purchase until a specified future expiration time.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.purchases.subscriptions.defer({
+ * // The package name of the application for which this subscription was purchased (for example, 'com.some.thing').
+ * packageName: 'placeholder-value',
+ * // The purchased subscription ID (for example, 'monthly001').
+ * subscriptionId: 'placeholder-value',
+ * // The token provided to the user's device when the subscription was purchased.
+ * token: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deferralInfo": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "newExpiryTimeMillis": "my_newExpiryTimeMillis"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.purchases.subscriptions.defer
* @memberOf! ()
*
@@ -6110,6 +8555,76 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.purchases.subscriptions.get
* @desc Checks whether a user's subscription purchase is valid and returns its expiry time.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.purchases.subscriptions.get({
+ * // The package name of the application for which this subscription was purchased (for example, 'com.some.thing').
+ * packageName: 'placeholder-value',
+ * // The purchased subscription ID (for example, 'monthly001').
+ * subscriptionId: 'placeholder-value',
+ * // The token provided to the user's device when the subscription was purchased.
+ * token: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "acknowledgementState": 0,
+ * // "autoRenewing": false,
+ * // "autoResumeTimeMillis": "my_autoResumeTimeMillis",
+ * // "cancelReason": 0,
+ * // "cancelSurveyResult": {},
+ * // "countryCode": "my_countryCode",
+ * // "developerPayload": "my_developerPayload",
+ * // "emailAddress": "my_emailAddress",
+ * // "expiryTimeMillis": "my_expiryTimeMillis",
+ * // "externalAccountId": "my_externalAccountId",
+ * // "familyName": "my_familyName",
+ * // "givenName": "my_givenName",
+ * // "introductoryPriceInfo": {},
+ * // "kind": "my_kind",
+ * // "linkedPurchaseToken": "my_linkedPurchaseToken",
+ * // "orderId": "my_orderId",
+ * // "paymentState": 0,
+ * // "priceAmountMicros": "my_priceAmountMicros",
+ * // "priceChange": {},
+ * // "priceCurrencyCode": "my_priceCurrencyCode",
+ * // "profileId": "my_profileId",
+ * // "profileName": "my_profileName",
+ * // "promotionCode": "my_promotionCode",
+ * // "promotionType": 0,
+ * // "purchaseType": 0,
+ * // "startTimeMillis": "my_startTimeMillis",
+ * // "userCancellationTimeMillis": "my_userCancellationTimeMillis"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.purchases.subscriptions.get
* @memberOf! ()
*
@@ -6188,6 +8703,45 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.purchases.subscriptions.refund
* @desc Refunds a user's subscription purchase, but the subscription remains valid until its expiration time and it will continue to recur.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.purchases.subscriptions.refund({
+ * // The package name of the application for which this subscription was purchased (for example, 'com.some.thing').
+ * packageName: 'placeholder-value',
+ * // The purchased subscription ID (for example, 'monthly001').
+ * subscriptionId: 'placeholder-value',
+ * // The token provided to the user's device when the subscription was purchased.
+ * token: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.purchases.subscriptions.refund
* @memberOf! ()
*
@@ -6262,6 +8816,45 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.purchases.subscriptions.revoke
* @desc Refunds and immediately revokes a user's subscription purchase. Access to the subscription will be terminated immediately and it will stop recurring.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.purchases.subscriptions.revoke({
+ * // The package name of the application for which this subscription was purchased (for example, 'com.some.thing').
+ * packageName: 'placeholder-value',
+ * // The purchased subscription ID (for example, 'monthly001').
+ * subscriptionId: 'placeholder-value',
+ * // The token provided to the user's device when the subscription was purchased.
+ * token: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.purchases.subscriptions.revoke
* @memberOf! ()
*
@@ -6474,6 +9067,62 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.purchases.voidedpurchases.list
* @desc Lists the purchases that were canceled, refunded or charged-back.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.purchases.voidedpurchases.list({
+ * // The time, in milliseconds since the Epoch, of the newest voided purchase that you want to see in the response. The value of this parameter cannot be greater than the current time and is ignored if a pagination token is set. Default value is current time. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response.
+ * endTime: 'placeholder-value',
+ *
+ * maxResults: 'placeholder-value',
+ * // The package name of the application for which voided purchases need to be returned (for example, 'com.some.thing').
+ * packageName: 'placeholder-value',
+ *
+ * startIndex: 'placeholder-value',
+ * // The time, in milliseconds since the Epoch, of the oldest voided purchase that you want to see in the response. The value of this parameter cannot be older than 30 days and is ignored if a pagination token is set. Default value is current time minus 30 days. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response.
+ * startTime: 'placeholder-value',
+ *
+ * token: 'placeholder-value',
+ * // The type of voided purchases that you want to see in the response. Possible values are:
+ * // - 0: Only voided in-app product purchases will be returned in the response. This is the default value.
+ * // - 1: Both voided in-app purchases and voided subscription purchases will be returned in the response. Note: Before requesting to receive voided subscription purchases, you must switch to use orderId in the response which uniquely identifies one-time purchases and subscriptions. Otherwise, you will receive multiple subscription orders with the same PurchaseToken, because subscription renewal orders share the same PurchaseToken.
+ * type: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "pageInfo": {},
+ * // "tokenPagination": {},
+ * // "voidedPurchases": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.purchases.voidedpurchases.list
* @memberOf! ()
*
@@ -6605,6 +9254,52 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.reviews.get
* @desc Returns a single review.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.reviews.get({
+ * // Unique identifier for the Android app for which we want reviews; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * reviewId: 'placeholder-value',
+ *
+ * translationLanguage: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "authorName": "my_authorName",
+ * // "comments": [],
+ * // "reviewId": "my_reviewId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.reviews.get
* @memberOf! ()
*
@@ -6678,6 +9373,55 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.reviews.list
* @desc Returns a list of reviews. Only reviews from last week will be returned.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.reviews.list({
+ * maxResults: 'placeholder-value',
+ * // Unique identifier for the Android app for which we want reviews; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * startIndex: 'placeholder-value',
+ *
+ * token: 'placeholder-value',
+ *
+ * translationLanguage: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "pageInfo": {},
+ * // "reviews": [],
+ * // "tokenPagination": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.reviews.list
* @memberOf! ()
*
@@ -6755,6 +9499,56 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.reviews.reply
* @desc Reply to a single review, or update an existing reply.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.reviews.reply({
+ * // Unique identifier for the Android app for which we want reviews; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * reviewId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "replyText": "my_replyText"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "result": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.reviews.reply
* @memberOf! ()
*
@@ -6915,6 +9709,57 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.systemapks.variants.create
* @desc Creates a new variant of APK which is suitable for inclusion in a system image.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.systemapks.variants.create({
+ * // Unique identifier for the Android app; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * // The version code of the App Bundle.
+ * versionCode: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deviceSpec": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deviceSpec": {},
+ * // "variantId": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.systemapks.variants.create
* @memberOf! ()
*
@@ -6989,6 +9834,45 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.systemapks.variants.download
* @desc Download a previously created APK which is suitable for inclusion in a system image.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.systemapks.variants.download({
+ * // Unique identifier for the Android app; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ *
+ * variantId: 'placeholder-value',
+ * // The version code of the App Bundle.
+ * versionCode: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.systemapks.variants.download
* @memberOf! ()
*
@@ -7063,6 +9947,51 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.systemapks.variants.get
* @desc Returns a previously created system APK variant.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.systemapks.variants.get({
+ * // Unique identifier for the Android app; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * // Unique identifier for this variant.
+ * variantId: 'placeholder-value',
+ * // The version code of the App Bundle.
+ * versionCode: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deviceSpec": {},
+ * // "variantId": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.systemapks.variants.get
* @memberOf! ()
*
@@ -7137,6 +10066,48 @@ export namespace androidpublisher_v3 {
/**
* androidpublisher.systemapks.variants.list
* @desc Returns the list of previously created system APK variants.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const androidpublisher = google.androidpublisher('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/androidpublisher'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await androidpublisher.systemapks.variants.list({
+ * // Unique identifier for the Android app; for example, "com.spiffygame".
+ * packageName: 'placeholder-value',
+ * // The version code of the App Bundle.
+ * versionCode: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "variants": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias androidpublisher.systemapks.variants.list
* @memberOf! ()
*
diff --git a/src/apis/appengine/v1.ts b/src/apis/appengine/v1.ts
index 7e7dcc52401..9d512d81bf1 100644
--- a/src/apis/appengine/v1.ts
+++ b/src/apis/appengine/v1.ts
@@ -1600,6 +1600,67 @@ export namespace appengine_v1 {
/**
* appengine.apps.create
* @desc Creates an App Engine application for a Google Cloud Platform project. Required fields: id - The ID of the target Cloud Platform project. location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/standard/python/console/).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.create({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "authDomain": "my_authDomain",
+ * // "codeBucket": "my_codeBucket",
+ * // "defaultBucket": "my_defaultBucket",
+ * // "defaultCookieExpiration": "my_defaultCookieExpiration",
+ * // "defaultHostname": "my_defaultHostname",
+ * // "dispatchRules": [],
+ * // "featureSettings": {},
+ * // "gcrDomain": "my_gcrDomain",
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "locationId": "my_locationId",
+ * // "name": "my_name",
+ * // "servingStatus": "my_servingStatus"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.create
* @memberOf! ()
*
@@ -1670,6 +1731,62 @@ export namespace appengine_v1 {
/**
* appengine.apps.get
* @desc Gets information about an application.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.get({
+ * // Part of `name`. Name of the Application resource to get. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "authDomain": "my_authDomain",
+ * // "codeBucket": "my_codeBucket",
+ * // "defaultBucket": "my_defaultBucket",
+ * // "defaultCookieExpiration": "my_defaultCookieExpiration",
+ * // "defaultHostname": "my_defaultHostname",
+ * // "dispatchRules": [],
+ * // "featureSettings": {},
+ * // "gcrDomain": "my_gcrDomain",
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "locationId": "my_locationId",
+ * // "name": "my_name",
+ * // "servingStatus": "my_servingStatus"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.get
* @memberOf! ()
*
@@ -1740,6 +1857,72 @@ export namespace appengine_v1 {
/**
* appengine.apps.patch
* @desc Updates the specified Application resource. You can update the following fields: auth_domain - Google authentication domain for controlling user access to the application. default_cookie_expiration - Cookie expiration policy for the application.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.patch({
+ * // Part of `name`. Name of the Application resource to update. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * // Standard field mask for the set of fields to be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "authDomain": "my_authDomain",
+ * // "codeBucket": "my_codeBucket",
+ * // "defaultBucket": "my_defaultBucket",
+ * // "defaultCookieExpiration": "my_defaultCookieExpiration",
+ * // "defaultHostname": "my_defaultHostname",
+ * // "dispatchRules": [],
+ * // "featureSettings": {},
+ * // "gcrDomain": "my_gcrDomain",
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "locationId": "my_locationId",
+ * // "name": "my_name",
+ * // "servingStatus": "my_servingStatus"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.patch
* @memberOf! ()
*
@@ -1812,6 +1995,56 @@ export namespace appengine_v1 {
/**
* appengine.apps.repair
* @desc Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account. If you have deleted your App Engine service account, this will not be able to recreate it. Instead, you should attempt to use the IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . If the deletion was recent, the numeric ID can be found in the Cloud Console Activity Log.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.repair({
+ * // Part of `name`. Name of the application to repair. Example: apps/myapp
+ * appsId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.repair
* @memberOf! ()
*
@@ -1952,6 +2185,70 @@ export namespace appengine_v1 {
/**
* appengine.apps.authorizedCertificates.create
* @desc Uploads the specified SSL certificate.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedCertificates.create({
+ * // Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "certificateRawData": {},
+ * // "displayName": "my_displayName",
+ * // "domainMappingsCount": 0,
+ * // "domainNames": [],
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "managedCertificate": {},
+ * // "name": "my_name",
+ * // "visibleDomainMappings": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificateRawData": {},
+ * // "displayName": "my_displayName",
+ * // "domainMappingsCount": 0,
+ * // "domainNames": [],
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "managedCertificate": {},
+ * // "name": "my_name",
+ * // "visibleDomainMappings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedCertificates.create
* @memberOf! ()
*
@@ -2029,6 +2326,46 @@ export namespace appengine_v1 {
/**
* appengine.apps.authorizedCertificates.delete
* @desc Deletes the specified SSL certificate.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedCertificates.delete({
+ * // Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * authorizedCertificatesId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedCertificates.delete
* @memberOf! ()
*
@@ -2102,6 +2439,62 @@ export namespace appengine_v1 {
/**
* appengine.apps.authorizedCertificates.get
* @desc Gets the specified SSL certificate.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedCertificates.get({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * authorizedCertificatesId: 'placeholder-value',
+ * // Controls the set of fields returned in the GET response.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificateRawData": {},
+ * // "displayName": "my_displayName",
+ * // "domainMappingsCount": 0,
+ * // "domainNames": [],
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "managedCertificate": {},
+ * // "name": "my_name",
+ * // "visibleDomainMappings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedCertificates.get
* @memberOf! ()
*
@@ -2180,6 +2573,57 @@ export namespace appengine_v1 {
/**
* appengine.apps.authorizedCertificates.list
* @desc Lists all SSL certificates the user is authorized to administer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedCertificates.list({
+ * // Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * // Maximum results to return per page.
+ * pageSize: 'placeholder-value',
+ * // Continuation token for fetching the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Controls the set of fields returned in the LIST response.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificates": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedCertificates.list
* @memberOf! ()
*
@@ -2266,6 +2710,74 @@ export namespace appengine_v1 {
/**
* appengine.apps.authorizedCertificates.patch
* @desc Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedCertificates.patch({
+ * // Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * authorizedCertificatesId: 'placeholder-value',
+ * // Standard field mask for the set of fields to be updated. Updates are only supported on the certificate_raw_data and display_name fields.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "certificateRawData": {},
+ * // "displayName": "my_displayName",
+ * // "domainMappingsCount": 0,
+ * // "domainNames": [],
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "managedCertificate": {},
+ * // "name": "my_name",
+ * // "visibleDomainMappings": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificateRawData": {},
+ * // "displayName": "my_displayName",
+ * // "domainMappingsCount": 0,
+ * // "domainNames": [],
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "managedCertificate": {},
+ * // "name": "my_name",
+ * // "visibleDomainMappings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedCertificates.patch
* @memberOf! ()
*
@@ -2455,6 +2967,55 @@ export namespace appengine_v1 {
/**
* appengine.apps.authorizedDomains.list
* @desc Lists all domains the user is authorized to administer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedDomains.list({
+ * // Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * // Maximum results to return per page.
+ * pageSize: 'placeholder-value',
+ * // Continuation token for fetching the next page of results.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "domains": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedDomains.list
* @memberOf! ()
*
@@ -2568,6 +3129,63 @@ export namespace appengine_v1 {
/**
* appengine.apps.domainMappings.create
* @desc Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.domainMappings.create({
+ * // Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * // Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.
+ * overrideStrategy: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "resourceRecords": [],
+ * // "sslSettings": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.domainMappings.create
* @memberOf! ()
*
@@ -2644,6 +3262,52 @@ export namespace appengine_v1 {
/**
* appengine.apps.domainMappings.delete
* @desc Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.domainMappings.delete({
+ * // Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * domainMappingsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.domainMappings.delete
* @memberOf! ()
*
@@ -2718,6 +3382,55 @@ export namespace appengine_v1 {
/**
* appengine.apps.domainMappings.get
* @desc Gets the specified domain mapping.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.domainMappings.get({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * domainMappingsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "resourceRecords": [],
+ * // "sslSettings": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.domainMappings.get
* @memberOf! ()
*
@@ -2792,6 +3505,55 @@ export namespace appengine_v1 {
/**
* appengine.apps.domainMappings.list
* @desc Lists the domain mappings on an application.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.domainMappings.list({
+ * // Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * // Maximum results to return per page.
+ * pageSize: 'placeholder-value',
+ * // Continuation token for fetching the next page of results.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "domainMappings": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.domainMappings.list
* @memberOf! ()
*
@@ -2875,6 +3637,65 @@ export namespace appengine_v1 {
/**
* appengine.apps.domainMappings.patch
* @desc Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.domainMappings.patch({
+ * // Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * domainMappingsId: 'placeholder-value',
+ * // Standard field mask for the set of fields to be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "resourceRecords": [],
+ * // "sslSettings": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.domainMappings.patch
* @memberOf! ()
*
@@ -3066,6 +3887,54 @@ export namespace appengine_v1 {
/**
* appengine.apps.firewall.ingressRules.batchUpdate
* @desc Replaces the entire firewall ruleset in one bulk operation. This overrides and replaces the rules of an existing firewall with the new rules.If the final rule does not match traffic with the '*' wildcard IP range, then an "allow all" rule is explicitly added to the end of the list.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.firewall.ingressRules.batchUpdate({
+ * // Part of `name`. Name of the Firewall collection to set. Example: apps/myapp/firewall/ingressRules.
+ * appsId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "ingressRules": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "ingressRules": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.firewall.ingressRules.batchUpdate
* @memberOf! ()
*
@@ -3149,6 +4018,60 @@ export namespace appengine_v1 {
/**
* appengine.apps.firewall.ingressRules.create
* @desc Creates a firewall rule for the application.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.firewall.ingressRules.create({
+ * // Part of `parent`. Name of the parent Firewall collection in which to create a new rule. Example: apps/myapp/firewall/ingressRules.
+ * appsId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "priority": 0,
+ * // "sourceRange": "my_sourceRange"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "priority": 0,
+ * // "sourceRange": "my_sourceRange"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.firewall.ingressRules.create
* @memberOf! ()
*
@@ -3224,6 +4147,46 @@ export namespace appengine_v1 {
/**
* appengine.apps.firewall.ingressRules.delete
* @desc Deletes the specified firewall rule.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.firewall.ingressRules.delete({
+ * // Part of `name`. Name of the Firewall resource to delete. Example: apps/myapp/firewall/ingressRules/100.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * ingressRulesId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.firewall.ingressRules.delete
* @memberOf! ()
*
@@ -3297,6 +4260,55 @@ export namespace appengine_v1 {
/**
* appengine.apps.firewall.ingressRules.get
* @desc Gets the specified firewall rule.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.firewall.ingressRules.get({
+ * // Part of `name`. Name of the Firewall resource to retrieve. Example: apps/myapp/firewall/ingressRules/100.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * ingressRulesId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "priority": 0,
+ * // "sourceRange": "my_sourceRange"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.firewall.ingressRules.get
* @memberOf! ()
*
@@ -3372,6 +4384,57 @@ export namespace appengine_v1 {
/**
* appengine.apps.firewall.ingressRules.list
* @desc Lists the firewall rules of an application.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.firewall.ingressRules.list({
+ * // Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules.
+ * appsId: 'placeholder-value',
+ * // A valid IP Address. If set, only rules matching this address will be returned. The first returned rule will be the rule that fires on requests from this IP.
+ * matchingAddress: 'placeholder-value',
+ * // Maximum results to return per page.
+ * pageSize: 'placeholder-value',
+ * // Continuation token for fetching the next page of results.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "ingressRules": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.firewall.ingressRules.list
* @memberOf! ()
*
@@ -3451,6 +4514,64 @@ export namespace appengine_v1 {
/**
* appengine.apps.firewall.ingressRules.patch
* @desc Updates the specified firewall rule.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.firewall.ingressRules.patch({
+ * // Part of `name`. Name of the Firewall resource to update. Example: apps/myapp/firewall/ingressRules/100.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * ingressRulesId: 'placeholder-value',
+ * // Standard field mask for the set of fields to be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "priority": 0,
+ * // "sourceRange": "my_sourceRange"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "priority": 0,
+ * // "sourceRange": "my_sourceRange"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.firewall.ingressRules.patch
* @memberOf! ()
*
@@ -3651,6 +4772,56 @@ export namespace appengine_v1 {
/**
* appengine.apps.locations.get
* @desc Gets information about a location.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.locations.get({
+ * // Part of `name`. Resource name for the location.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * locationsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "labels": {},
+ * // "locationId": "my_locationId",
+ * // "metadata": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.locations.get
* @memberOf! ()
*
@@ -3723,6 +4894,57 @@ export namespace appengine_v1 {
/**
* appengine.apps.locations.list
* @desc Lists information about the supported locations for this service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.locations.list({
+ * // Part of `name`. The resource that owns the locations collection, if applicable.
+ * appsId: 'placeholder-value',
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "locations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.locations.list
* @memberOf! ()
*
@@ -3850,6 +5072,56 @@ export namespace appengine_v1 {
/**
* appengine.apps.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.operations.get({
+ * // Part of `name`. The name of the operation resource.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * operationsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.operations.get
* @memberOf! ()
*
@@ -3924,6 +5196,57 @@ export namespace appengine_v1 {
/**
* appengine.apps.operations.list
* @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/x/operations. To override the binding, API services can add a binding such as "/v1/{name=users/x}/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.operations.list({
+ * // Part of `name`. The name of the operation's parent resource.
+ * appsId: 'placeholder-value',
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.operations.list
* @memberOf! ()
*
@@ -4053,6 +5376,52 @@ export namespace appengine_v1 {
/**
* appengine.apps.services.delete
* @desc Deletes the specified service and all enclosed versions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.delete({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.delete
* @memberOf! ()
*
@@ -4128,6 +5497,54 @@ export namespace appengine_v1 {
/**
* appengine.apps.services.get
* @desc Gets the current configuration of the specified service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.get({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "split": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.get
* @memberOf! ()
*
@@ -4201,6 +5618,55 @@ export namespace appengine_v1 {
/**
* appengine.apps.services.list
* @desc Lists all the services in the application.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.list({
+ * // Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * // Maximum results to return per page.
+ * pageSize: 'placeholder-value',
+ * // Continuation token for fetching the next page of results.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "services": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.list
* @memberOf! ()
*
@@ -4279,6 +5745,66 @@ export namespace appengine_v1 {
/**
* appengine.apps.services.patch
* @desc Updates the configuration of the specified service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.patch({
+ * // Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.
+ * appsId: 'placeholder-value',
+ * // Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).
+ * migrateTraffic: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Standard field mask for the set of fields to be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "split": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.patch
* @memberOf! ()
*
@@ -4450,6 +5976,96 @@ export namespace appengine_v1 {
/**
* appengine.apps.services.versions.create
* @desc Deploys code and resource files to a new version.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.create({
+ * // Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.
+ * appsId: 'placeholder-value',
+ * // Part of `parent`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "apiConfig": {},
+ * // "automaticScaling": {},
+ * // "basicScaling": {},
+ * // "betaSettings": {},
+ * // "createTime": "my_createTime",
+ * // "createdBy": "my_createdBy",
+ * // "defaultExpiration": "my_defaultExpiration",
+ * // "deployment": {},
+ * // "diskUsageBytes": "my_diskUsageBytes",
+ * // "endpointsApiService": {},
+ * // "entrypoint": {},
+ * // "env": "my_env",
+ * // "envVariables": {},
+ * // "errorHandlers": [],
+ * // "handlers": [],
+ * // "healthCheck": {},
+ * // "id": "my_id",
+ * // "inboundServices": [],
+ * // "instanceClass": "my_instanceClass",
+ * // "libraries": [],
+ * // "livenessCheck": {},
+ * // "manualScaling": {},
+ * // "name": "my_name",
+ * // "network": {},
+ * // "nobuildFilesRegex": "my_nobuildFilesRegex",
+ * // "readinessCheck": {},
+ * // "resources": {},
+ * // "runtime": "my_runtime",
+ * // "runtimeApiVersion": "my_runtimeApiVersion",
+ * // "runtimeChannel": "my_runtimeChannel",
+ * // "runtimeMainExecutablePath": "my_runtimeMainExecutablePath",
+ * // "servingStatus": "my_servingStatus",
+ * // "threadsafe": false,
+ * // "versionUrl": "my_versionUrl",
+ * // "vm": false,
+ * // "vpcAccessConnector": {},
+ * // "zones": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.create
* @memberOf! ()
*
@@ -4525,6 +6141,54 @@ export namespace appengine_v1 {
/**
* appengine.apps.services.versions.delete
* @desc Deletes an existing Version resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.delete({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * versionsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.delete
* @memberOf! ()
*
@@ -4601,6 +6265,92 @@ export namespace appengine_v1 {
/**
* appengine.apps.services.versions.get
* @desc Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.get({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * versionsId: 'placeholder-value',
+ * // Controls the set of fields returned in the Get response.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "apiConfig": {},
+ * // "automaticScaling": {},
+ * // "basicScaling": {},
+ * // "betaSettings": {},
+ * // "createTime": "my_createTime",
+ * // "createdBy": "my_createdBy",
+ * // "defaultExpiration": "my_defaultExpiration",
+ * // "deployment": {},
+ * // "diskUsageBytes": "my_diskUsageBytes",
+ * // "endpointsApiService": {},
+ * // "entrypoint": {},
+ * // "env": "my_env",
+ * // "envVariables": {},
+ * // "errorHandlers": [],
+ * // "handlers": [],
+ * // "healthCheck": {},
+ * // "id": "my_id",
+ * // "inboundServices": [],
+ * // "instanceClass": "my_instanceClass",
+ * // "libraries": [],
+ * // "livenessCheck": {},
+ * // "manualScaling": {},
+ * // "name": "my_name",
+ * // "network": {},
+ * // "nobuildFilesRegex": "my_nobuildFilesRegex",
+ * // "readinessCheck": {},
+ * // "resources": {},
+ * // "runtime": "my_runtime",
+ * // "runtimeApiVersion": "my_runtimeApiVersion",
+ * // "runtimeChannel": "my_runtimeChannel",
+ * // "runtimeMainExecutablePath": "my_runtimeMainExecutablePath",
+ * // "servingStatus": "my_servingStatus",
+ * // "threadsafe": false,
+ * // "versionUrl": "my_versionUrl",
+ * // "vm": false,
+ * // "vpcAccessConnector": {},
+ * // "zones": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.get
* @memberOf! ()
*
@@ -4676,6 +6426,59 @@ export namespace appengine_v1 {
/**
* appengine.apps.services.versions.list
* @desc Lists the versions of a service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.list({
+ * // Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default.
+ * appsId: 'placeholder-value',
+ * // Maximum results to return per page.
+ * pageSize: 'placeholder-value',
+ * // Continuation token for fetching the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Part of `parent`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Controls the set of fields returned in the List response.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "versions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.list
* @memberOf! ()
*
@@ -4755,6 +6558,100 @@ export namespace appengine_v1 {
/**
* appengine.apps.services.versions.patch
* @desc Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:Standard environment instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class)automatic scaling in the standard environment: automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) automaticScaling.standard_scheduler_settings.max_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) automaticScaling.standard_scheduler_settings.min_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) automaticScaling.standard_scheduler_settings.target_cpu_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) automaticScaling.standard_scheduler_settings.target_throughput_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)basic scaling or manual scaling in the standard environment: serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)Flexible environment serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)automatic scaling in the flexible environment: automatic_scaling.min_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) automatic_scaling.max_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) automatic_scaling.cool_down_period_sec (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) automatic_scaling.cpu_utilization.target_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.patch({
+ * // Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Standard field mask for the set of fields to be updated.
+ * updateMask: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * versionsId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "apiConfig": {},
+ * // "automaticScaling": {},
+ * // "basicScaling": {},
+ * // "betaSettings": {},
+ * // "createTime": "my_createTime",
+ * // "createdBy": "my_createdBy",
+ * // "defaultExpiration": "my_defaultExpiration",
+ * // "deployment": {},
+ * // "diskUsageBytes": "my_diskUsageBytes",
+ * // "endpointsApiService": {},
+ * // "entrypoint": {},
+ * // "env": "my_env",
+ * // "envVariables": {},
+ * // "errorHandlers": [],
+ * // "handlers": [],
+ * // "healthCheck": {},
+ * // "id": "my_id",
+ * // "inboundServices": [],
+ * // "instanceClass": "my_instanceClass",
+ * // "libraries": [],
+ * // "livenessCheck": {},
+ * // "manualScaling": {},
+ * // "name": "my_name",
+ * // "network": {},
+ * // "nobuildFilesRegex": "my_nobuildFilesRegex",
+ * // "readinessCheck": {},
+ * // "resources": {},
+ * // "runtime": "my_runtime",
+ * // "runtimeApiVersion": "my_runtimeApiVersion",
+ * // "runtimeChannel": "my_runtimeChannel",
+ * // "runtimeMainExecutablePath": "my_runtimeMainExecutablePath",
+ * // "servingStatus": "my_servingStatus",
+ * // "threadsafe": false,
+ * // "versionUrl": "my_versionUrl",
+ * // "vm": false,
+ * // "vpcAccessConnector": {},
+ * // "zones": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.patch
* @memberOf! ()
*
@@ -4963,6 +6860,64 @@ export namespace appengine_v1 {
/**
* appengine.apps.services.versions.instances.debug
* @desc Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in "debug mode", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.instances.debug({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * instancesId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * versionsId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sshKey": "my_sshKey"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.instances.debug
* @memberOf! ()
*
@@ -5041,6 +6996,56 @@ export namespace appengine_v1 {
/**
* appengine.apps.services.versions.instances.delete
* @desc Stops a running instance.The instance might be automatically recreated based on the scaling settings of the version. For more information, see "How Instances are Managed" (standard environment (https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) | flexible environment (https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)).To ensure that instances are not re-created and avoid getting billed, you can stop all instances within the target version by changing the serving status of the version to STOPPED with the apps.services.versions.patch (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch) method.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.instances.delete({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * instancesId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * versionsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.instances.delete
* @memberOf! ()
*
@@ -5118,6 +7123,71 @@ export namespace appengine_v1 {
/**
* appengine.apps.services.versions.instances.get
* @desc Gets instance information.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.instances.get({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * instancesId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * versionsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineRelease": "my_appEngineRelease",
+ * // "availability": "my_availability",
+ * // "averageLatency": 0,
+ * // "errors": 0,
+ * // "id": "my_id",
+ * // "memoryUsage": "my_memoryUsage",
+ * // "name": "my_name",
+ * // "qps": {},
+ * // "requests": 0,
+ * // "startTime": "my_startTime",
+ * // "vmDebugEnabled": false,
+ * // "vmId": "my_vmId",
+ * // "vmIp": "my_vmIp",
+ * // "vmName": "my_vmName",
+ * // "vmStatus": "my_vmStatus",
+ * // "vmZoneName": "my_vmZoneName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.instances.get
* @memberOf! ()
*
@@ -5193,6 +7263,59 @@ export namespace appengine_v1 {
/**
* appengine.apps.services.versions.instances.list
* @desc Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.instances.list({
+ * // Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.
+ * appsId: 'placeholder-value',
+ * // Maximum results to return per page.
+ * pageSize: 'placeholder-value',
+ * // Continuation token for fetching the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Part of `parent`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Part of `parent`. See documentation of `appsId`.
+ * versionsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "instances": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.instances.list
* @memberOf! ()
*
diff --git a/src/apis/appengine/v1alpha.ts b/src/apis/appengine/v1alpha.ts
index 7bfbca0ff61..9dc78c530f4 100644
--- a/src/apis/appengine/v1alpha.ts
+++ b/src/apis/appengine/v1alpha.ts
@@ -553,6 +553,70 @@ export namespace appengine_v1alpha {
/**
* appengine.apps.authorizedCertificates.create
* @desc Uploads the specified SSL certificate.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedCertificates.create({
+ * // Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "certificateRawData": {},
+ * // "displayName": "my_displayName",
+ * // "domainMappingsCount": 0,
+ * // "domainNames": [],
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "managedCertificate": {},
+ * // "name": "my_name",
+ * // "visibleDomainMappings": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificateRawData": {},
+ * // "displayName": "my_displayName",
+ * // "domainMappingsCount": 0,
+ * // "domainNames": [],
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "managedCertificate": {},
+ * // "name": "my_name",
+ * // "visibleDomainMappings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedCertificates.create
* @memberOf! ()
*
@@ -629,6 +693,46 @@ export namespace appengine_v1alpha {
/**
* appengine.apps.authorizedCertificates.delete
* @desc Deletes the specified SSL certificate.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedCertificates.delete({
+ * // Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * authorizedCertificatesId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedCertificates.delete
* @memberOf! ()
*
@@ -702,6 +806,62 @@ export namespace appengine_v1alpha {
/**
* appengine.apps.authorizedCertificates.get
* @desc Gets the specified SSL certificate.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedCertificates.get({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * authorizedCertificatesId: 'placeholder-value',
+ * // Controls the set of fields returned in the GET response.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificateRawData": {},
+ * // "displayName": "my_displayName",
+ * // "domainMappingsCount": 0,
+ * // "domainNames": [],
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "managedCertificate": {},
+ * // "name": "my_name",
+ * // "visibleDomainMappings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedCertificates.get
* @memberOf! ()
*
@@ -780,6 +940,57 @@ export namespace appengine_v1alpha {
/**
* appengine.apps.authorizedCertificates.list
* @desc Lists all SSL certificates the user is authorized to administer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedCertificates.list({
+ * // Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * // Maximum results to return per page.
+ * pageSize: 'placeholder-value',
+ * // Continuation token for fetching the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Controls the set of fields returned in the LIST response.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificates": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedCertificates.list
* @memberOf! ()
*
@@ -865,6 +1076,74 @@ export namespace appengine_v1alpha {
/**
* appengine.apps.authorizedCertificates.patch
* @desc Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedCertificates.patch({
+ * // Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * authorizedCertificatesId: 'placeholder-value',
+ * // Standard field mask for the set of fields to be updated. Updates are only supported on the certificate_raw_data and display_name fields.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "certificateRawData": {},
+ * // "displayName": "my_displayName",
+ * // "domainMappingsCount": 0,
+ * // "domainNames": [],
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "managedCertificate": {},
+ * // "name": "my_name",
+ * // "visibleDomainMappings": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificateRawData": {},
+ * // "displayName": "my_displayName",
+ * // "domainMappingsCount": 0,
+ * // "domainNames": [],
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "managedCertificate": {},
+ * // "name": "my_name",
+ * // "visibleDomainMappings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedCertificates.patch
* @memberOf! ()
*
@@ -1054,6 +1333,55 @@ export namespace appengine_v1alpha {
/**
* appengine.apps.authorizedDomains.list
* @desc Lists all domains the user is authorized to administer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedDomains.list({
+ * // Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * // Maximum results to return per page.
+ * pageSize: 'placeholder-value',
+ * // Continuation token for fetching the next page of results.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "domains": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedDomains.list
* @memberOf! ()
*
@@ -1167,6 +1495,65 @@ export namespace appengine_v1alpha {
/**
* appengine.apps.domainMappings.create
* @desc Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.domainMappings.create({
+ * // Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * // Whether a managed certificate should be provided by App Engine. If true, a certificate ID must be manaually set in the DomainMapping resource to configure SSL for this domain. If false, a managed certificate will be provisioned and a certificate ID will be automatically populated.
+ * noManagedCertificate: 'placeholder-value',
+ * // Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.
+ * overrideStrategy: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "resourceRecords": [],
+ * // "sslSettings": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.domainMappings.create
* @memberOf! ()
*
@@ -1244,6 +1631,52 @@ export namespace appengine_v1alpha {
/**
* appengine.apps.domainMappings.delete
* @desc Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.domainMappings.delete({
+ * // Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * domainMappingsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.domainMappings.delete
* @memberOf! ()
*
@@ -1319,6 +1752,55 @@ export namespace appengine_v1alpha {
/**
* appengine.apps.domainMappings.get
* @desc Gets the specified domain mapping.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.domainMappings.get({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * domainMappingsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "resourceRecords": [],
+ * // "sslSettings": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.domainMappings.get
* @memberOf! ()
*
@@ -1394,6 +1876,55 @@ export namespace appengine_v1alpha {
/**
* appengine.apps.domainMappings.list
* @desc Lists the domain mappings on an application.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.domainMappings.list({
+ * // Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * // Maximum results to return per page.
+ * pageSize: 'placeholder-value',
+ * // Continuation token for fetching the next page of results.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "domainMappings": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.domainMappings.list
* @memberOf! ()
*
@@ -1477,6 +2008,67 @@ export namespace appengine_v1alpha {
/**
* appengine.apps.domainMappings.patch
* @desc Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.domainMappings.patch({
+ * // Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * domainMappingsId: 'placeholder-value',
+ * // Whether a managed certificate should be provided by App Engine. If true, a certificate ID must be manually set in the DomainMapping resource to configure SSL for this domain. If false, a managed certificate will be provisioned and a certificate ID will be automatically populated. Only applicable if ssl_settings.certificate_id is specified in the update mask.
+ * noManagedCertificate: 'placeholder-value',
+ * // Standard field mask for the set of fields to be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "resourceRecords": [],
+ * // "sslSettings": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.domainMappings.patch
* @memberOf! ()
*
@@ -1669,6 +2261,56 @@ export namespace appengine_v1alpha {
/**
* appengine.apps.locations.get
* @desc Gets information about a location.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.locations.get({
+ * // Part of `name`. Resource name for the location.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * locationsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "labels": {},
+ * // "locationId": "my_locationId",
+ * // "metadata": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.locations.get
* @memberOf! ()
*
@@ -1741,6 +2383,57 @@ export namespace appengine_v1alpha {
/**
* appengine.apps.locations.list
* @desc Lists information about the supported locations for this service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.locations.list({
+ * // Part of `name`. The resource that owns the locations collection, if applicable.
+ * appsId: 'placeholder-value',
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "locations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.locations.list
* @memberOf! ()
*
@@ -1868,6 +2561,56 @@ export namespace appengine_v1alpha {
/**
* appengine.apps.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.operations.get({
+ * // Part of `name`. The name of the operation resource.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * operationsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.operations.get
* @memberOf! ()
*
@@ -1942,6 +2685,57 @@ export namespace appengine_v1alpha {
/**
* appengine.apps.operations.list
* @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/x/operations. To override the binding, API services can add a binding such as "/v1/{name=users/x}/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.operations.list({
+ * // Part of `name`. The name of the operation's parent resource.
+ * appsId: 'placeholder-value',
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.operations.list
* @memberOf! ()
*
diff --git a/src/apis/appengine/v1beta.ts b/src/apis/appengine/v1beta.ts
index dbdecd672d6..d20ee220778 100644
--- a/src/apis/appengine/v1beta.ts
+++ b/src/apis/appengine/v1beta.ts
@@ -1642,6 +1642,67 @@ export namespace appengine_v1beta {
/**
* appengine.apps.create
* @desc Creates an App Engine application for a Google Cloud Platform project. Required fields: id - The ID of the target Cloud Platform project. location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/standard/python/console/).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.create({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "authDomain": "my_authDomain",
+ * // "codeBucket": "my_codeBucket",
+ * // "defaultBucket": "my_defaultBucket",
+ * // "defaultCookieExpiration": "my_defaultCookieExpiration",
+ * // "defaultHostname": "my_defaultHostname",
+ * // "dispatchRules": [],
+ * // "featureSettings": {},
+ * // "gcrDomain": "my_gcrDomain",
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "locationId": "my_locationId",
+ * // "name": "my_name",
+ * // "servingStatus": "my_servingStatus"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.create
* @memberOf! ()
*
@@ -1712,6 +1773,62 @@ export namespace appengine_v1beta {
/**
* appengine.apps.get
* @desc Gets information about an application.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.get({
+ * // Part of `name`. Name of the Application resource to get. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "authDomain": "my_authDomain",
+ * // "codeBucket": "my_codeBucket",
+ * // "defaultBucket": "my_defaultBucket",
+ * // "defaultCookieExpiration": "my_defaultCookieExpiration",
+ * // "defaultHostname": "my_defaultHostname",
+ * // "dispatchRules": [],
+ * // "featureSettings": {},
+ * // "gcrDomain": "my_gcrDomain",
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "locationId": "my_locationId",
+ * // "name": "my_name",
+ * // "servingStatus": "my_servingStatus"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.get
* @memberOf! ()
*
@@ -1785,6 +1902,72 @@ export namespace appengine_v1beta {
/**
* appengine.apps.patch
* @desc Updates the specified Application resource. You can update the following fields: auth_domain - Google authentication domain for controlling user access to the application. default_cookie_expiration - Cookie expiration policy for the application.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.patch({
+ * // Part of `name`. Name of the Application resource to update. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * // Standard field mask for the set of fields to be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "authDomain": "my_authDomain",
+ * // "codeBucket": "my_codeBucket",
+ * // "defaultBucket": "my_defaultBucket",
+ * // "defaultCookieExpiration": "my_defaultCookieExpiration",
+ * // "defaultHostname": "my_defaultHostname",
+ * // "dispatchRules": [],
+ * // "featureSettings": {},
+ * // "gcrDomain": "my_gcrDomain",
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "locationId": "my_locationId",
+ * // "name": "my_name",
+ * // "servingStatus": "my_servingStatus"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.patch
* @memberOf! ()
*
@@ -1860,6 +2043,56 @@ export namespace appengine_v1beta {
/**
* appengine.apps.repair
* @desc Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account. If you have deleted your App Engine service account, this will not be able to recreate it. Instead, you should attempt to use the IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . If the deletion was recent, the numeric ID can be found in the Cloud Console Activity Log.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.repair({
+ * // Part of `name`. Name of the application to repair. Example: apps/myapp
+ * appsId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.repair
* @memberOf! ()
*
@@ -2000,6 +2233,70 @@ export namespace appengine_v1beta {
/**
* appengine.apps.authorizedCertificates.create
* @desc Uploads the specified SSL certificate.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedCertificates.create({
+ * // Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "certificateRawData": {},
+ * // "displayName": "my_displayName",
+ * // "domainMappingsCount": 0,
+ * // "domainNames": [],
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "managedCertificate": {},
+ * // "name": "my_name",
+ * // "visibleDomainMappings": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificateRawData": {},
+ * // "displayName": "my_displayName",
+ * // "domainMappingsCount": 0,
+ * // "domainNames": [],
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "managedCertificate": {},
+ * // "name": "my_name",
+ * // "visibleDomainMappings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedCertificates.create
* @memberOf! ()
*
@@ -2076,6 +2373,46 @@ export namespace appengine_v1beta {
/**
* appengine.apps.authorizedCertificates.delete
* @desc Deletes the specified SSL certificate.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedCertificates.delete({
+ * // Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * authorizedCertificatesId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedCertificates.delete
* @memberOf! ()
*
@@ -2149,6 +2486,62 @@ export namespace appengine_v1beta {
/**
* appengine.apps.authorizedCertificates.get
* @desc Gets the specified SSL certificate.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedCertificates.get({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * authorizedCertificatesId: 'placeholder-value',
+ * // Controls the set of fields returned in the GET response.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificateRawData": {},
+ * // "displayName": "my_displayName",
+ * // "domainMappingsCount": 0,
+ * // "domainNames": [],
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "managedCertificate": {},
+ * // "name": "my_name",
+ * // "visibleDomainMappings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedCertificates.get
* @memberOf! ()
*
@@ -2227,6 +2620,57 @@ export namespace appengine_v1beta {
/**
* appengine.apps.authorizedCertificates.list
* @desc Lists all SSL certificates the user is authorized to administer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedCertificates.list({
+ * // Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * // Maximum results to return per page.
+ * pageSize: 'placeholder-value',
+ * // Continuation token for fetching the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Controls the set of fields returned in the LIST response.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificates": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedCertificates.list
* @memberOf! ()
*
@@ -2312,6 +2756,74 @@ export namespace appengine_v1beta {
/**
* appengine.apps.authorizedCertificates.patch
* @desc Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedCertificates.patch({
+ * // Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * authorizedCertificatesId: 'placeholder-value',
+ * // Standard field mask for the set of fields to be updated. Updates are only supported on the certificate_raw_data and display_name fields.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "certificateRawData": {},
+ * // "displayName": "my_displayName",
+ * // "domainMappingsCount": 0,
+ * // "domainNames": [],
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "managedCertificate": {},
+ * // "name": "my_name",
+ * // "visibleDomainMappings": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificateRawData": {},
+ * // "displayName": "my_displayName",
+ * // "domainMappingsCount": 0,
+ * // "domainNames": [],
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "managedCertificate": {},
+ * // "name": "my_name",
+ * // "visibleDomainMappings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedCertificates.patch
* @memberOf! ()
*
@@ -2501,6 +3013,55 @@ export namespace appengine_v1beta {
/**
* appengine.apps.authorizedDomains.list
* @desc Lists all domains the user is authorized to administer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.authorizedDomains.list({
+ * // Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * // Maximum results to return per page.
+ * pageSize: 'placeholder-value',
+ * // Continuation token for fetching the next page of results.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "domains": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.authorizedDomains.list
* @memberOf! ()
*
@@ -2614,6 +3175,63 @@ export namespace appengine_v1beta {
/**
* appengine.apps.domainMappings.create
* @desc Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.domainMappings.create({
+ * // Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * // Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.
+ * overrideStrategy: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "resourceRecords": [],
+ * // "sslSettings": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.domainMappings.create
* @memberOf! ()
*
@@ -2690,6 +3308,52 @@ export namespace appengine_v1beta {
/**
* appengine.apps.domainMappings.delete
* @desc Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.domainMappings.delete({
+ * // Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * domainMappingsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.domainMappings.delete
* @memberOf! ()
*
@@ -2765,6 +3429,55 @@ export namespace appengine_v1beta {
/**
* appengine.apps.domainMappings.get
* @desc Gets the specified domain mapping.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.domainMappings.get({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * domainMappingsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "resourceRecords": [],
+ * // "sslSettings": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.domainMappings.get
* @memberOf! ()
*
@@ -2840,6 +3553,55 @@ export namespace appengine_v1beta {
/**
* appengine.apps.domainMappings.list
* @desc Lists the domain mappings on an application.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.domainMappings.list({
+ * // Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * // Maximum results to return per page.
+ * pageSize: 'placeholder-value',
+ * // Continuation token for fetching the next page of results.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "domainMappings": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.domainMappings.list
* @memberOf! ()
*
@@ -2923,6 +3685,65 @@ export namespace appengine_v1beta {
/**
* appengine.apps.domainMappings.patch
* @desc Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.domainMappings.patch({
+ * // Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * domainMappingsId: 'placeholder-value',
+ * // Standard field mask for the set of fields to be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "resourceRecords": [],
+ * // "sslSettings": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.domainMappings.patch
* @memberOf! ()
*
@@ -3115,6 +3936,54 @@ export namespace appengine_v1beta {
/**
* appengine.apps.firewall.ingressRules.batchUpdate
* @desc Replaces the entire firewall ruleset in one bulk operation. This overrides and replaces the rules of an existing firewall with the new rules.If the final rule does not match traffic with the '*' wildcard IP range, then an "allow all" rule is explicitly added to the end of the list.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.firewall.ingressRules.batchUpdate({
+ * // Part of `name`. Name of the Firewall collection to set. Example: apps/myapp/firewall/ingressRules.
+ * appsId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "ingressRules": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "ingressRules": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.firewall.ingressRules.batchUpdate
* @memberOf! ()
*
@@ -3199,6 +4068,60 @@ export namespace appengine_v1beta {
/**
* appengine.apps.firewall.ingressRules.create
* @desc Creates a firewall rule for the application.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.firewall.ingressRules.create({
+ * // Part of `parent`. Name of the parent Firewall collection in which to create a new rule. Example: apps/myapp/firewall/ingressRules.
+ * appsId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "priority": 0,
+ * // "sourceRange": "my_sourceRange"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "priority": 0,
+ * // "sourceRange": "my_sourceRange"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.firewall.ingressRules.create
* @memberOf! ()
*
@@ -3273,6 +4196,46 @@ export namespace appengine_v1beta {
/**
* appengine.apps.firewall.ingressRules.delete
* @desc Deletes the specified firewall rule.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.firewall.ingressRules.delete({
+ * // Part of `name`. Name of the Firewall resource to delete. Example: apps/myapp/firewall/ingressRules/100.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * ingressRulesId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.firewall.ingressRules.delete
* @memberOf! ()
*
@@ -3346,6 +4309,55 @@ export namespace appengine_v1beta {
/**
* appengine.apps.firewall.ingressRules.get
* @desc Gets the specified firewall rule.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.firewall.ingressRules.get({
+ * // Part of `name`. Name of the Firewall resource to retrieve. Example: apps/myapp/firewall/ingressRules/100.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * ingressRulesId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "priority": 0,
+ * // "sourceRange": "my_sourceRange"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.firewall.ingressRules.get
* @memberOf! ()
*
@@ -3421,6 +4433,57 @@ export namespace appengine_v1beta {
/**
* appengine.apps.firewall.ingressRules.list
* @desc Lists the firewall rules of an application.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.firewall.ingressRules.list({
+ * // Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules.
+ * appsId: 'placeholder-value',
+ * // A valid IP Address. If set, only rules matching this address will be returned. The first returned rule will be the rule that fires on requests from this IP.
+ * matchingAddress: 'placeholder-value',
+ * // Maximum results to return per page.
+ * pageSize: 'placeholder-value',
+ * // Continuation token for fetching the next page of results.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "ingressRules": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.firewall.ingressRules.list
* @memberOf! ()
*
@@ -3499,6 +4562,64 @@ export namespace appengine_v1beta {
/**
* appengine.apps.firewall.ingressRules.patch
* @desc Updates the specified firewall rule.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.firewall.ingressRules.patch({
+ * // Part of `name`. Name of the Firewall resource to update. Example: apps/myapp/firewall/ingressRules/100.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * ingressRulesId: 'placeholder-value',
+ * // Standard field mask for the set of fields to be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "priority": 0,
+ * // "sourceRange": "my_sourceRange"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "priority": 0,
+ * // "sourceRange": "my_sourceRange"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.firewall.ingressRules.patch
* @memberOf! ()
*
@@ -3699,6 +4820,56 @@ export namespace appengine_v1beta {
/**
* appengine.apps.locations.get
* @desc Gets information about a location.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.locations.get({
+ * // Part of `name`. Resource name for the location.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * locationsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "labels": {},
+ * // "locationId": "my_locationId",
+ * // "metadata": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.locations.get
* @memberOf! ()
*
@@ -3771,6 +4942,57 @@ export namespace appengine_v1beta {
/**
* appengine.apps.locations.list
* @desc Lists information about the supported locations for this service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.locations.list({
+ * // Part of `name`. The resource that owns the locations collection, if applicable.
+ * appsId: 'placeholder-value',
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "locations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.locations.list
* @memberOf! ()
*
@@ -3898,6 +5120,56 @@ export namespace appengine_v1beta {
/**
* appengine.apps.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.operations.get({
+ * // Part of `name`. The name of the operation resource.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * operationsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.operations.get
* @memberOf! ()
*
@@ -3972,6 +5244,57 @@ export namespace appengine_v1beta {
/**
* appengine.apps.operations.list
* @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/x/operations. To override the binding, API services can add a binding such as "/v1/{name=users/x}/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.operations.list({
+ * // Part of `name`. The name of the operation's parent resource.
+ * appsId: 'placeholder-value',
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.operations.list
* @memberOf! ()
*
@@ -4101,6 +5424,52 @@ export namespace appengine_v1beta {
/**
* appengine.apps.services.delete
* @desc Deletes the specified service and all enclosed versions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.delete({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.delete
* @memberOf! ()
*
@@ -4175,6 +5544,54 @@ export namespace appengine_v1beta {
/**
* appengine.apps.services.get
* @desc Gets the current configuration of the specified service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.get({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "split": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.get
* @memberOf! ()
*
@@ -4247,6 +5664,55 @@ export namespace appengine_v1beta {
/**
* appengine.apps.services.list
* @desc Lists all the services in the application.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.list({
+ * // Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
+ * appsId: 'placeholder-value',
+ * // Maximum results to return per page.
+ * pageSize: 'placeholder-value',
+ * // Continuation token for fetching the next page of results.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "services": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.list
* @memberOf! ()
*
@@ -4325,6 +5791,66 @@ export namespace appengine_v1beta {
/**
* appengine.apps.services.patch
* @desc Updates the configuration of the specified service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.patch({
+ * // Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.
+ * appsId: 'placeholder-value',
+ * // Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#InboundServiceType) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#AutomaticScaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services#ShardBy) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).
+ * migrateTraffic: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Standard field mask for the set of fields to be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "split": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.patch
* @memberOf! ()
*
@@ -4495,6 +6021,96 @@ export namespace appengine_v1beta {
/**
* appengine.apps.services.versions.create
* @desc Deploys code and resource files to a new version.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.create({
+ * // Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.
+ * appsId: 'placeholder-value',
+ * // Part of `parent`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "apiConfig": {},
+ * // "automaticScaling": {},
+ * // "basicScaling": {},
+ * // "betaSettings": {},
+ * // "createTime": "my_createTime",
+ * // "createdBy": "my_createdBy",
+ * // "defaultExpiration": "my_defaultExpiration",
+ * // "deployment": {},
+ * // "diskUsageBytes": "my_diskUsageBytes",
+ * // "endpointsApiService": {},
+ * // "entrypoint": {},
+ * // "env": "my_env",
+ * // "envVariables": {},
+ * // "errorHandlers": [],
+ * // "handlers": [],
+ * // "healthCheck": {},
+ * // "id": "my_id",
+ * // "inboundServices": [],
+ * // "instanceClass": "my_instanceClass",
+ * // "libraries": [],
+ * // "livenessCheck": {},
+ * // "manualScaling": {},
+ * // "name": "my_name",
+ * // "network": {},
+ * // "nobuildFilesRegex": "my_nobuildFilesRegex",
+ * // "readinessCheck": {},
+ * // "resources": {},
+ * // "runtime": "my_runtime",
+ * // "runtimeApiVersion": "my_runtimeApiVersion",
+ * // "runtimeChannel": "my_runtimeChannel",
+ * // "runtimeMainExecutablePath": "my_runtimeMainExecutablePath",
+ * // "servingStatus": "my_servingStatus",
+ * // "threadsafe": false,
+ * // "versionUrl": "my_versionUrl",
+ * // "vm": false,
+ * // "vpcAccessConnector": {},
+ * // "zones": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.create
* @memberOf! ()
*
@@ -4570,6 +6186,54 @@ export namespace appengine_v1beta {
/**
* appengine.apps.services.versions.delete
* @desc Deletes an existing Version resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.delete({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * versionsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.delete
* @memberOf! ()
*
@@ -4646,6 +6310,92 @@ export namespace appengine_v1beta {
/**
* appengine.apps.services.versions.get
* @desc Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.get({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * versionsId: 'placeholder-value',
+ * // Controls the set of fields returned in the Get response.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "apiConfig": {},
+ * // "automaticScaling": {},
+ * // "basicScaling": {},
+ * // "betaSettings": {},
+ * // "createTime": "my_createTime",
+ * // "createdBy": "my_createdBy",
+ * // "defaultExpiration": "my_defaultExpiration",
+ * // "deployment": {},
+ * // "diskUsageBytes": "my_diskUsageBytes",
+ * // "endpointsApiService": {},
+ * // "entrypoint": {},
+ * // "env": "my_env",
+ * // "envVariables": {},
+ * // "errorHandlers": [],
+ * // "handlers": [],
+ * // "healthCheck": {},
+ * // "id": "my_id",
+ * // "inboundServices": [],
+ * // "instanceClass": "my_instanceClass",
+ * // "libraries": [],
+ * // "livenessCheck": {},
+ * // "manualScaling": {},
+ * // "name": "my_name",
+ * // "network": {},
+ * // "nobuildFilesRegex": "my_nobuildFilesRegex",
+ * // "readinessCheck": {},
+ * // "resources": {},
+ * // "runtime": "my_runtime",
+ * // "runtimeApiVersion": "my_runtimeApiVersion",
+ * // "runtimeChannel": "my_runtimeChannel",
+ * // "runtimeMainExecutablePath": "my_runtimeMainExecutablePath",
+ * // "servingStatus": "my_servingStatus",
+ * // "threadsafe": false,
+ * // "versionUrl": "my_versionUrl",
+ * // "vm": false,
+ * // "vpcAccessConnector": {},
+ * // "zones": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.get
* @memberOf! ()
*
@@ -4721,6 +6471,59 @@ export namespace appengine_v1beta {
/**
* appengine.apps.services.versions.list
* @desc Lists the versions of a service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.list({
+ * // Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default.
+ * appsId: 'placeholder-value',
+ * // Maximum results to return per page.
+ * pageSize: 'placeholder-value',
+ * // Continuation token for fetching the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Part of `parent`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Controls the set of fields returned in the List response.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "versions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.list
* @memberOf! ()
*
@@ -4800,6 +6603,100 @@ export namespace appengine_v1beta {
/**
* appengine.apps.services.versions.patch
* @desc Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:Standard environment instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.instance_class)automatic scaling in the standard environment: automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling) automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling) automaticScaling.standard_scheduler_settings.max_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StandardSchedulerSettings) automaticScaling.standard_scheduler_settings.min_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StandardSchedulerSettings) automaticScaling.standard_scheduler_settings.target_cpu_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StandardSchedulerSettings) automaticScaling.standard_scheduler_settings.target_throughput_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StandardSchedulerSettings)basic scaling or manual scaling in the standard environment: serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.serving_status)Flexible environment serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.serving_status)automatic scaling in the flexible environment: automatic_scaling.min_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling) automatic_scaling.max_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling) automatic_scaling.cool_down_period_sec (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling) automatic_scaling.cpu_utilization.target_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.patch({
+ * // Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Standard field mask for the set of fields to be updated.
+ * updateMask: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * versionsId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "apiConfig": {},
+ * // "automaticScaling": {},
+ * // "basicScaling": {},
+ * // "betaSettings": {},
+ * // "createTime": "my_createTime",
+ * // "createdBy": "my_createdBy",
+ * // "defaultExpiration": "my_defaultExpiration",
+ * // "deployment": {},
+ * // "diskUsageBytes": "my_diskUsageBytes",
+ * // "endpointsApiService": {},
+ * // "entrypoint": {},
+ * // "env": "my_env",
+ * // "envVariables": {},
+ * // "errorHandlers": [],
+ * // "handlers": [],
+ * // "healthCheck": {},
+ * // "id": "my_id",
+ * // "inboundServices": [],
+ * // "instanceClass": "my_instanceClass",
+ * // "libraries": [],
+ * // "livenessCheck": {},
+ * // "manualScaling": {},
+ * // "name": "my_name",
+ * // "network": {},
+ * // "nobuildFilesRegex": "my_nobuildFilesRegex",
+ * // "readinessCheck": {},
+ * // "resources": {},
+ * // "runtime": "my_runtime",
+ * // "runtimeApiVersion": "my_runtimeApiVersion",
+ * // "runtimeChannel": "my_runtimeChannel",
+ * // "runtimeMainExecutablePath": "my_runtimeMainExecutablePath",
+ * // "servingStatus": "my_servingStatus",
+ * // "threadsafe": false,
+ * // "versionUrl": "my_versionUrl",
+ * // "vm": false,
+ * // "vpcAccessConnector": {},
+ * // "zones": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.patch
* @memberOf! ()
*
@@ -5008,6 +6905,64 @@ export namespace appengine_v1beta {
/**
* appengine.apps.services.versions.instances.debug
* @desc Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in "debug mode", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.instances.debug({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * instancesId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * versionsId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sshKey": "my_sshKey"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.instances.debug
* @memberOf! ()
*
@@ -5086,6 +7041,56 @@ export namespace appengine_v1beta {
/**
* appengine.apps.services.versions.instances.delete
* @desc Stops a running instance.The instance might be automatically recreated based on the scaling settings of the version. For more information, see "How Instances are Managed" (standard environment (https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) | flexible environment (https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)).To ensure that instances are not re-created and avoid getting billed, you can stop all instances within the target version by changing the serving status of the version to STOPPED with the apps.services.versions.patch (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch) method.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.instances.delete({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * instancesId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * versionsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.instances.delete
* @memberOf! ()
*
@@ -5163,6 +7168,71 @@ export namespace appengine_v1beta {
/**
* appengine.apps.services.versions.instances.get
* @desc Gets instance information.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.instances.get({
+ * // Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.
+ * appsId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * instancesId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Part of `name`. See documentation of `appsId`.
+ * versionsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineRelease": "my_appEngineRelease",
+ * // "availability": "my_availability",
+ * // "averageLatency": 0,
+ * // "errors": 0,
+ * // "id": "my_id",
+ * // "memoryUsage": "my_memoryUsage",
+ * // "name": "my_name",
+ * // "qps": {},
+ * // "requests": 0,
+ * // "startTime": "my_startTime",
+ * // "vmDebugEnabled": false,
+ * // "vmId": "my_vmId",
+ * // "vmIp": "my_vmIp",
+ * // "vmName": "my_vmName",
+ * // "vmStatus": "my_vmStatus",
+ * // "vmZoneName": "my_vmZoneName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.instances.get
* @memberOf! ()
*
@@ -5238,6 +7308,59 @@ export namespace appengine_v1beta {
/**
* appengine.apps.services.versions.instances.list
* @desc Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appengine.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appengine = google.appengine('v1beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/appengine.admin',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appengine.apps.services.versions.instances.list({
+ * // Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.
+ * appsId: 'placeholder-value',
+ * // Maximum results to return per page.
+ * pageSize: 'placeholder-value',
+ * // Continuation token for fetching the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Part of `parent`. See documentation of `appsId`.
+ * servicesId: 'placeholder-value',
+ * // Part of `parent`. See documentation of `appsId`.
+ * versionsId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "instances": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appengine.apps.services.versions.instances.list
* @memberOf! ()
*
diff --git a/src/apis/appsactivity/v1.ts b/src/apis/appsactivity/v1.ts
index 93b4bbd599d..152f297d7aa 100644
--- a/src/apis/appsactivity/v1.ts
+++ b/src/apis/appsactivity/v1.ts
@@ -310,6 +310,60 @@ export namespace appsactivity_v1 {
/**
* appsactivity.activities.list
* @desc Returns a list of activities visible to the current logged in user. Visible activities are determined by the visibility settings of the object that was acted on, e.g. Drive files a user can see. An activity is a record of past events. Multiple events may be merged if they are similar. A request is scoped to activities from a given Google service using the source parameter.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/appsactivity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const appsactivity = google.appsactivity('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/activity'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await appsactivity.activities.list({
+ * // Identifies the Drive folder containing the items for which to return activities.
+ * 'drive.ancestorId': 'placeholder-value',
+ * // Identifies the Drive item to return activities for.
+ * 'drive.fileId': 'placeholder-value',
+ * // Indicates the strategy to use when grouping singleEvents items in the associated combinedEvent object.
+ * groupingStrategy: 'placeholder-value',
+ * // The maximum number of events to return on a page. The response includes a continuation token if there are more events.
+ * pageSize: 'placeholder-value',
+ * // A token to retrieve a specific page of results.
+ * pageToken: 'placeholder-value',
+ * // The Google service from which to return activities. Possible values of source are:
+ * // - drive.google.com
+ * source: 'placeholder-value',
+ * // The ID used for ACL checks (does not filter the resulting event list by the assigned value). Use the special value me to indicate the currently authenticated user.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "activities": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias appsactivity.activities.list
* @memberOf! ()
*
diff --git a/src/apis/bigquery/v2.ts b/src/apis/bigquery/v2.ts
index 77019ec249f..fa4e98c0700 100644
--- a/src/apis/bigquery/v2.ts
+++ b/src/apis/bigquery/v2.ts
@@ -2723,51 +2723,47 @@ export namespace bigquery_v2 {
* bigquery.datasets.delete
* @desc Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the dataset being deleted
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await bigquery.datasets.delete({
* // Dataset ID of dataset being deleted
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * bigquery.datasets.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * datasetId: 'placeholder-value',
+ * // If True, delete all the tables in the dataset. If False and the dataset contains tables, the request will fail. Default is False
+ * deleteContents: 'placeholder-value',
+ * // Project ID of the dataset being deleted
+ * projectId: 'placeholder-value',
* });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.datasets.delete
* @memberOf! ()
*
@@ -2841,54 +2837,66 @@ export namespace bigquery_v2 {
* bigquery.datasets.get
* @desc Returns the dataset specified by datasetID.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the requested dataset
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await bigquery.datasets.get({
* // Dataset ID of the requested dataset
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * bigquery.datasets.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * datasetId: 'placeholder-value',
+ * // Project ID of the requested dataset
+ * projectId: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "access": [],
+ * // "creationTime": "my_creationTime",
+ * // "datasetReference": {},
+ * // "defaultEncryptionConfiguration": {},
+ * // "defaultPartitionExpirationMs": "my_defaultPartitionExpirationMs",
+ * // "defaultTableExpirationMs": "my_defaultTableExpirationMs",
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "friendlyName": "my_friendlyName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labels": {},
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "location": "my_location",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.datasets.get
* @memberOf! ()
*
@@ -2961,55 +2969,84 @@ export namespace bigquery_v2 {
* bigquery.datasets.insert
* @desc Creates a new empty dataset.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the new dataset
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await bigquery.datasets.insert({
+ * // Project ID of the new dataset
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "access": [],
+ * // "creationTime": "my_creationTime",
+ * // "datasetReference": {},
+ * // "defaultEncryptionConfiguration": {},
+ * // "defaultPartitionExpirationMs": "my_defaultPartitionExpirationMs",
+ * // "defaultTableExpirationMs": "my_defaultTableExpirationMs",
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "friendlyName": "my_friendlyName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labels": {},
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "location": "my_location",
+ * // "selfLink": "my_selfLink"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * bigquery.datasets.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "access": [],
+ * // "creationTime": "my_creationTime",
+ * // "datasetReference": {},
+ * // "defaultEncryptionConfiguration": {},
+ * // "defaultPartitionExpirationMs": "my_defaultPartitionExpirationMs",
+ * // "defaultTableExpirationMs": "my_defaultTableExpirationMs",
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "friendlyName": "my_friendlyName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labels": {},
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "location": "my_location",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.datasets.insert
* @memberOf! ()
*
@@ -3082,64 +3119,61 @@ export namespace bigquery_v2 {
* bigquery.datasets.list
* @desc Lists all datasets in the specified project to which you have been granted the READER dataset role.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquery.datasets.list({
+ * // Whether to list all datasets, including hidden ones
+ * all: 'placeholder-value',
+ * // An expression for filtering the results of the request by label. The syntax is "labels.[:]". Multiple filters can be ANDed together by connecting with a space. Example: "labels.department:receiving labels.active". See Filtering datasets using labels for details.
+ * filter: 'placeholder-value',
+ * // The maximum number of results to return
+ * maxResults: 'placeholder-value',
+ * // Page token, returned by a previous call, to request the next page of results
+ * pageToken: 'placeholder-value',
* // Project ID of the datasets to be listed
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var datasetsPage = response['datasets'];
- * if (!datasetsPage) {
- * return;
- * }
- * for (var i = 0; i < datasetsPage.length; i++) {
- * // TODO: Change code below to process each resource in `datasetsPage`:
- * console.log(JSON.stringify(datasetsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * bigquery.datasets.list(request, handlePage);
- * }
- * };
- *
- * bigquery.datasets.list(request, handlePage);
- * });
- *
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * projectId: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "datasets": [],
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquery.datasets.list
* @memberOf! ()
*
@@ -3217,59 +3251,86 @@ export namespace bigquery_v2 {
* bigquery.datasets.patch
* @desc Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. This method supports patch semantics.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the dataset being updated
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await bigquery.datasets.patch({
* // Dataset ID of the dataset being updated
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * datasetId: 'placeholder-value',
+ * // Project ID of the dataset being updated
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "access": [],
+ * // "creationTime": "my_creationTime",
+ * // "datasetReference": {},
+ * // "defaultEncryptionConfiguration": {},
+ * // "defaultPartitionExpirationMs": "my_defaultPartitionExpirationMs",
+ * // "defaultTableExpirationMs": "my_defaultTableExpirationMs",
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "friendlyName": "my_friendlyName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labels": {},
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "location": "my_location",
+ * // "selfLink": "my_selfLink"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * bigquery.datasets.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "access": [],
+ * // "creationTime": "my_creationTime",
+ * // "datasetReference": {},
+ * // "defaultEncryptionConfiguration": {},
+ * // "defaultPartitionExpirationMs": "my_defaultPartitionExpirationMs",
+ * // "defaultTableExpirationMs": "my_defaultTableExpirationMs",
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "friendlyName": "my_friendlyName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labels": {},
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "location": "my_location",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.datasets.patch
* @memberOf! ()
*
@@ -3343,59 +3404,86 @@ export namespace bigquery_v2 {
* bigquery.datasets.update
* @desc Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the dataset being updated
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await bigquery.datasets.update({
* // Dataset ID of the dataset being updated
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * datasetId: 'placeholder-value',
+ * // Project ID of the dataset being updated
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "access": [],
+ * // "creationTime": "my_creationTime",
+ * // "datasetReference": {},
+ * // "defaultEncryptionConfiguration": {},
+ * // "defaultPartitionExpirationMs": "my_defaultPartitionExpirationMs",
+ * // "defaultTableExpirationMs": "my_defaultTableExpirationMs",
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "friendlyName": "my_friendlyName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labels": {},
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "location": "my_location",
+ * // "selfLink": "my_selfLink"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * bigquery.datasets.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "access": [],
+ * // "creationTime": "my_creationTime",
+ * // "datasetReference": {},
+ * // "defaultEncryptionConfiguration": {},
+ * // "defaultPartitionExpirationMs": "my_defaultPartitionExpirationMs",
+ * // "defaultTableExpirationMs": "my_defaultTableExpirationMs",
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "friendlyName": "my_friendlyName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labels": {},
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "location": "my_location",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.datasets.update
* @memberOf! ()
*
@@ -3594,54 +3682,53 @@ export namespace bigquery_v2 {
* bigquery.jobs.cancel
* @desc Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // [Required] Project ID of the job to cancel
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await bigquery.jobs.cancel({
* // [Required] Job ID of the job to cancel
- * jobId: 'my-job-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * jobId: 'placeholder-value',
+ * // The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
+ * location: 'placeholder-value',
+ * // [Required] Project ID of the job to cancel
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * bigquery.jobs.cancel(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "job": {},
+ * // "kind": "my_kind"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.jobs.cancel
* @memberOf! ()
*
@@ -3717,54 +3804,62 @@ export namespace bigquery_v2 {
* bigquery.jobs.get
* @desc Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, or have the Is Owner project role.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // [Required] Project ID of the requested job
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await bigquery.jobs.get({
* // [Required] Job ID of the requested job
- * jobId: 'my-job-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * bigquery.jobs.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * jobId: 'placeholder-value',
+ * // The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
+ * location: 'placeholder-value',
+ * // [Required] Project ID of the requested job
+ * projectId: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "configuration": {},
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "jobReference": {},
+ * // "kind": "my_kind",
+ * // "selfLink": "my_selfLink",
+ * // "statistics": {},
+ * // "status": {},
+ * // "user_email": "my_user_email"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.jobs.get
* @memberOf! ()
*
@@ -3838,67 +3933,73 @@ export namespace bigquery_v2 {
* bigquery.jobs.getQueryResults
* @desc Retrieves the results of a query job.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // [Required] Project ID of the query job
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await bigquery.jobs.getQueryResults({
* // [Required] Job ID of the query job
- * jobId: 'my-job-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var errorsPage = response['errors'];
- * if (!errorsPage) {
- * return;
- * }
- * for (var i = 0; i < errorsPage.length; i++) {
- * // TODO: Change code below to process each resource in `errorsPage`:
- * console.log(JSON.stringify(errorsPage[i], null, 2));
- * }
- *
- * if (response.pageToken) {
- * request.pageToken = response.pageToken;
- * bigquery.jobs.getQueryResults(request, handlePage);
- * }
- * };
- *
- * bigquery.jobs.getQueryResults(request, handlePage);
- * });
- *
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * jobId: 'placeholder-value',
+ * // The geographic location where the job should run. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
+ * location: 'placeholder-value',
+ * // Maximum number of results to read
+ * maxResults: 'placeholder-value',
+ * // Page token, returned by a previous call, to request the next page of results
+ * pageToken: 'placeholder-value',
+ * // [Required] Project ID of the query job
+ * projectId: 'placeholder-value',
+ * // Zero-based index of the starting row
+ * startIndex: 'placeholder-value',
+ * // How long to wait for the query to complete, in milliseconds, before returning. Default is 10 seconds. If the timeout passes before the job completes, the 'jobComplete' field in the response will be false
+ * timeoutMs: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cacheHit": false,
+ * // "errors": [],
+ * // "etag": "my_etag",
+ * // "jobComplete": false,
+ * // "jobReference": {},
+ * // "kind": "my_kind",
+ * // "numDmlAffectedRows": "my_numDmlAffectedRows",
+ * // "pageToken": "my_pageToken",
+ * // "rows": [],
+ * // "schema": {},
+ * // "totalBytesProcessed": "my_totalBytesProcessed",
+ * // "totalRows": "my_totalRows"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquery.jobs.getQueryResults
* @memberOf! ()
*
@@ -3983,62 +4084,79 @@ export namespace bigquery_v2 {
* bigquery.jobs.insert
* @desc Starts a new asynchronous job. Requires the Can View project role.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/devstorage.full_control',
+ * 'https://www.googleapis.com/auth/devstorage.read_only',
+ * 'https://www.googleapis.com/auth/devstorage.read_write',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the project that will be billed for the job
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await bigquery.jobs.insert({
+ * // Project ID of the project that will be billed for the job
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "configuration": {},
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "jobReference": {},
+ * // "kind": "my_kind",
+ * // "selfLink": "my_selfLink",
+ * // "statistics": {},
+ * // "status": {},
+ * // "user_email": "my_user_email"
+ * // }
* },
- *
* media: {
- * // TODO: Add desired media content for upload. See
- * // https://github.com/google/google-api-nodejs-client#media-uploads
- * mimeType: '', // See https://www.w3.org/Protocols/rfc1341/4_Content-Type.html
- * body: '',
+ * mimeType: 'placeholder-value',
+ * body: 'placeholder-value',
* },
- *
- * auth: authClient,
- * };
- *
- * bigquery.jobs.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "configuration": {},
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "jobReference": {},
+ * // "kind": "my_kind",
+ * // "selfLink": "my_selfLink",
+ * // "statistics": {},
+ * // "status": {},
+ * // "user_email": "my_user_email"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.jobs.insert
* @memberOf! ()
*
@@ -4118,64 +4236,69 @@ export namespace bigquery_v2 {
* bigquery.jobs.list
* @desc Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquery.jobs.list({
+ * // Whether to display jobs owned by all users in the project. Default false
+ * allUsers: 'placeholder-value',
+ * // Max value for job creation time, in milliseconds since the POSIX epoch. If set, only jobs created before or at this timestamp are returned
+ * maxCreationTime: 'placeholder-value',
+ * // Maximum number of results to return
+ * maxResults: 'placeholder-value',
+ * // Min value for job creation time, in milliseconds since the POSIX epoch. If set, only jobs created after or at this timestamp are returned
+ * minCreationTime: 'placeholder-value',
+ * // Page token, returned by a previous call, to request the next page of results
+ * pageToken: 'placeholder-value',
+ * // If set, retrieves only jobs whose parent is this job. Otherwise, retrieves only jobs which have no parent
+ * parentJobId: 'placeholder-value',
* // Project ID of the jobs to list
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var jobsPage = response['jobs'];
- * if (!jobsPage) {
- * return;
- * }
- * for (var i = 0; i < jobsPage.length; i++) {
- * // TODO: Change code below to process each resource in `jobsPage`:
- * console.log(JSON.stringify(jobsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * bigquery.jobs.list(request, handlePage);
- * }
- * };
- *
- * bigquery.jobs.list(request, handlePage);
- * });
- *
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * projectId: 'placeholder-value',
+ * // Restrict information returned to a set of selected fields
+ * projection: 'placeholder-value',
+ * // Filter for job state
+ * stateFilter: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "jobs": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquery.jobs.list
* @memberOf! ()
*
@@ -4256,55 +4379,80 @@ export namespace bigquery_v2 {
* bigquery.jobs.query
* @desc Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the project billed for the query
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await bigquery.jobs.query({
+ * // Project ID of the project billed for the query
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "connectionProperties": [],
+ * // "defaultDataset": {},
+ * // "dryRun": false,
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "maxResults": 0,
+ * // "parameterMode": "my_parameterMode",
+ * // "preserveNulls": false,
+ * // "query": "my_query",
+ * // "queryParameters": [],
+ * // "timeoutMs": 0,
+ * // "useLegacySql": false,
+ * // "useQueryCache": false
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * bigquery.jobs.query(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cacheHit": false,
+ * // "errors": [],
+ * // "jobComplete": false,
+ * // "jobReference": {},
+ * // "kind": "my_kind",
+ * // "numDmlAffectedRows": "my_numDmlAffectedRows",
+ * // "pageToken": "my_pageToken",
+ * // "rows": [],
+ * // "schema": {},
+ * // "totalBytesProcessed": "my_totalBytesProcessed",
+ * // "totalRows": "my_totalRows"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.jobs.query
* @memberOf! ()
*
@@ -4551,54 +4699,47 @@ export namespace bigquery_v2 {
* bigquery.models.delete
* @desc Deletes the model specified by modelId from the dataset.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the model to delete.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * // Dataset ID of the model to delete.
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
- * // Model ID of the model to delete.
- * modelId: 'my-model-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * bigquery.models.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
* });
- * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquery.models.delete({
+ * // Required. Dataset ID of the model to delete.
+ * datasetId: '[^/]+',
+ * // Required. Model ID of the model to delete.
+ * modelId: '[^/]+',
+ * // Required. Project ID of the model to delete.
+ * projectId: '[^/]+',
* });
+ * console.log(res.data);
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquery.models.delete
* @memberOf! ()
*
@@ -4673,57 +4814,67 @@ export namespace bigquery_v2 {
* bigquery.models.get
* @desc Gets the specified model resource by model ID.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the requested model.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * // Dataset ID of the requested model.
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
- * // Model ID of the requested model.
- * modelId: 'my-model-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * bigquery.models.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
* });
- * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquery.models.get({
+ * // Required. Dataset ID of the requested model.
+ * datasetId: '[^/]+',
+ * // Required. Model ID of the requested model.
+ * modelId: '[^/]+',
+ * // Required. Project ID of the requested model.
+ * projectId: '[^/]+',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "encryptionConfiguration": {},
+ * // "etag": "my_etag",
+ * // "expirationTime": "my_expirationTime",
+ * // "featureColumns": [],
+ * // "friendlyName": "my_friendlyName",
+ * // "labelColumns": [],
+ * // "labels": {},
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "location": "my_location",
+ * // "modelReference": {},
+ * // "modelType": "my_modelType",
+ * // "trainingRuns": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquery.models.get
* @memberOf! ()
*
@@ -4798,67 +4949,59 @@ export namespace bigquery_v2 {
* bigquery.models.list
* @desc Lists all models in the specified dataset. Requires the READER dataset role.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the models to list.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * // Dataset ID of the models to list.
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var modelsPage = response['models'];
- * if (!modelsPage) {
- * return;
- * }
- * for (var i = 0; i < modelsPage.length; i++) {
- * // TODO: Change code below to process each resource in `modelsPage`:
- * console.log(JSON.stringify(modelsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * bigquery.models.list(request, handlePage);
- * }
- * };
- *
- * bigquery.models.list(request, handlePage);
- * });
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquery.models.list({
+ * // Required. Dataset ID of the models to list.
+ * datasetId: '[^/]+',
+ * // The maximum number of results to return in a single response page.
+ * // Leverage the page tokens to iterate through the entire collection.
+ * maxResults: 'placeholder-value',
+ * // Page token, returned by a previous call to request the next page of
+ * // results
+ * pageToken: 'placeholder-value',
+ * // Required. Project ID of the models to list.
+ * projectId: '[^/]+',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "models": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquery.models.list
* @memberOf! ()
*
@@ -4936,62 +5079,86 @@ export namespace bigquery_v2 {
* bigquery.models.patch
* @desc Patch specific fields in the specified model.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the model to patch.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * // Dataset ID of the model to patch.
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
- * // Model ID of the model to patch.
- * modelId: 'my-model-id', // TODO: Update placeholder value.
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquery.models.patch({
+ * // Required. Dataset ID of the model to patch.
+ * datasetId: '[^/]+',
+ * // Required. Model ID of the model to patch.
+ * modelId: '[^/]+',
+ * // Required. Project ID of the model to patch.
+ * projectId: '[^/]+',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "encryptionConfiguration": {},
+ * // "etag": "my_etag",
+ * // "expirationTime": "my_expirationTime",
+ * // "featureColumns": [],
+ * // "friendlyName": "my_friendlyName",
+ * // "labelColumns": [],
+ * // "labels": {},
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "location": "my_location",
+ * // "modelReference": {},
+ * // "modelType": "my_modelType",
+ * // "trainingRuns": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * bigquery.models.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "encryptionConfiguration": {},
+ * // "etag": "my_etag",
+ * // "expirationTime": "my_expirationTime",
+ * // "featureColumns": [],
+ * // "friendlyName": "my_friendlyName",
+ * // "labelColumns": [],
+ * // "labels": {},
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "location": "my_location",
+ * // "modelReference": {},
+ * // "modelType": "my_modelType",
+ * // "trainingRuns": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.models.patch
* @memberOf! ()
*
@@ -5160,51 +5327,51 @@ export namespace bigquery_v2 {
* bigquery.projects.getServiceAccount
* @desc Returns the email address of the service account for your project used for interactions with Google Cloud KMS.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for which the service account is requested.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * auth: authClient,
- * };
+ * // Do the magic
+ * const res = await bigquery.projects.getServiceAccount({
+ * // Project ID for which the service account is requested.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * bigquery.projects.getServiceAccount(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "email": "my_email",
+ * // "kind": "my_kind"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.projects.getServiceAccount
* @memberOf! ()
*
@@ -5286,61 +5453,56 @@ export namespace bigquery_v2 {
* bigquery.projects.list
* @desc Lists all projects to which you have been granted any project role.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var projectsPage = response['projects'];
- * if (!projectsPage) {
- * return;
- * }
- * for (var i = 0; i < projectsPage.length; i++) {
- * // TODO: Change code below to process each resource in `projectsPage`:
- * console.log(JSON.stringify(projectsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * bigquery.projects.list(request, handlePage);
- * }
- * };
- *
- * bigquery.projects.list(request, handlePage);
- * });
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Do the magic
+ * const res = await bigquery.projects.list({
+ * // Maximum number of results to return
+ * maxResults: 'placeholder-value',
+ * // Page token, returned by a previous call, to request the next page of results
+ * pageToken: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "projects": [],
+ * // "totalItems": 0
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquery.projects.list
* @memberOf! ()
*
@@ -5451,54 +5613,47 @@ export namespace bigquery_v2 {
* bigquery.routines.delete
* @desc Deletes the routine specified by routineId from the dataset.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the routine to delete
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * // Dataset ID of the routine to delete
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
- * // Routine ID of the routine to delete
- * routineId: 'my-routine-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * bigquery.routines.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
* });
- * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquery.routines.delete({
+ * // Required. Dataset ID of the routine to delete
+ * datasetId: '[^/]+',
+ * // Required. Project ID of the routine to delete
+ * projectId: '[^/]+',
+ * // Required. Routine ID of the routine to delete
+ * routineId: '[^/]+',
* });
+ * console.log(res.data);
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquery.routines.delete
* @memberOf! ()
*
@@ -5573,57 +5728,67 @@ export namespace bigquery_v2 {
* bigquery.routines.get
* @desc Gets the specified routine resource by routine ID.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the requested routine
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * // Dataset ID of the requested routine
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
- * // Routine ID of the requested routine
- * routineId: 'my-routine-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * bigquery.routines.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
* });
- * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquery.routines.get({
+ * // Required. Dataset ID of the requested routine
+ * datasetId: '[^/]+',
+ * // Required. Project ID of the requested routine
+ * projectId: '[^/]+',
+ * // If set, only the Routine fields in the field mask are returned in the
+ * // response. If unset, all Routine fields are returned.
+ * readMask: 'placeholder-value',
+ * // Required. Routine ID of the requested routine
+ * routineId: '[^/]+',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "arguments": [],
+ * // "creationTime": "my_creationTime",
+ * // "definitionBody": "my_definitionBody",
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "importedLibraries": [],
+ * // "language": "my_language",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "returnType": {},
+ * // "routineReference": {},
+ * // "routineType": "my_routineType"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquery.routines.get
* @memberOf! ()
*
@@ -5699,58 +5864,78 @@ export namespace bigquery_v2 {
* bigquery.routines.insert
* @desc Creates a new routine in the dataset.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the new routine
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * // Dataset ID of the new routine
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquery.routines.insert({
+ * // Required. Dataset ID of the new routine
+ * datasetId: '[^/]+',
+ * // Required. Project ID of the new routine
+ * projectId: '[^/]+',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "arguments": [],
+ * // "creationTime": "my_creationTime",
+ * // "definitionBody": "my_definitionBody",
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "importedLibraries": [],
+ * // "language": "my_language",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "returnType": {},
+ * // "routineReference": {},
+ * // "routineType": "my_routineType"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * bigquery.routines.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "arguments": [],
+ * // "creationTime": "my_creationTime",
+ * // "definitionBody": "my_definitionBody",
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "importedLibraries": [],
+ * // "language": "my_language",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "returnType": {},
+ * // "routineReference": {},
+ * // "routineType": "my_routineType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.routines.insert
* @memberOf! ()
*
@@ -5825,67 +6010,70 @@ export namespace bigquery_v2 {
* bigquery.routines.list
* @desc Lists all routines in the specified dataset. Requires the READER dataset role.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the routines to list
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * // Dataset ID of the routines to list
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var routinesPage = response['routines'];
- * if (!routinesPage) {
- * return;
- * }
- * for (var i = 0; i < routinesPage.length; i++) {
- * // TODO: Change code below to process each resource in `routinesPage`:
- * console.log(JSON.stringify(routinesPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * bigquery.routines.list(request, handlePage);
- * }
- * };
- *
- * bigquery.routines.list(request, handlePage);
- * });
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquery.routines.list({
+ * // Required. Dataset ID of the routines to list
+ * datasetId: '[^/]+',
+ * // If set, then only the Routines matching this filter are returned.
+ * // The current supported form is either "routine_type:" or
+ * // "routineType:", where is a RoutineType enum.
+ * // Example: "routineType:SCALAR_FUNCTION".
+ * filter: 'placeholder-value',
+ * // The maximum number of results to return in a single response page.
+ * // Leverage the page tokens to iterate through the entire collection.
+ * maxResults: 'placeholder-value',
+ * // Page token, returned by a previous call, to request the next page of
+ * // results
+ * pageToken: 'placeholder-value',
+ * // Required. Project ID of the routines to list
+ * projectId: '[^/]+',
+ * // If set, then only the Routine fields in the field mask, as well as
+ * // project_id, dataset_id and routine_id, are returned in the response.
+ * // If unset, then the following Routine fields are returned:
+ * // etag, project_id, dataset_id, routine_id, routine_type, creation_time,
+ * // last_modified_time, and language.
+ * readMask: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "routines": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquery.routines.list
* @memberOf! ()
*
@@ -5967,62 +6155,80 @@ export namespace bigquery_v2 {
* bigquery.routines.update
* @desc Updates information in an existing routine. The update method replaces the entire Routine resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the routine to update
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * // Dataset ID of the routine to update
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
- * // Routine ID of the routine to update
- * routineId: 'my-routine-id', // TODO: Update placeholder value.
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquery.routines.update({
+ * // Required. Dataset ID of the routine to update
+ * datasetId: '[^/]+',
+ * // Required. Project ID of the routine to update
+ * projectId: '[^/]+',
+ * // Required. Routine ID of the routine to update
+ * routineId: '[^/]+',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "arguments": [],
+ * // "creationTime": "my_creationTime",
+ * // "definitionBody": "my_definitionBody",
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "importedLibraries": [],
+ * // "language": "my_language",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "returnType": {},
+ * // "routineReference": {},
+ * // "routineType": "my_routineType"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * bigquery.routines.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "arguments": [],
+ * // "creationTime": "my_creationTime",
+ * // "definitionBody": "my_definitionBody",
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "importedLibraries": [],
+ * // "language": "my_language",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "returnType": {},
+ * // "routineReference": {},
+ * // "routineType": "my_routineType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.routines.update
* @memberOf! ()
*
@@ -6223,61 +6429,66 @@ export namespace bigquery_v2 {
* bigquery.tabledata.insertAll
* @desc Streams data into BigQuery one record at a time without needing to run a load job. Requires the WRITER dataset role.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.insertdata',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the destination table.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await bigquery.tabledata.insertAll({
* // Dataset ID of the destination table.
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
+ * datasetId: 'placeholder-value',
+ * // Project ID of the destination table.
+ * projectId: 'placeholder-value',
* // Table ID of the destination table.
- * tableId: 'my-table-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * tableId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "ignoreUnknownValues": false,
+ * // "kind": "my_kind",
+ * // "rows": [],
+ * // "skipInvalidRows": false,
+ * // "templateSuffix": "my_templateSuffix"
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * bigquery.tabledata.insertAll(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "insertErrors": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.tabledata.insertAll
* @memberOf! ()
*
@@ -6363,70 +6574,66 @@ export namespace bigquery_v2 {
* bigquery.tabledata.list
* @desc Retrieves table data from a specified set of rows. Requires the READER dataset role.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the table to read
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await bigquery.tabledata.list({
* // Dataset ID of the table to read
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
+ * datasetId: 'placeholder-value',
+ * // Maximum number of results to return
+ * maxResults: 'placeholder-value',
+ * // Page token, returned by a previous call, identifying the result set
+ * pageToken: 'placeholder-value',
+ * // Project ID of the table to read
+ * projectId: 'placeholder-value',
+ * // List of fields to return (comma-separated). If unspecified, all fields are returned
+ * selectedFields: 'placeholder-value',
+ * // Zero-based index of the starting row to read
+ * startIndex: 'placeholder-value',
* // Table ID of the table to read
- * tableId: 'my-table-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var rowsPage = response['rows'];
- * if (!rowsPage) {
- * return;
- * }
- * for (var i = 0; i < rowsPage.length; i++) {
- * // TODO: Change code below to process each resource in `rowsPage`:
- * console.log(JSON.stringify(rowsPage[i], null, 2));
- * }
- *
- * if (response.pageToken) {
- * request.pageToken = response.pageToken;
- * bigquery.tabledata.list(request, handlePage);
- * }
- * };
- *
- * bigquery.tabledata.list(request, handlePage);
- * });
- *
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * tableId: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "pageToken": "my_pageToken",
+ * // "rows": [],
+ * // "totalRows": "my_totalRows"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquery.tabledata.list
* @memberOf! ()
*
@@ -6575,54 +6782,47 @@ export namespace bigquery_v2 {
* bigquery.tables.delete
* @desc Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the table to delete
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await bigquery.tables.delete({
* // Dataset ID of the table to delete
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
+ * datasetId: 'placeholder-value',
+ * // Project ID of the table to delete
+ * projectId: 'placeholder-value',
* // Table ID of the table to delete
- * tableId: 'my-table-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * bigquery.tables.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * tableId: 'placeholder-value',
* });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.tables.delete
* @memberOf! ()
*
@@ -6697,57 +6897,83 @@ export namespace bigquery_v2 {
* bigquery.tables.get
* @desc Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the requested table
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await bigquery.tables.get({
* // Dataset ID of the requested table
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
+ * datasetId: 'placeholder-value',
+ * // Project ID of the requested table
+ * projectId: 'placeholder-value',
+ * // List of fields to return (comma-separated). If unspecified, all fields are returned
+ * selectedFields: 'placeholder-value',
* // Table ID of the requested table
- * tableId: 'my-table-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * bigquery.tables.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * tableId: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clustering": {},
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "encryptionConfiguration": {},
+ * // "etag": "my_etag",
+ * // "expirationTime": "my_expirationTime",
+ * // "externalDataConfiguration": {},
+ * // "friendlyName": "my_friendlyName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labels": {},
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "location": "my_location",
+ * // "materializedView": {},
+ * // "model": {},
+ * // "numBytes": "my_numBytes",
+ * // "numLongTermBytes": "my_numLongTermBytes",
+ * // "numPhysicalBytes": "my_numPhysicalBytes",
+ * // "numRows": "my_numRows",
+ * // "rangePartitioning": {},
+ * // "requirePartitionFilter": false,
+ * // "schema": {},
+ * // "selfLink": "my_selfLink",
+ * // "streamingBuffer": {},
+ * // "tableReference": {},
+ * // "timePartitioning": {},
+ * // "type": "my_type",
+ * // "view": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.tables.get
* @memberOf! ()
*
@@ -6823,58 +7049,112 @@ export namespace bigquery_v2 {
* bigquery.tables.insert
* @desc Creates a new, empty table in the dataset.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the new table
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await bigquery.tables.insert({
* // Dataset ID of the new table
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * datasetId: 'placeholder-value',
+ * // Project ID of the new table
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clustering": {},
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "encryptionConfiguration": {},
+ * // "etag": "my_etag",
+ * // "expirationTime": "my_expirationTime",
+ * // "externalDataConfiguration": {},
+ * // "friendlyName": "my_friendlyName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labels": {},
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "location": "my_location",
+ * // "materializedView": {},
+ * // "model": {},
+ * // "numBytes": "my_numBytes",
+ * // "numLongTermBytes": "my_numLongTermBytes",
+ * // "numPhysicalBytes": "my_numPhysicalBytes",
+ * // "numRows": "my_numRows",
+ * // "rangePartitioning": {},
+ * // "requirePartitionFilter": false,
+ * // "schema": {},
+ * // "selfLink": "my_selfLink",
+ * // "streamingBuffer": {},
+ * // "tableReference": {},
+ * // "timePartitioning": {},
+ * // "type": "my_type",
+ * // "view": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * bigquery.tables.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clustering": {},
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "encryptionConfiguration": {},
+ * // "etag": "my_etag",
+ * // "expirationTime": "my_expirationTime",
+ * // "externalDataConfiguration": {},
+ * // "friendlyName": "my_friendlyName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labels": {},
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "location": "my_location",
+ * // "materializedView": {},
+ * // "model": {},
+ * // "numBytes": "my_numBytes",
+ * // "numLongTermBytes": "my_numLongTermBytes",
+ * // "numPhysicalBytes": "my_numPhysicalBytes",
+ * // "numRows": "my_numRows",
+ * // "rangePartitioning": {},
+ * // "requirePartitionFilter": false,
+ * // "schema": {},
+ * // "selfLink": "my_selfLink",
+ * // "streamingBuffer": {},
+ * // "tableReference": {},
+ * // "timePartitioning": {},
+ * // "type": "my_type",
+ * // "view": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.tables.insert
* @memberOf! ()
*
@@ -6949,67 +7229,60 @@ export namespace bigquery_v2 {
* bigquery.tables.list
* @desc Lists all tables in the specified dataset. Requires the READER dataset role.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the tables to list
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await bigquery.tables.list({
* // Dataset ID of the tables to list
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var tablesPage = response['tables'];
- * if (!tablesPage) {
- * return;
- * }
- * for (var i = 0; i < tablesPage.length; i++) {
- * // TODO: Change code below to process each resource in `tablesPage`:
- * console.log(JSON.stringify(tablesPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * bigquery.tables.list(request, handlePage);
- * }
- * };
- *
- * bigquery.tables.list(request, handlePage);
- * });
- *
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * datasetId: 'placeholder-value',
+ * // Maximum number of results to return
+ * maxResults: 'placeholder-value',
+ * // Page token, returned by a previous call, to request the next page of results
+ * pageToken: 'placeholder-value',
+ * // Project ID of the tables to list
+ * projectId: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "tables": [],
+ * // "totalItems": 0
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquery.tables.list
* @memberOf! ()
*
@@ -7087,62 +7360,114 @@ export namespace bigquery_v2 {
* bigquery.tables.patch
* @desc Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports patch semantics.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the table to update
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await bigquery.tables.patch({
* // Dataset ID of the table to update
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
+ * datasetId: 'placeholder-value',
+ * // Project ID of the table to update
+ * projectId: 'placeholder-value',
* // Table ID of the table to update
- * tableId: 'my-table-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * tableId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clustering": {},
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "encryptionConfiguration": {},
+ * // "etag": "my_etag",
+ * // "expirationTime": "my_expirationTime",
+ * // "externalDataConfiguration": {},
+ * // "friendlyName": "my_friendlyName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labels": {},
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "location": "my_location",
+ * // "materializedView": {},
+ * // "model": {},
+ * // "numBytes": "my_numBytes",
+ * // "numLongTermBytes": "my_numLongTermBytes",
+ * // "numPhysicalBytes": "my_numPhysicalBytes",
+ * // "numRows": "my_numRows",
+ * // "rangePartitioning": {},
+ * // "requirePartitionFilter": false,
+ * // "schema": {},
+ * // "selfLink": "my_selfLink",
+ * // "streamingBuffer": {},
+ * // "tableReference": {},
+ * // "timePartitioning": {},
+ * // "type": "my_type",
+ * // "view": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * bigquery.tables.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clustering": {},
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "encryptionConfiguration": {},
+ * // "etag": "my_etag",
+ * // "expirationTime": "my_expirationTime",
+ * // "externalDataConfiguration": {},
+ * // "friendlyName": "my_friendlyName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labels": {},
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "location": "my_location",
+ * // "materializedView": {},
+ * // "model": {},
+ * // "numBytes": "my_numBytes",
+ * // "numLongTermBytes": "my_numLongTermBytes",
+ * // "numPhysicalBytes": "my_numPhysicalBytes",
+ * // "numRows": "my_numRows",
+ * // "rangePartitioning": {},
+ * // "requirePartitionFilter": false,
+ * // "schema": {},
+ * // "selfLink": "my_selfLink",
+ * // "streamingBuffer": {},
+ * // "tableReference": {},
+ * // "timePartitioning": {},
+ * // "type": "my_type",
+ * // "view": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.tables.patch
* @memberOf! ()
*
@@ -7218,62 +7543,114 @@ export namespace bigquery_v2 {
* bigquery.tables.update
* @desc Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the BigQuery API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/bigquery
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquery.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var bigquery = google.bigquery('v2');
+ * const bigquery = google.bigquery('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Project ID of the table to update
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await bigquery.tables.update({
* // Dataset ID of the table to update
- * datasetId: 'my-dataset-id', // TODO: Update placeholder value.
- *
+ * datasetId: 'placeholder-value',
+ * // Project ID of the table to update
+ * projectId: 'placeholder-value',
* // Table ID of the table to update
- * tableId: 'my-table-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * tableId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clustering": {},
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "encryptionConfiguration": {},
+ * // "etag": "my_etag",
+ * // "expirationTime": "my_expirationTime",
+ * // "externalDataConfiguration": {},
+ * // "friendlyName": "my_friendlyName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labels": {},
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "location": "my_location",
+ * // "materializedView": {},
+ * // "model": {},
+ * // "numBytes": "my_numBytes",
+ * // "numLongTermBytes": "my_numLongTermBytes",
+ * // "numPhysicalBytes": "my_numPhysicalBytes",
+ * // "numRows": "my_numRows",
+ * // "rangePartitioning": {},
+ * // "requirePartitionFilter": false,
+ * // "schema": {},
+ * // "selfLink": "my_selfLink",
+ * // "streamingBuffer": {},
+ * // "tableReference": {},
+ * // "timePartitioning": {},
+ * // "type": "my_type",
+ * // "view": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * bigquery.tables.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clustering": {},
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "encryptionConfiguration": {},
+ * // "etag": "my_etag",
+ * // "expirationTime": "my_expirationTime",
+ * // "externalDataConfiguration": {},
+ * // "friendlyName": "my_friendlyName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labels": {},
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "location": "my_location",
+ * // "materializedView": {},
+ * // "model": {},
+ * // "numBytes": "my_numBytes",
+ * // "numLongTermBytes": "my_numLongTermBytes",
+ * // "numPhysicalBytes": "my_numPhysicalBytes",
+ * // "numRows": "my_numRows",
+ * // "rangePartitioning": {},
+ * // "requirePartitionFilter": false,
+ * // "schema": {},
+ * // "selfLink": "my_selfLink",
+ * // "streamingBuffer": {},
+ * // "tableReference": {},
+ * // "timePartitioning": {},
+ * // "type": "my_type",
+ * // "view": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias bigquery.tables.update
* @memberOf! ()
*
diff --git a/src/apis/bigqueryconnection/v1beta1.ts b/src/apis/bigqueryconnection/v1beta1.ts
index 6bd72ed7cb0..9b6b684988c 100644
--- a/src/apis/bigqueryconnection/v1beta1.ts
+++ b/src/apis/bigqueryconnection/v1beta1.ts
@@ -370,6 +370,72 @@ export namespace bigqueryconnection_v1beta1 {
/**
* bigqueryconnection.projects.locations.connections.create
* @desc Creates a new connection.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryconnection.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryconnection = google.bigqueryconnection('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryconnection.projects.locations.connections.create({
+ * // Optional. Connection id that should be assigned to the created connection.
+ * connectionId: 'placeholder-value',
+ * // Required. Parent resource name.
+ * // Must be in the format `projects/{project_id}/locations/{location_id}`
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "cloudSql": {},
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "friendlyName": "my_friendlyName",
+ * // "hasCredential": false,
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cloudSql": {},
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "friendlyName": "my_friendlyName",
+ * // "hasCredential": false,
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryconnection.projects.locations.connections.create
* @memberOf! ()
*
@@ -447,6 +513,48 @@ export namespace bigqueryconnection_v1beta1 {
/**
* bigqueryconnection.projects.locations.connections.delete
* @desc Deletes connection and associated credential.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryconnection.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryconnection = google.bigqueryconnection('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryconnection.projects.locations.connections.delete({
+ * // Required. Name of the deleted connection, for example:
+ * // `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
+ * name: 'projects/my-project/locations/my-location/connections/my-connection',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryconnection.projects.locations.connections.delete
* @memberOf! ()
*
@@ -517,6 +625,56 @@ export namespace bigqueryconnection_v1beta1 {
/**
* bigqueryconnection.projects.locations.connections.get
* @desc Returns specified connection.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryconnection.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryconnection = google.bigqueryconnection('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryconnection.projects.locations.connections.get({
+ * // Required. Name of the requested connection, for example:
+ * // `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
+ * name: 'projects/my-project/locations/my-location/connections/my-connection',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cloudSql": {},
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "friendlyName": "my_friendlyName",
+ * // "hasCredential": false,
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryconnection.projects.locations.connections.get
* @memberOf! ()
*
@@ -589,6 +747,64 @@ export namespace bigqueryconnection_v1beta1 {
/**
* bigqueryconnection.projects.locations.connections.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryconnection.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryconnection = google.bigqueryconnection('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryconnection.projects.locations.connections.getIamPolicy(
+ * {
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/connections/my-connection',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryconnection.projects.locations.connections.getIamPolicy
* @memberOf! ()
*
@@ -663,6 +879,55 @@ export namespace bigqueryconnection_v1beta1 {
/**
* bigqueryconnection.projects.locations.connections.list
* @desc Returns a list of connections in the given project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryconnection.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryconnection = google.bigqueryconnection('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryconnection.projects.locations.connections.list({
+ * // Required. Maximum number of results per page.
+ * maxResults: 'placeholder-value',
+ * // Page token.
+ * pageToken: 'placeholder-value',
+ * // Required. Parent resource name.
+ * // Must be in the form: `projects/{project_id}/locations/{location_id}`
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "connections": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryconnection.projects.locations.connections.list
* @memberOf! ()
*
@@ -742,6 +1007,72 @@ export namespace bigqueryconnection_v1beta1 {
/**
* bigqueryconnection.projects.locations.connections.patch
* @desc Updates the specified connection. For security reasons, also resets credential if connection properties are in the update field mask.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryconnection.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryconnection = google.bigqueryconnection('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryconnection.projects.locations.connections.patch({
+ * // Required. Name of the connection to update, for example:
+ * // `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
+ * name: 'projects/my-project/locations/my-location/connections/my-connection',
+ * // Required. Update mask for the connection fields to be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "cloudSql": {},
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "friendlyName": "my_friendlyName",
+ * // "hasCredential": false,
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cloudSql": {},
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "friendlyName": "my_friendlyName",
+ * // "hasCredential": false,
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryconnection.projects.locations.connections.patch
* @memberOf! ()
*
@@ -816,6 +1147,65 @@ export namespace bigqueryconnection_v1beta1 {
/**
* bigqueryconnection.projects.locations.connections.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryconnection.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryconnection = google.bigqueryconnection('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryconnection.projects.locations.connections.setIamPolicy(
+ * {
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/connections/my-connection',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {},
+ * // "updateMask": "my_updateMask"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryconnection.projects.locations.connections.setIamPolicy
* @memberOf! ()
*
@@ -890,6 +1280,61 @@ export namespace bigqueryconnection_v1beta1 {
/**
* bigqueryconnection.projects.locations.connections.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryconnection.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryconnection = google.bigqueryconnection('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryconnection.projects.locations.connections.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/connections/my-connection',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryconnection.projects.locations.connections.testIamPermissions
* @memberOf! ()
*
@@ -973,6 +1418,59 @@ export namespace bigqueryconnection_v1beta1 {
/**
* bigqueryconnection.projects.locations.connections.updateCredential
* @desc Sets the credential for the specified connection.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryconnection.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryconnection = google.bigqueryconnection('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryconnection.projects.locations.connections.updateCredential(
+ * {
+ * // Required. Name of the connection, for example:
+ * // `projects/{project_id}/locations/{location_id}/connections/{connection_id}/credential`
+ * name:
+ * 'projects/my-project/locations/my-location/connections/my-connection/credential',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "cloudSql": {}
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryconnection.projects.locations.connections.updateCredential
* @memberOf! ()
*
diff --git a/src/apis/bigquerydatatransfer/v1.ts b/src/apis/bigquerydatatransfer/v1.ts
index 48b30ff273e..a77723f0fa0 100644
--- a/src/apis/bigquerydatatransfer/v1.ts
+++ b/src/apis/bigquerydatatransfer/v1.ts
@@ -642,6 +642,59 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.dataSources.checkValidCreds
* @desc Returns true if valid credentials exist for the given data source and requesting user. Some data sources doesn't support service account, so we need to talk to them on behalf of the end user. This API just checks whether we have OAuth token for the particular user, which is a pre-requisite before user can create a transfer config.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.dataSources.checkValidCreds({
+ * // Required. The data source in the form:
+ * // `projects/{project_id}/dataSources/{data_source_id}` or
+ * // `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`.
+ * name: 'projects/my-project/dataSources/my-dataSource',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "hasValidCreds": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.dataSources.checkValidCreds
* @memberOf! ()
*
@@ -722,6 +775,70 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.dataSources.get
* @desc Retrieves a supported data source and returns its settings, which can be used for UI rendering.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.dataSources.get({
+ * // Required. The field will contain name of the resource requested, for example:
+ * // `projects/{project_id}/dataSources/{data_source_id}` or
+ * // `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`
+ * name: 'projects/my-project/dataSources/my-dataSource',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "authorizationType": "my_authorizationType",
+ * // "clientId": "my_clientId",
+ * // "dataRefreshType": "my_dataRefreshType",
+ * // "dataSourceId": "my_dataSourceId",
+ * // "defaultDataRefreshWindowDays": 0,
+ * // "defaultSchedule": "my_defaultSchedule",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "helpUrl": "my_helpUrl",
+ * // "manualRunsDisabled": false,
+ * // "minimumScheduleInterval": "my_minimumScheduleInterval",
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "scopes": [],
+ * // "supportsCustomSchedule": false,
+ * // "supportsMultipleTransfers": false,
+ * // "transferType": "my_transferType",
+ * // "updateDeadlineSeconds": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.dataSources.get
* @memberOf! ()
*
@@ -794,6 +911,62 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.dataSources.list
* @desc Lists supported data sources and returns their settings, which can be used for UI rendering.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.dataSources.list({
+ * // Page size. The default page size is the maximum value of 1000 results.
+ * pageSize: 'placeholder-value',
+ * // Pagination token, which can be used to request a specific page
+ * // of `ListDataSourcesRequest` list results. For multiple-page
+ * // results, `ListDataSourcesResponse` outputs
+ * // a `next_page` token, which can be used as the
+ * // `page_token` value to request the next page of list results.
+ * pageToken: 'placeholder-value',
+ * // Required. The BigQuery project id for which data sources should be returned.
+ * // Must be in the form: `projects/{project_id}` or
+ * // `projects/{project_id}/locations/{location_id}
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dataSources": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.dataSources.list
* @memberOf! ()
*
@@ -938,6 +1111,55 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.locations.get
* @desc Gets information about a location.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.locations.get({
+ * // Resource name for the location.
+ * name: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "labels": {},
+ * // "locationId": "my_locationId",
+ * // "metadata": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.locations.get
* @memberOf! ()
*
@@ -1008,6 +1230,58 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.locations.list
* @desc Lists information about the supported locations for this service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.locations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The resource that owns the locations collection, if applicable.
+ * name: 'projects/my-project',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "locations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.locations.list
* @memberOf! ()
*
@@ -1132,6 +1406,62 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.locations.dataSources.checkValidCreds
* @desc Returns true if valid credentials exist for the given data source and requesting user. Some data sources doesn't support service account, so we need to talk to them on behalf of the end user. This API just checks whether we have OAuth token for the particular user, which is a pre-requisite before user can create a transfer config.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.locations.dataSources.checkValidCreds(
+ * {
+ * // Required. The data source in the form:
+ * // `projects/{project_id}/dataSources/{data_source_id}` or
+ * // `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`.
+ * name:
+ * 'projects/my-project/locations/my-location/dataSources/my-dataSource',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "hasValidCreds": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.locations.dataSources.checkValidCreds
* @memberOf! ()
*
@@ -1212,6 +1542,70 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.locations.dataSources.get
* @desc Retrieves a supported data source and returns its settings, which can be used for UI rendering.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.locations.dataSources.get({
+ * // Required. The field will contain name of the resource requested, for example:
+ * // `projects/{project_id}/dataSources/{data_source_id}` or
+ * // `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`
+ * name: 'projects/my-project/locations/my-location/dataSources/my-dataSource',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "authorizationType": "my_authorizationType",
+ * // "clientId": "my_clientId",
+ * // "dataRefreshType": "my_dataRefreshType",
+ * // "dataSourceId": "my_dataSourceId",
+ * // "defaultDataRefreshWindowDays": 0,
+ * // "defaultSchedule": "my_defaultSchedule",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "helpUrl": "my_helpUrl",
+ * // "manualRunsDisabled": false,
+ * // "minimumScheduleInterval": "my_minimumScheduleInterval",
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "scopes": [],
+ * // "supportsCustomSchedule": false,
+ * // "supportsMultipleTransfers": false,
+ * // "transferType": "my_transferType",
+ * // "updateDeadlineSeconds": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.locations.dataSources.get
* @memberOf! ()
*
@@ -1284,6 +1678,62 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.locations.dataSources.list
* @desc Lists supported data sources and returns their settings, which can be used for UI rendering.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.locations.dataSources.list({
+ * // Page size. The default page size is the maximum value of 1000 results.
+ * pageSize: 'placeholder-value',
+ * // Pagination token, which can be used to request a specific page
+ * // of `ListDataSourcesRequest` list results. For multiple-page
+ * // results, `ListDataSourcesResponse` outputs
+ * // a `next_page` token, which can be used as the
+ * // `page_token` value to request the next page of list results.
+ * pageToken: 'placeholder-value',
+ * // Required. The BigQuery project id for which data sources should be returned.
+ * // Must be in the form: `projects/{project_id}` or
+ * // `projects/{project_id}/locations/{location_id}
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dataSources": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.locations.dataSources.list
* @memberOf! ()
*
@@ -1424,6 +1874,118 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.locations.transferConfigs.create
* @desc Creates a new data transfer configuration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.locations.transferConfigs.create(
+ * {
+ * // Optional OAuth2 authorization code to use with this transfer configuration.
+ * // This is required if new credentials are needed, as indicated by
+ * // `CheckValidCreds`.
+ * // In order to obtain authorization_code, please make a
+ * // request to
+ * // https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=&scope=&redirect_uri=
+ * //
+ * // * client_id should be OAuth client_id of BigQuery DTS API for the given
+ * // data source returned by ListDataSources method.
+ * // * data_source_scopes are the scopes returned by ListDataSources method.
+ * // * redirect_uri is an optional parameter. If not specified, then
+ * // authorization code is posted to the opener of authorization flow window.
+ * // Otherwise it will be sent to the redirect uri. A special value of
+ * // urn:ietf:wg:oauth:2.0:oob means that authorization code should be
+ * // returned in the title bar of the browser, with the page text prompting
+ * // the user to copy the code and paste it in the application.
+ * authorizationCode: 'placeholder-value',
+ * // Required. The BigQuery project id where the transfer configuration should be created.
+ * // Must be in the format projects/{project_id}/locations/{location_id} or
+ * // projects/{project_id}. If specified location and location of the
+ * // destination bigquery dataset do not match - the request will fail.
+ * parent: 'projects/my-project/locations/my-location',
+ * // Optional service account name. If this field is set, transfer config will
+ * // be created with this service account credentials. It requires that
+ * // requesting user calling this API has permissions to act as this service
+ * // account.
+ * serviceAccountName: 'placeholder-value',
+ * // Optional version info. If users want to find a very recent access token,
+ * // that is, immediately after approving access, users have to set the
+ * // version_info claim in the token request. To obtain the version_info, users
+ * // must use the "none+gsession" response type. which be return a
+ * // version_info back in the authorization response which be be put in a JWT
+ * // claim in the token request.
+ * versionInfo: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "dataRefreshWindowDays": 0,
+ * // "dataSourceId": "my_dataSourceId",
+ * // "datasetRegion": "my_datasetRegion",
+ * // "destinationDatasetId": "my_destinationDatasetId",
+ * // "disabled": false,
+ * // "displayName": "my_displayName",
+ * // "emailPreferences": {},
+ * // "name": "my_name",
+ * // "nextRunTime": "my_nextRunTime",
+ * // "notificationPubsubTopic": "my_notificationPubsubTopic",
+ * // "params": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleOptions": {},
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "userId": "my_userId"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dataRefreshWindowDays": 0,
+ * // "dataSourceId": "my_dataSourceId",
+ * // "datasetRegion": "my_datasetRegion",
+ * // "destinationDatasetId": "my_destinationDatasetId",
+ * // "disabled": false,
+ * // "displayName": "my_displayName",
+ * // "emailPreferences": {},
+ * // "name": "my_name",
+ * // "nextRunTime": "my_nextRunTime",
+ * // "notificationPubsubTopic": "my_notificationPubsubTopic",
+ * // "params": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleOptions": {},
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.locations.transferConfigs.create
* @memberOf! ()
*
@@ -1503,6 +2065,52 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.locations.transferConfigs.delete
* @desc Deletes a data transfer configuration, including any associated transfer runs and logs.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.locations.transferConfigs.delete(
+ * {
+ * // Required. The field will contain name of the resource requested, for example:
+ * // `projects/{project_id}/transferConfigs/{config_id}` or
+ * // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
+ * name:
+ * 'projects/my-project/locations/my-location/transferConfigs/my-transferConfig',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.locations.transferConfigs.delete
* @memberOf! ()
*
@@ -1573,6 +2181,71 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.locations.transferConfigs.get
* @desc Returns information about a data transfer config.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.locations.transferConfigs.get(
+ * {
+ * // Required. The field will contain name of the resource requested, for example:
+ * // `projects/{project_id}/transferConfigs/{config_id}` or
+ * // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
+ * name:
+ * 'projects/my-project/locations/my-location/transferConfigs/my-transferConfig',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dataRefreshWindowDays": 0,
+ * // "dataSourceId": "my_dataSourceId",
+ * // "datasetRegion": "my_datasetRegion",
+ * // "destinationDatasetId": "my_destinationDatasetId",
+ * // "disabled": false,
+ * // "displayName": "my_displayName",
+ * // "emailPreferences": {},
+ * // "name": "my_name",
+ * // "nextRunTime": "my_nextRunTime",
+ * // "notificationPubsubTopic": "my_notificationPubsubTopic",
+ * // "params": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleOptions": {},
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.locations.transferConfigs.get
* @memberOf! ()
*
@@ -1645,6 +2318,66 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.locations.transferConfigs.list
* @desc Returns information about all data transfers in the project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.locations.transferConfigs.list(
+ * {
+ * // When specified, only configurations of requested data sources are returned.
+ * dataSourceIds: 'placeholder-value',
+ * // Page size. The default page size is the maximum value of 1000 results.
+ * pageSize: 'placeholder-value',
+ * // Pagination token, which can be used to request a specific page
+ * // of `ListTransfersRequest` list results. For multiple-page
+ * // results, `ListTransfersResponse` outputs
+ * // a `next_page` token, which can be used as the
+ * // `page_token` value to request the next page of list results.
+ * pageToken: 'placeholder-value',
+ * // Required. The BigQuery project id for which data sources
+ * // should be returned: `projects/{project_id}` or
+ * // `projects/{project_id}/locations/{location_id}`
+ * parent: 'projects/my-project/locations/my-location',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "transferConfigs": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.locations.transferConfigs.list
* @memberOf! ()
*
@@ -1730,6 +2463,125 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.locations.transferConfigs.patch
* @desc Updates a data transfer configuration. All fields must be set, even if they are not updated.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.locations.transferConfigs.patch(
+ * {
+ * // Optional OAuth2 authorization code to use with this transfer configuration.
+ * // If it is provided, the transfer configuration will be associated with the
+ * // authorizing user.
+ * // In order to obtain authorization_code, please make a
+ * // request to
+ * // https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=&scope=&redirect_uri=
+ * //
+ * // * client_id should be OAuth client_id of BigQuery DTS API for the given
+ * // data source returned by ListDataSources method.
+ * // * data_source_scopes are the scopes returned by ListDataSources method.
+ * // * redirect_uri is an optional parameter. If not specified, then
+ * // authorization code is posted to the opener of authorization flow window.
+ * // Otherwise it will be sent to the redirect uri. A special value of
+ * // urn:ietf:wg:oauth:2.0:oob means that authorization code should be
+ * // returned in the title bar of the browser, with the page text prompting
+ * // the user to copy the code and paste it in the application.
+ * authorizationCode: 'placeholder-value',
+ * // The resource name of the transfer config.
+ * // Transfer config names have the form of
+ * // `projects/{project_id}/locations/{region}/transferConfigs/{config_id}`.
+ * // The name is automatically generated based on the config_id specified in
+ * // CreateTransferConfigRequest along with project_id and region. If config_id
+ * // is not provided, usually a uuid, even though it is not guaranteed or
+ * // required, will be generated for config_id.
+ * name:
+ * 'projects/my-project/locations/my-location/transferConfigs/my-transferConfig',
+ * // Optional service account name. If this field is set and
+ * // "service_account_name" is set in update_mask, transfer config will be
+ * // updated to use this service account credentials. It requires that
+ * // requesting user calling this API has permissions to act as this service
+ * // account.
+ * serviceAccountName: 'placeholder-value',
+ * // Required. Required list of fields to be updated in this request.
+ * updateMask: 'placeholder-value',
+ * // Optional version info. If users want to find a very recent access token,
+ * // that is, immediately after approving access, users have to set the
+ * // version_info claim in the token request. To obtain the version_info, users
+ * // must use the "none+gsession" response type. which be return a
+ * // version_info back in the authorization response which be be put in a JWT
+ * // claim in the token request.
+ * versionInfo: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "dataRefreshWindowDays": 0,
+ * // "dataSourceId": "my_dataSourceId",
+ * // "datasetRegion": "my_datasetRegion",
+ * // "destinationDatasetId": "my_destinationDatasetId",
+ * // "disabled": false,
+ * // "displayName": "my_displayName",
+ * // "emailPreferences": {},
+ * // "name": "my_name",
+ * // "nextRunTime": "my_nextRunTime",
+ * // "notificationPubsubTopic": "my_notificationPubsubTopic",
+ * // "params": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleOptions": {},
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "userId": "my_userId"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dataRefreshWindowDays": 0,
+ * // "dataSourceId": "my_dataSourceId",
+ * // "datasetRegion": "my_datasetRegion",
+ * // "destinationDatasetId": "my_destinationDatasetId",
+ * // "disabled": false,
+ * // "displayName": "my_displayName",
+ * // "emailPreferences": {},
+ * // "name": "my_name",
+ * // "nextRunTime": "my_nextRunTime",
+ * // "notificationPubsubTopic": "my_notificationPubsubTopic",
+ * // "params": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleOptions": {},
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.locations.transferConfigs.patch
* @memberOf! ()
*
@@ -1807,6 +2659,63 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.locations.transferConfigs.scheduleRuns
* @desc Creates transfer runs for a time range [start_time, end_time]. For each date - or whatever granularity the data source supports - in the range, one transfer run is created. Note that runs are created per UTC time in the time range. DEPRECATED: use StartManualTransferRuns instead.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.locations.transferConfigs.scheduleRuns(
+ * {
+ * // Required. Transfer configuration name in the form:
+ * // `projects/{project_id}/transferConfigs/{config_id}` or
+ * // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
+ * parent:
+ * 'projects/my-project/locations/my-location/transferConfigs/my-transferConfig',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "endTime": "my_endTime",
+ * // "startTime": "my_startTime"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "runs": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.locations.transferConfigs.scheduleRuns
* @memberOf! ()
*
@@ -1892,6 +2801,63 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.locations.transferConfigs.startManualRuns
* @desc Start manual transfer runs to be executed now with schedule_time equal to current time. The transfer runs can be created for a time range where the run_time is between start_time (inclusive) and end_time (exclusive), or for a specific run_time.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.locations.transferConfigs.startManualRuns(
+ * {
+ * // Transfer configuration name in the form:
+ * // `projects/{project_id}/transferConfigs/{config_id}` or
+ * // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
+ * parent:
+ * 'projects/my-project/locations/my-location/transferConfigs/my-transferConfig',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "requestedRunTime": "my_requestedRunTime",
+ * // "requestedTimeRange": {}
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "runs": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.locations.transferConfigs.startManualRuns
* @memberOf! ()
*
@@ -2133,6 +3099,52 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.locations.transferConfigs.runs.delete
* @desc Deletes the specified transfer run.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.locations.transferConfigs.runs.delete(
+ * {
+ * // Required. The field will contain name of the resource requested, for example:
+ * // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
+ * // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
+ * name:
+ * 'projects/my-project/locations/my-location/transferConfigs/my-transferConfig/runs/my-run',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.locations.transferConfigs.runs.delete
* @memberOf! ()
*
@@ -2203,6 +3215,70 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.locations.transferConfigs.runs.get
* @desc Returns information about the particular transfer run.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.locations.transferConfigs.runs.get(
+ * {
+ * // Required. The field will contain name of the resource requested, for example:
+ * // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
+ * // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
+ * name:
+ * 'projects/my-project/locations/my-location/transferConfigs/my-transferConfig/runs/my-run',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dataSourceId": "my_dataSourceId",
+ * // "destinationDatasetId": "my_destinationDatasetId",
+ * // "emailPreferences": {},
+ * // "endTime": "my_endTime",
+ * // "errorStatus": {},
+ * // "name": "my_name",
+ * // "notificationPubsubTopic": "my_notificationPubsubTopic",
+ * // "params": {},
+ * // "runTime": "my_runTime",
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "startTime": "my_startTime",
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.locations.transferConfigs.runs.get
* @memberOf! ()
*
@@ -2275,6 +3351,70 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.locations.transferConfigs.runs.list
* @desc Returns information about running and completed jobs.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.locations.transferConfigs.runs.list(
+ * {
+ * // Page size. The default page size is the maximum value of 1000 results.
+ * pageSize: 'placeholder-value',
+ * // Pagination token, which can be used to request a specific page
+ * // of `ListTransferRunsRequest` list results. For multiple-page
+ * // results, `ListTransferRunsResponse` outputs
+ * // a `next_page` token, which can be used as the
+ * // `page_token` value to request the next page of list results.
+ * pageToken: 'placeholder-value',
+ * // Required. Name of transfer configuration for which transfer runs should be retrieved.
+ * // Format of transfer configuration resource name is:
+ * // `projects/{project_id}/transferConfigs/{config_id}` or
+ * // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
+ * parent:
+ * 'projects/my-project/locations/my-location/transferConfigs/my-transferConfig',
+ * // Indicates how run attempts are to be pulled.
+ * runAttempt: 'placeholder-value',
+ * // When specified, only transfer runs with requested states are returned.
+ * states: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "transferRuns": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.locations.transferConfigs.runs.list
* @memberOf! ()
*
@@ -2413,6 +3553,68 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.locations.transferConfigs.runs.transferLogs.list
* @desc Returns user facing log messages for the data transfer run.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.locations.transferConfigs.runs.transferLogs.list(
+ * {
+ * // Message types to return. If not populated - INFO, WARNING and ERROR
+ * // messages are returned.
+ * messageTypes: 'placeholder-value',
+ * // Page size. The default page size is the maximum value of 1000 results.
+ * pageSize: 'placeholder-value',
+ * // Pagination token, which can be used to request a specific page
+ * // of `ListTransferLogsRequest` list results. For multiple-page
+ * // results, `ListTransferLogsResponse` outputs
+ * // a `next_page` token, which can be used as the
+ * // `page_token` value to request the next page of list results.
+ * pageToken: 'placeholder-value',
+ * // Required. Transfer run name in the form:
+ * // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
+ * // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
+ * parent:
+ * 'projects/my-project/locations/my-location/transferConfigs/my-transferConfig/runs/my-run',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "transferMessages": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.locations.transferConfigs.runs.transferLogs.list
* @memberOf! ()
*
@@ -2527,6 +3729,116 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.transferConfigs.create
* @desc Creates a new data transfer configuration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.transferConfigs.create({
+ * // Optional OAuth2 authorization code to use with this transfer configuration.
+ * // This is required if new credentials are needed, as indicated by
+ * // `CheckValidCreds`.
+ * // In order to obtain authorization_code, please make a
+ * // request to
+ * // https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=&scope=&redirect_uri=
+ * //
+ * // * client_id should be OAuth client_id of BigQuery DTS API for the given
+ * // data source returned by ListDataSources method.
+ * // * data_source_scopes are the scopes returned by ListDataSources method.
+ * // * redirect_uri is an optional parameter. If not specified, then
+ * // authorization code is posted to the opener of authorization flow window.
+ * // Otherwise it will be sent to the redirect uri. A special value of
+ * // urn:ietf:wg:oauth:2.0:oob means that authorization code should be
+ * // returned in the title bar of the browser, with the page text prompting
+ * // the user to copy the code and paste it in the application.
+ * authorizationCode: 'placeholder-value',
+ * // Required. The BigQuery project id where the transfer configuration should be created.
+ * // Must be in the format projects/{project_id}/locations/{location_id} or
+ * // projects/{project_id}. If specified location and location of the
+ * // destination bigquery dataset do not match - the request will fail.
+ * parent: 'projects/my-project',
+ * // Optional service account name. If this field is set, transfer config will
+ * // be created with this service account credentials. It requires that
+ * // requesting user calling this API has permissions to act as this service
+ * // account.
+ * serviceAccountName: 'placeholder-value',
+ * // Optional version info. If users want to find a very recent access token,
+ * // that is, immediately after approving access, users have to set the
+ * // version_info claim in the token request. To obtain the version_info, users
+ * // must use the "none+gsession" response type. which be return a
+ * // version_info back in the authorization response which be be put in a JWT
+ * // claim in the token request.
+ * versionInfo: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "dataRefreshWindowDays": 0,
+ * // "dataSourceId": "my_dataSourceId",
+ * // "datasetRegion": "my_datasetRegion",
+ * // "destinationDatasetId": "my_destinationDatasetId",
+ * // "disabled": false,
+ * // "displayName": "my_displayName",
+ * // "emailPreferences": {},
+ * // "name": "my_name",
+ * // "nextRunTime": "my_nextRunTime",
+ * // "notificationPubsubTopic": "my_notificationPubsubTopic",
+ * // "params": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleOptions": {},
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "userId": "my_userId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dataRefreshWindowDays": 0,
+ * // "dataSourceId": "my_dataSourceId",
+ * // "datasetRegion": "my_datasetRegion",
+ * // "destinationDatasetId": "my_destinationDatasetId",
+ * // "disabled": false,
+ * // "displayName": "my_displayName",
+ * // "emailPreferences": {},
+ * // "name": "my_name",
+ * // "nextRunTime": "my_nextRunTime",
+ * // "notificationPubsubTopic": "my_notificationPubsubTopic",
+ * // "params": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleOptions": {},
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.transferConfigs.create
* @memberOf! ()
*
@@ -2606,6 +3918,49 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.transferConfigs.delete
* @desc Deletes a data transfer configuration, including any associated transfer runs and logs.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.transferConfigs.delete({
+ * // Required. The field will contain name of the resource requested, for example:
+ * // `projects/{project_id}/transferConfigs/{config_id}` or
+ * // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
+ * name: 'projects/my-project/transferConfigs/my-transferConfig',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.transferConfigs.delete
* @memberOf! ()
*
@@ -2676,6 +4031,68 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.transferConfigs.get
* @desc Returns information about a data transfer config.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.transferConfigs.get({
+ * // Required. The field will contain name of the resource requested, for example:
+ * // `projects/{project_id}/transferConfigs/{config_id}` or
+ * // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
+ * name: 'projects/my-project/transferConfigs/my-transferConfig',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dataRefreshWindowDays": 0,
+ * // "dataSourceId": "my_dataSourceId",
+ * // "datasetRegion": "my_datasetRegion",
+ * // "destinationDatasetId": "my_destinationDatasetId",
+ * // "disabled": false,
+ * // "displayName": "my_displayName",
+ * // "emailPreferences": {},
+ * // "name": "my_name",
+ * // "nextRunTime": "my_nextRunTime",
+ * // "notificationPubsubTopic": "my_notificationPubsubTopic",
+ * // "params": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleOptions": {},
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.transferConfigs.get
* @memberOf! ()
*
@@ -2748,6 +4165,64 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.transferConfigs.list
* @desc Returns information about all data transfers in the project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.transferConfigs.list({
+ * // When specified, only configurations of requested data sources are returned.
+ * dataSourceIds: 'placeholder-value',
+ * // Page size. The default page size is the maximum value of 1000 results.
+ * pageSize: 'placeholder-value',
+ * // Pagination token, which can be used to request a specific page
+ * // of `ListTransfersRequest` list results. For multiple-page
+ * // results, `ListTransfersResponse` outputs
+ * // a `next_page` token, which can be used as the
+ * // `page_token` value to request the next page of list results.
+ * pageToken: 'placeholder-value',
+ * // Required. The BigQuery project id for which data sources
+ * // should be returned: `projects/{project_id}` or
+ * // `projects/{project_id}/locations/{location_id}`
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "transferConfigs": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.transferConfigs.list
* @memberOf! ()
*
@@ -2833,6 +4308,122 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.transferConfigs.patch
* @desc Updates a data transfer configuration. All fields must be set, even if they are not updated.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.transferConfigs.patch({
+ * // Optional OAuth2 authorization code to use with this transfer configuration.
+ * // If it is provided, the transfer configuration will be associated with the
+ * // authorizing user.
+ * // In order to obtain authorization_code, please make a
+ * // request to
+ * // https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=&scope=&redirect_uri=
+ * //
+ * // * client_id should be OAuth client_id of BigQuery DTS API for the given
+ * // data source returned by ListDataSources method.
+ * // * data_source_scopes are the scopes returned by ListDataSources method.
+ * // * redirect_uri is an optional parameter. If not specified, then
+ * // authorization code is posted to the opener of authorization flow window.
+ * // Otherwise it will be sent to the redirect uri. A special value of
+ * // urn:ietf:wg:oauth:2.0:oob means that authorization code should be
+ * // returned in the title bar of the browser, with the page text prompting
+ * // the user to copy the code and paste it in the application.
+ * authorizationCode: 'placeholder-value',
+ * // The resource name of the transfer config.
+ * // Transfer config names have the form of
+ * // `projects/{project_id}/locations/{region}/transferConfigs/{config_id}`.
+ * // The name is automatically generated based on the config_id specified in
+ * // CreateTransferConfigRequest along with project_id and region. If config_id
+ * // is not provided, usually a uuid, even though it is not guaranteed or
+ * // required, will be generated for config_id.
+ * name: 'projects/my-project/transferConfigs/my-transferConfig',
+ * // Optional service account name. If this field is set and
+ * // "service_account_name" is set in update_mask, transfer config will be
+ * // updated to use this service account credentials. It requires that
+ * // requesting user calling this API has permissions to act as this service
+ * // account.
+ * serviceAccountName: 'placeholder-value',
+ * // Required. Required list of fields to be updated in this request.
+ * updateMask: 'placeholder-value',
+ * // Optional version info. If users want to find a very recent access token,
+ * // that is, immediately after approving access, users have to set the
+ * // version_info claim in the token request. To obtain the version_info, users
+ * // must use the "none+gsession" response type. which be return a
+ * // version_info back in the authorization response which be be put in a JWT
+ * // claim in the token request.
+ * versionInfo: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "dataRefreshWindowDays": 0,
+ * // "dataSourceId": "my_dataSourceId",
+ * // "datasetRegion": "my_datasetRegion",
+ * // "destinationDatasetId": "my_destinationDatasetId",
+ * // "disabled": false,
+ * // "displayName": "my_displayName",
+ * // "emailPreferences": {},
+ * // "name": "my_name",
+ * // "nextRunTime": "my_nextRunTime",
+ * // "notificationPubsubTopic": "my_notificationPubsubTopic",
+ * // "params": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleOptions": {},
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "userId": "my_userId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dataRefreshWindowDays": 0,
+ * // "dataSourceId": "my_dataSourceId",
+ * // "datasetRegion": "my_datasetRegion",
+ * // "destinationDatasetId": "my_destinationDatasetId",
+ * // "disabled": false,
+ * // "displayName": "my_displayName",
+ * // "emailPreferences": {},
+ * // "name": "my_name",
+ * // "nextRunTime": "my_nextRunTime",
+ * // "notificationPubsubTopic": "my_notificationPubsubTopic",
+ * // "params": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleOptions": {},
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.transferConfigs.patch
* @memberOf! ()
*
@@ -2910,6 +4501,60 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.transferConfigs.scheduleRuns
* @desc Creates transfer runs for a time range [start_time, end_time]. For each date - or whatever granularity the data source supports - in the range, one transfer run is created. Note that runs are created per UTC time in the time range. DEPRECATED: use StartManualTransferRuns instead.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.transferConfigs.scheduleRuns({
+ * // Required. Transfer configuration name in the form:
+ * // `projects/{project_id}/transferConfigs/{config_id}` or
+ * // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
+ * parent: 'projects/my-project/transferConfigs/my-transferConfig',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "endTime": "my_endTime",
+ * // "startTime": "my_startTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "runs": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.transferConfigs.scheduleRuns
* @memberOf! ()
*
@@ -2995,6 +4640,62 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.transferConfigs.startManualRuns
* @desc Start manual transfer runs to be executed now with schedule_time equal to current time. The transfer runs can be created for a time range where the run_time is between start_time (inclusive) and end_time (exclusive), or for a specific run_time.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.transferConfigs.startManualRuns(
+ * {
+ * // Transfer configuration name in the form:
+ * // `projects/{project_id}/transferConfigs/{config_id}` or
+ * // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
+ * parent: 'projects/my-project/transferConfigs/my-transferConfig',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "requestedRunTime": "my_requestedRunTime",
+ * // "requestedTimeRange": {}
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "runs": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.transferConfigs.startManualRuns
* @memberOf! ()
*
@@ -3236,6 +4937,49 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.transferConfigs.runs.delete
* @desc Deletes the specified transfer run.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.transferConfigs.runs.delete({
+ * // Required. The field will contain name of the resource requested, for example:
+ * // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
+ * // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
+ * name: 'projects/my-project/transferConfigs/my-transferConfig/runs/my-run',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.transferConfigs.runs.delete
* @memberOf! ()
*
@@ -3306,6 +5050,67 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.transferConfigs.runs.get
* @desc Returns information about the particular transfer run.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.transferConfigs.runs.get({
+ * // Required. The field will contain name of the resource requested, for example:
+ * // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
+ * // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
+ * name: 'projects/my-project/transferConfigs/my-transferConfig/runs/my-run',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dataSourceId": "my_dataSourceId",
+ * // "destinationDatasetId": "my_destinationDatasetId",
+ * // "emailPreferences": {},
+ * // "endTime": "my_endTime",
+ * // "errorStatus": {},
+ * // "name": "my_name",
+ * // "notificationPubsubTopic": "my_notificationPubsubTopic",
+ * // "params": {},
+ * // "runTime": "my_runTime",
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "startTime": "my_startTime",
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.transferConfigs.runs.get
* @memberOf! ()
*
@@ -3378,6 +5183,67 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.transferConfigs.runs.list
* @desc Returns information about running and completed jobs.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.transferConfigs.runs.list({
+ * // Page size. The default page size is the maximum value of 1000 results.
+ * pageSize: 'placeholder-value',
+ * // Pagination token, which can be used to request a specific page
+ * // of `ListTransferRunsRequest` list results. For multiple-page
+ * // results, `ListTransferRunsResponse` outputs
+ * // a `next_page` token, which can be used as the
+ * // `page_token` value to request the next page of list results.
+ * pageToken: 'placeholder-value',
+ * // Required. Name of transfer configuration for which transfer runs should be retrieved.
+ * // Format of transfer configuration resource name is:
+ * // `projects/{project_id}/transferConfigs/{config_id}` or
+ * // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
+ * parent: 'projects/my-project/transferConfigs/my-transferConfig',
+ * // Indicates how run attempts are to be pulled.
+ * runAttempt: 'placeholder-value',
+ * // When specified, only transfer runs with requested states are returned.
+ * states: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "transferRuns": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.transferConfigs.runs.list
* @memberOf! ()
*
@@ -3516,6 +5382,68 @@ export namespace bigquerydatatransfer_v1 {
/**
* bigquerydatatransfer.projects.transferConfigs.runs.transferLogs.list
* @desc Returns user facing log messages for the data transfer run.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigquerydatatransfer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigquerydatatransfer = google.bigquerydatatransfer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/bigquery.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigquerydatatransfer.projects.transferConfigs.runs.transferLogs.list(
+ * {
+ * // Message types to return. If not populated - INFO, WARNING and ERROR
+ * // messages are returned.
+ * messageTypes: 'placeholder-value',
+ * // Page size. The default page size is the maximum value of 1000 results.
+ * pageSize: 'placeholder-value',
+ * // Pagination token, which can be used to request a specific page
+ * // of `ListTransferLogsRequest` list results. For multiple-page
+ * // results, `ListTransferLogsResponse` outputs
+ * // a `next_page` token, which can be used as the
+ * // `page_token` value to request the next page of list results.
+ * pageToken: 'placeholder-value',
+ * // Required. Transfer run name in the form:
+ * // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
+ * // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
+ * parent:
+ * 'projects/my-project/transferConfigs/my-transferConfig/runs/my-run',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "transferMessages": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigquerydatatransfer.projects.transferConfigs.runs.transferLogs.list
* @memberOf! ()
*
diff --git a/src/apis/bigqueryreservation/v1.ts b/src/apis/bigqueryreservation/v1.ts
index 6e9806102b7..33a6026e686 100644
--- a/src/apis/bigqueryreservation/v1.ts
+++ b/src/apis/bigqueryreservation/v1.ts
@@ -373,6 +373,47 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.operations.delete
* @desc Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.operations.delete({
+ * // The name of the operation resource to be deleted.
+ * name: 'operations/.*',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.operations.delete
* @memberOf! ()
*
@@ -443,6 +484,56 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.operations.list
* @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.operations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The name of the operation's parent resource.
+ * name: 'operations',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.operations.list
* @memberOf! ()
*
@@ -579,6 +670,52 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.getBiReservation
* @desc Retrieves a BI reservation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.getBiReservation({
+ * // Required. Name of the requested reservation, for example:
+ * // `projects/{project_id}/locations/{location_id}/bireservation`
+ * name: 'projects/my-project/locations/my-location/biReservation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name",
+ * // "size": "my_size",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.getBiReservation
* @memberOf! ()
*
@@ -653,6 +790,61 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.searchAssignments
* @desc Looks up assignments for a specified resource for a particular region. If the request is about a project: 1) Assignments created on the project will be returned if they exist. 2) Otherwise assignments created on the closest ancestor will be returned. 3) Assignments for different JobTypes will all be returned. Same logic applies if the request is about a folder. If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors). Comparing to ListAssignments, there are some behavior differences: 1) permission on the assignee will be verified in this API. 2) Hierarchy lookup (project->folder->organization) happens in this API. 3) Parent here is projects/x/locations/x, instead of projects/x/locations/xreservations/x. Note "-" cannot be used for projects nor locations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.searchAssignments({
+ * // The maximum number of items to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name of the admin project(containing project and location),
+ * // e.g.:
+ * // "projects/myproject/locations/US".
+ * parent: 'projects/my-project/locations/my-location',
+ * // Please specify resource name as assignee in the query.
+ * // e.g., "assignee=projects/myproject"
+ * // "assignee=folders/123"
+ * // "assignee=organizations/456"
+ * query: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assignments": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.searchAssignments
* @memberOf! ()
*
@@ -738,6 +930,65 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.updateBiReservation
* @desc Updates a BI reservation. Only fields specified in the field_mask are updated. Singleton BI reservation always exists with default size 0. In order to reserve BI capacity it needs to be updated to an amount greater than 0. In order to release BI capacity reservation size must be set to 0.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.updateBiReservation({
+ * // The resource name of the singleton BI reservation.
+ * // Reservation names have the form
+ * // `projects/{project_id}/locations/{location_id}/bireservation`.
+ * name: 'projects/my-project/locations/my-location/biReservation',
+ * // A list of fields to be updated in this request.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "name": "my_name",
+ * // "size": "my_size",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name",
+ * // "size": "my_size",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.updateBiReservation
* @memberOf! ()
*
@@ -879,6 +1130,75 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.capacityCommitments.create
* @desc Creates a new capacity commitment resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.capacityCommitments.create(
+ * {
+ * // If true, fail the request if another project in the organization has a
+ * // capacity commitment.
+ * enforceSingleAdminProjectPerOrg: 'placeholder-value',
+ * // Required. Resource name of the parent reservation. E.g.,
+ * // projects/myproject/locations/US
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "commitmentEndTime": "my_commitmentEndTime",
+ * // "failureStatus": {},
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "renewalPlan": "my_renewalPlan",
+ * // "slotCount": "my_slotCount",
+ * // "state": "my_state"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commitmentEndTime": "my_commitmentEndTime",
+ * // "failureStatus": {},
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "renewalPlan": "my_renewalPlan",
+ * // "slotCount": "my_slotCount",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.capacityCommitments.create
* @memberOf! ()
*
@@ -956,6 +1276,51 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.capacityCommitments.delete
* @desc Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.capacityCommitments.delete(
+ * {
+ * // Required. Resource name of the capacity commitment to delete. E.g.,
+ * // projects/myproject/locations/US/capacityCommitments/123
+ * name:
+ * 'projects/my-project/locations/my-location/capacityCommitments/my-capacityCommitment',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.capacityCommitments.delete
* @memberOf! ()
*
@@ -1026,6 +1391,59 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.capacityCommitments.get
* @desc Returns information about the capacity commitment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.capacityCommitments.get(
+ * {
+ * // Required. Resource name of the capacity commitment to retrieve. E.g.,
+ * // projects/myproject/locations/US/capacityCommitments/123
+ * name:
+ * 'projects/my-project/locations/my-location/capacityCommitments/my-capacityCommitment',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commitmentEndTime": "my_commitmentEndTime",
+ * // "failureStatus": {},
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "renewalPlan": "my_renewalPlan",
+ * // "slotCount": "my_slotCount",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.capacityCommitments.get
* @memberOf! ()
*
@@ -1098,6 +1516,57 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.capacityCommitments.list
* @desc Lists all the capacity commitments for the admin project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.capacityCommitments.list(
+ * {
+ * // The maximum number of items to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // Required. Resource name of the parent reservation. E.g.,
+ * // projects/myproject/locations/US
+ * parent: 'projects/my-project/locations/my-location',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "capacityCommitments": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.capacityCommitments.list
* @memberOf! ()
*
@@ -1184,6 +1653,66 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.capacityCommitments.merge
* @desc Merges capacity commitments of the same plan into one. Resulting capacity commitment has the longer commitment_end_time out of the two. Attempting to merge capacity commitments of different plan will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.capacityCommitments.merge(
+ * {
+ * // Parent resource that identifies admin project and location e.g.,
+ * // projects/myproject/locations/us
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "capacityCommitmentIds": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commitmentEndTime": "my_commitmentEndTime",
+ * // "failureStatus": {},
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "renewalPlan": "my_renewalPlan",
+ * // "slotCount": "my_slotCount",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.capacityCommitments.merge
* @memberOf! ()
*
@@ -1260,6 +1789,75 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.capacityCommitments.patch
* @desc Updates an existing capacity commitment. Only plan and renewal_plan fields can be updated. Plan can only be changed to a plan of a longer commitment period. Attempting to change to a plan with shorter commitment period will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.capacityCommitments.patch(
+ * {
+ * // Output only. The resource name of the capacity commitment, e.g.,
+ * // projects/myproject/locations/US/capacityCommitments/123
+ * name:
+ * 'projects/my-project/locations/my-location/capacityCommitments/my-capacityCommitment',
+ * // Standard field mask for the set of fields to be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "commitmentEndTime": "my_commitmentEndTime",
+ * // "failureStatus": {},
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "renewalPlan": "my_renewalPlan",
+ * // "slotCount": "my_slotCount",
+ * // "state": "my_state"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commitmentEndTime": "my_commitmentEndTime",
+ * // "failureStatus": {},
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "renewalPlan": "my_renewalPlan",
+ * // "slotCount": "my_slotCount",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.capacityCommitments.patch
* @memberOf! ()
*
@@ -1334,6 +1932,62 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.capacityCommitments.split
* @desc Splits capacity commitment to two commitments of the same plan and commitment_end_time. A common use case to do that is to perform a downgrade e.g., in order to downgrade from 10000 slots to 8000, one might split 10000 capacity commitment to 2000 and 8000, change the plan of the first one to flex and then delete it.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.capacityCommitments.split(
+ * {
+ * // Required. The resource name e.g.,:
+ * // projects/myproject/locations/US/capacityCommitments/123
+ * name:
+ * 'projects/my-project/locations/my-location/capacityCommitments/my-capacityCommitment',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "slotCount": "my_slotCount"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "first": {},
+ * // "second": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.capacityCommitments.split
* @memberOf! ()
*
@@ -1548,6 +2202,65 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.reservations.create
* @desc Creates a new reservation resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.create({
+ * // Required. Project, location. E.g.,
+ * // projects/myproject/locations/US
+ * parent: 'projects/my-project/locations/my-location',
+ * // The reservation ID. This field must only contain lower case alphanumeric
+ * // characters or dash. Max length is 64 characters.
+ * reservationId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "ignoreIdleSlots": false,
+ * // "name": "my_name",
+ * // "slotCapacity": "my_slotCapacity"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "ignoreIdleSlots": false,
+ * // "name": "my_name",
+ * // "slotCapacity": "my_slotCapacity"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.create
* @memberOf! ()
*
@@ -1625,6 +2338,49 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.reservations.delete
* @desc Deletes a reservation. Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has assignments.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.delete({
+ * // Required. Resource name of the reservation to retrieve. E.g.,
+ * // projects/myproject/locations/US/reservations/team1-prod
+ * name:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.delete
* @memberOf! ()
*
@@ -1695,6 +2451,53 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.reservations.get
* @desc Returns information about the reservation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.get({
+ * // Required. Resource name of the reservation to retrieve. E.g.,
+ * // projects/myproject/locations/US/reservations/team1-prod
+ * name:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "ignoreIdleSlots": false,
+ * // "name": "my_name",
+ * // "slotCapacity": "my_slotCapacity"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.get
* @memberOf! ()
*
@@ -1767,6 +2570,55 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.reservations.list
* @desc Lists all the reservations for the project in the specified location.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.list({
+ * // The maximum number of items to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // Required. The parent resource name containing project and location, e.g.:
+ * // "projects/myproject/locations/US"
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "reservations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.list
* @memberOf! ()
*
@@ -1846,6 +2698,65 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.reservations.patch
* @desc Updates an existing reservation resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.patch({
+ * // The resource name of the reservation, e.g.,
+ * // "projects/x/locations/x/reservations/team1-prod".
+ * name:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation',
+ * // Standard field mask for the set of fields to be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "ignoreIdleSlots": false,
+ * // "name": "my_name",
+ * // "slotCapacity": "my_slotCapacity"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "ignoreIdleSlots": false,
+ * // "name": "my_name",
+ * // "slotCapacity": "my_slotCapacity"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.patch
* @memberOf! ()
*
@@ -2014,6 +2925,67 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.reservations.assignments.create
* @desc Creates an object which allows the given project to submit jobs of a certain type using slots from the specified reservation. Currently a resource (project, folder, organization) can only have one assignment per {job_type, location}, and that reservation will be used for all jobs of the matching type. Within the organization, different assignments can be created on projects, folders or organization level. During query execution, the assignment is looked up at the project, folder and organization levels in that order. The first assignment found is applied to the query. When creating assignments, it does not matter if other assignments exist at higher levels. E.g: organizationA contains project1, project2. Assignments for organizationA, project1 and project2 could all be created, mapping to the same or different reservations. Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have 'bigquery.admin' permissions on the project using the reservation and the project that owns this reservation. Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment does not match location of the reservation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.assignments.create(
+ * {
+ * // Required. The parent resource name of the assignment
+ * // E.g.: projects/myproject/locations/US/reservations/team1-prod
+ * parent:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "assignee": "my_assignee",
+ * // "jobType": "my_jobType",
+ * // "name": "my_name",
+ * // "state": "my_state"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assignee": "my_assignee",
+ * // "jobType": "my_jobType",
+ * // "name": "my_name",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.assignments.create
* @memberOf! ()
*
@@ -2090,6 +3062,51 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.reservations.assignments.delete
* @desc Deletes a assignment. No expansion will happen. E.g: organizationA contains project1 and project2. Reservation res1 exists. CreateAssignment was invoked previously and following assignments were created explicitly: Then deletion of won't affect . After deletion of , queries from project1 will still use res1, while queries from project2 will use on-demand mode.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.assignments.delete(
+ * {
+ * // Required. Name of the resource, e.g.:
+ * // projects/myproject/locations/US/reservations/team1-prod/assignments/123
+ * name:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation/assignments/my-assignment',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.assignments.delete
* @memberOf! ()
*
@@ -2160,6 +3177,60 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.reservations.assignments.list
* @desc Lists assignments. Only explicitly created assignments will be returned. E.g: organizationA contains project1 and project2. Reservation res1 exists. CreateAssignment was invoked previously and following assignments were created explicitly: Then this API will just return the above two assignments for reservation res1, and no expansion/merge will happen. Wildcard "-" can be used for reservations in the request. In that case all assignments belongs to the specified project and location will be listed. Note "-" cannot be used for projects nor locations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.assignments.list(
+ * {
+ * // The maximum number of items to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // Required. The parent resource name e.g.:
+ * // projects/myproject/locations/US/reservations/team1-prod
+ * // Or:
+ * // projects/myproject/locations/US/reservations/-
+ * parent:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assignments": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.assignments.list
* @memberOf! ()
*
@@ -2239,6 +3310,65 @@ export namespace bigqueryreservation_v1 {
/**
* bigqueryreservation.projects.locations.reservations.assignments.move
* @desc Moves a assignment under a new reservation. Customers can do this by deleting the existing assignment followed by creating another assignment under the new reservation, but this method provides a transactional way to do so, to make sure the assignee always has an associated reservation. Without the method customers might see some queries run on-demand which might be unexpected.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.assignments.move(
+ * {
+ * // Required. The resource name of the assignment,
+ * // e.g.:
+ * // projects/myproject/locations/US/reservations/team1-prod/assignments/123
+ * name:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation/assignments/my-assignment',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "destinationId": "my_destinationId"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assignee": "my_assignee",
+ * // "jobType": "my_jobType",
+ * // "name": "my_name",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.assignments.move
* @memberOf! ()
*
diff --git a/src/apis/bigqueryreservation/v1alpha2.ts b/src/apis/bigqueryreservation/v1alpha2.ts
index 32ef13c2adc..687aecfc76a 100644
--- a/src/apis/bigqueryreservation/v1alpha2.ts
+++ b/src/apis/bigqueryreservation/v1alpha2.ts
@@ -322,6 +322,63 @@ export namespace bigqueryreservation_v1alpha2 {
/**
* bigqueryreservation.projects.locations.searchReservationGrants
* @desc Look up grants for a specified resource for a particular region. If the request is about a project: 1) Grants created on the project will be returned if they exist. 2) Otherwise grants created on the closest ancestor will be returned. 3) Grants for different JobTypes will all be returned. Same logic applies if the request is about a folder. If the request is about an organization, then grants created on the organization will be returned (organization doesn't have ancestors). Comparing to ListReservationGrants, there are two behavior differences: 1) permission on the grantee will be verified in this API. 2) Hierarchy lookup (project->folder->organization) happens in this API.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.searchReservationGrants(
+ * {
+ * // The maximum number of items to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // The parent resource name (containing project and location), which owns the
+ * // grants. e.g.:
+ * // "projects/myproject/locations/us-central1".
+ * parent: 'projects/my-project/locations/my-location',
+ * // Please specify resource name as grantee in the query.
+ * // e.g., "grantee=projects/myproject"
+ * // "grantee=folders/123"
+ * // "grantee=organizations/456"
+ * query: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "reservationGrants": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.searchReservationGrants
* @memberOf! ()
*
@@ -440,6 +497,47 @@ export namespace bigqueryreservation_v1alpha2 {
/**
* bigqueryreservation.projects.locations.operations.cancel
* @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.operations.cancel({
+ * // The name of the operation resource to be cancelled.
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.operations.cancel
* @memberOf! ()
*
@@ -513,6 +611,53 @@ export namespace bigqueryreservation_v1alpha2 {
/**
* bigqueryreservation.projects.locations.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.operations.get({
+ * // The name of the operation resource.
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.operations.get
* @memberOf! ()
*
@@ -617,6 +762,68 @@ export namespace bigqueryreservation_v1alpha2 {
/**
* bigqueryreservation.projects.locations.reservationGrants.create
* @desc Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have 'bigquery.admin' permissions on the project using the reservation and the project that owns this reservation. Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the grant does not match location of the reservation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservationGrants.create(
+ * {
+ * // The parent resource name of the reservation grant
+ * // E.g.: projects/myproject/location/eu.
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "grantee": "my_grantee",
+ * // "jobType": "my_jobType",
+ * // "name": "my_name",
+ * // "reservation": "my_reservation",
+ * // "state": "my_state"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "grantee": "my_grantee",
+ * // "jobType": "my_jobType",
+ * // "name": "my_name",
+ * // "reservation": "my_reservation",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservationGrants.create
* @memberOf! ()
*
@@ -693,6 +900,51 @@ export namespace bigqueryreservation_v1alpha2 {
/**
* bigqueryreservation.projects.locations.reservationGrants.delete
* @desc Deletes a reservation grant. No expansion will happen. E.g: organizationA contains project1 and project2. Reservation res1 exists. CreateReservationGrant was invoked previously and following grants were created explicitly: Then deletion of won't affect . After deletion of , queries from project1 will still use res1, while queries from project2 will use on-demand mode.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservationGrants.delete(
+ * {
+ * // Name of the resource, e.g.:
+ * // projects/myproject/locations/eu/reservationGrants/123
+ * name:
+ * 'projects/my-project/locations/my-location/reservationGrants/my-reservationGrant',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservationGrants.delete
* @memberOf! ()
*
@@ -763,6 +1015,56 @@ export namespace bigqueryreservation_v1alpha2 {
/**
* bigqueryreservation.projects.locations.reservationGrants.list
* @desc Lists reservation grants. Only explicitly created grants will be returned. E.g: organizationA contains project1 and project2. Reservation res1 exists. CreateReservationGrant was invoked previously and following grants were created explicitly: Then this API will just return the above two grants for reservation res1, and no expansion/merge will happen.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservationGrants.list(
+ * {
+ * // The maximum number of items to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // The parent resource name e.g.: projects/myproject/location/eu.
+ * parent: 'projects/my-project/locations/my-location',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "reservationGrants": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservationGrants.list
* @memberOf! ()
*
@@ -910,6 +1212,65 @@ export namespace bigqueryreservation_v1alpha2 {
/**
* bigqueryreservation.projects.locations.reservations.create
* @desc Creates a new reservation resource. Multiple reservations are created if the ancestor reservations do not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.create({
+ * // Project, location, and (optionally) reservation name. E.g.,
+ * // projects/myproject/locations/us-central1/reservations/parent
+ * parent: 'projects/my-project/locations/my-location',
+ * // The reservation ID relative to the parent, e.g., "dev". This field must
+ * // only contain alphanumeric characters.
+ * reservationId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "name": "my_name",
+ * // "slotCapacity": "my_slotCapacity",
+ * // "useParentReservation": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name",
+ * // "slotCapacity": "my_slotCapacity",
+ * // "useParentReservation": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.create
* @memberOf! ()
*
@@ -987,6 +1348,67 @@ export namespace bigqueryreservation_v1alpha2 {
/**
* bigqueryreservation.projects.locations.reservations.createReservation
* @desc Creates a new reservation resource. Multiple reservations are created if the ancestor reservations do not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.createReservation(
+ * {
+ * // Project, location, and (optionally) reservation name. E.g.,
+ * // projects/myproject/locations/us-central1/reservations/parent
+ * parent: 'projects/my-project/locations/my-location/reservations/.*',
+ * // The reservation ID relative to the parent, e.g., "dev". This field must
+ * // only contain alphanumeric characters.
+ * reservationId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "name": "my_name",
+ * // "slotCapacity": "my_slotCapacity",
+ * // "useParentReservation": false
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name",
+ * // "slotCapacity": "my_slotCapacity",
+ * // "useParentReservation": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.createReservation
* @memberOf! ()
*
@@ -1064,6 +1486,53 @@ export namespace bigqueryreservation_v1alpha2 {
/**
* bigqueryreservation.projects.locations.reservations.delete
* @desc Deletes a reservation. Returns `google.rpc.Code.FAILED_PRECONDITION` in the following cases: 1. When reservation has child reservations. This check can be bypassed by setting DeleteReservationRequest.force flag to true. 2. When top-level reservation with slot pools is being deleted.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.delete({
+ * // If true, deletes all the child reservations of the given reservation.
+ * // Otherwise, attempting to delete a reservation that has child
+ * // reservations will fail with error code
+ * // `google.rpc.Code.FAILED_PRECONDITION`.
+ * force: 'placeholder-value',
+ * // Resource name of the reservation to retrieve. E.g.,
+ * // projects/myproject/locations/us-central1/reservations/my_reservation
+ * name: 'projects/my-project/locations/my-location/reservations/.*',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.delete
* @memberOf! ()
*
@@ -1135,6 +1604,52 @@ export namespace bigqueryreservation_v1alpha2 {
/**
* bigqueryreservation.projects.locations.reservations.get
* @desc Returns information about the reservation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.get({
+ * // Resource name of the reservation to retrieve. E.g.,
+ * // projects/myproject/locations/us-central1/reservations/path/to/reserv
+ * name: 'projects/my-project/locations/my-location/reservations/.*',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name",
+ * // "slotCapacity": "my_slotCapacity",
+ * // "useParentReservation": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.get
* @memberOf! ()
*
@@ -1207,6 +1722,61 @@ export namespace bigqueryreservation_v1alpha2 {
/**
* bigqueryreservation.projects.locations.reservations.list
* @desc Lists all the reservations for the project in the specified location.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.list({
+ * // Can be used to filter out reservations based on names, capacity, etc, e.g.:
+ * // filter="reservation.slot_capacity > 200"
+ * // filter="reservation.name = \"*dev/x\""
+ * // Advanced filtering syntax can be
+ * // [here](https://cloud.google.com/logging/docs/view/advanced-filters).
+ * filter: 'placeholder-value',
+ * // The maximum number of items to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // The parent resource name containing project and location, e.g.:
+ * // "projects/myproject/locations/us-central1"
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "reservations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.list
* @memberOf! ()
*
@@ -1287,6 +1857,67 @@ export namespace bigqueryreservation_v1alpha2 {
/**
* bigqueryreservation.projects.locations.reservations.patch
* @desc Updates an existing reservation resource. Applicable only for child reservations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.patch({
+ * // The resource name of the reservation, e.g.,
+ * // "projects/x/locations/x/reservations/dev/team/product". Reservation names
+ * // (e.g., "dev/team/product") exceeding a depth of six will fail with
+ * // `google.rpc.Code.INVALID_ARGUMENT`.
+ * name:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation/.*',
+ * // Standard field mask for the set of fields to be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "name": "my_name",
+ * // "slotCapacity": "my_slotCapacity",
+ * // "useParentReservation": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name",
+ * // "slotCapacity": "my_slotCapacity",
+ * // "useParentReservation": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.patch
* @memberOf! ()
*
@@ -1484,6 +2115,51 @@ export namespace bigqueryreservation_v1alpha2 {
/**
* bigqueryreservation.projects.locations.reservations.slotPools.delete
* @desc Deletes a slot pool. Attempting to delete slot pool before its commitment_end_time will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.slotPools.delete(
+ * {
+ * // Resource name of the slot pool to delete. E.g.,
+ * // projects/myproject/locations/us-central1/reservations/my_reservation/slotPools/123
+ * name:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation/slotPools/my-slotPool',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.slotPools.delete
* @memberOf! ()
*
@@ -1554,6 +2230,58 @@ export namespace bigqueryreservation_v1alpha2 {
/**
* bigqueryreservation.projects.locations.reservations.slotPools.get
* @desc Returns information about the slot pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.slotPools.get(
+ * {
+ * // Resource name of the slot pool to retrieve. E.g.,
+ * // projects/myproject/locations/us-central1/reservations/my_reservation/slotPools/123
+ * name:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation/slotPools/my-slotPool',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commitmentEndTime": "my_commitmentEndTime",
+ * // "failureStatus": {},
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "slotCount": "my_slotCount",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.slotPools.get
* @memberOf! ()
*
@@ -1624,6 +2352,59 @@ export namespace bigqueryreservation_v1alpha2 {
/**
* bigqueryreservation.projects.locations.reservations.slotPools.list
* @desc Lists all the slot pools for the reservation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.slotPools.list(
+ * {
+ * // The maximum number of items to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // Resource name of the parent reservation. Only top-level reservations can
+ * // have slot pools. E.g.,
+ * // projects/myproject/locations/us-central1/reservations/my_reservation
+ * parent:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "slotPools": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.slotPools.list
* @memberOf! ()
*
diff --git a/src/apis/bigqueryreservation/v1beta1.ts b/src/apis/bigqueryreservation/v1beta1.ts
index 1432ac8878b..7a1c721b8c1 100644
--- a/src/apis/bigqueryreservation/v1beta1.ts
+++ b/src/apis/bigqueryreservation/v1beta1.ts
@@ -367,6 +367,52 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.getBiReservation
* @desc Retrieves a BI reservation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.getBiReservation({
+ * // Required. Name of the requested reservation, for example:
+ * // `projects/{project_id}/locations/{location_id}/bireservation`
+ * name: 'projects/my-project/locations/my-location/biReservation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name",
+ * // "size": "my_size",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.getBiReservation
* @memberOf! ()
*
@@ -441,6 +487,61 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.searchAssignments
* @desc Looks up assignments for a specified resource for a particular region. If the request is about a project: 1) Assignments created on the project will be returned if they exist. 2) Otherwise assignments created on the closest ancestor will be returned. 3) Assignments for different JobTypes will all be returned. Same logic applies if the request is about a folder. If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors). Comparing to ListAssignments, there are some behavior differences: 1) permission on the assignee will be verified in this API. 2) Hierarchy lookup (project->folder->organization) happens in this API. 3) Parent here is projects/x/locations/x, instead of projects/x/locations/xreservations/x. Note "-" cannot be used for projects nor locations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.searchAssignments({
+ * // The maximum number of items to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name of the admin project(containing project and location),
+ * // e.g.:
+ * // "projects/myproject/locations/US".
+ * parent: 'projects/my-project/locations/my-location',
+ * // Please specify resource name as assignee in the query.
+ * // e.g., "assignee=projects/myproject"
+ * // "assignee=folders/123"
+ * // "assignee=organizations/456"
+ * query: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assignments": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.searchAssignments
* @memberOf! ()
*
@@ -526,6 +627,65 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.updateBiReservation
* @desc Updates a BI reservation. Only fields specified in the field_mask are updated. Singleton BI reservation always exists with default size 0. In order to reserve BI capacity it needs to be updated to an amount greater than 0. In order to release BI capacity reservation size must be set to 0.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.updateBiReservation({
+ * // The resource name of the singleton BI reservation.
+ * // Reservation names have the form
+ * // `projects/{project_id}/locations/{location_id}/bireservation`.
+ * name: 'projects/my-project/locations/my-location/biReservation',
+ * // A list of fields to be updated in this request.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "name": "my_name",
+ * // "size": "my_size",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name",
+ * // "size": "my_size",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.updateBiReservation
* @memberOf! ()
*
@@ -667,6 +827,75 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.capacityCommitments.create
* @desc Creates a new capacity commitment resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.capacityCommitments.create(
+ * {
+ * // If true, fail the request if another project in the organization has a
+ * // capacity commitment.
+ * enforceSingleAdminProjectPerOrg: 'placeholder-value',
+ * // Required. Resource name of the parent reservation. E.g.,
+ * // projects/myproject/locations/US
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "commitmentEndTime": "my_commitmentEndTime",
+ * // "failureStatus": {},
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "renewalPlan": "my_renewalPlan",
+ * // "slotCount": "my_slotCount",
+ * // "state": "my_state"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commitmentEndTime": "my_commitmentEndTime",
+ * // "failureStatus": {},
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "renewalPlan": "my_renewalPlan",
+ * // "slotCount": "my_slotCount",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.capacityCommitments.create
* @memberOf! ()
*
@@ -744,6 +973,51 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.capacityCommitments.delete
* @desc Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.capacityCommitments.delete(
+ * {
+ * // Required. Resource name of the capacity commitment to delete. E.g.,
+ * // projects/myproject/locations/US/capacityCommitments/123
+ * name:
+ * 'projects/my-project/locations/my-location/capacityCommitments/my-capacityCommitment',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.capacityCommitments.delete
* @memberOf! ()
*
@@ -814,6 +1088,59 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.capacityCommitments.get
* @desc Returns information about the capacity commitment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.capacityCommitments.get(
+ * {
+ * // Required. Resource name of the capacity commitment to retrieve. E.g.,
+ * // projects/myproject/locations/US/capacityCommitments/123
+ * name:
+ * 'projects/my-project/locations/my-location/capacityCommitments/my-capacityCommitment',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commitmentEndTime": "my_commitmentEndTime",
+ * // "failureStatus": {},
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "renewalPlan": "my_renewalPlan",
+ * // "slotCount": "my_slotCount",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.capacityCommitments.get
* @memberOf! ()
*
@@ -886,6 +1213,57 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.capacityCommitments.list
* @desc Lists all the capacity commitments for the admin project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.capacityCommitments.list(
+ * {
+ * // The maximum number of items to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // Required. Resource name of the parent reservation. E.g.,
+ * // projects/myproject/locations/US
+ * parent: 'projects/my-project/locations/my-location',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "capacityCommitments": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.capacityCommitments.list
* @memberOf! ()
*
@@ -972,6 +1350,66 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.capacityCommitments.merge
* @desc Merges capacity commitments of the same plan into one. Resulting capacity commitment has the longer commitment_end_time out of the two. Attempting to merge capacity commitments of different plan will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.capacityCommitments.merge(
+ * {
+ * // Parent resource that identifies admin project and location e.g.,
+ * // projects/myproject/locations/us
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "capacityCommitmentIds": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commitmentEndTime": "my_commitmentEndTime",
+ * // "failureStatus": {},
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "renewalPlan": "my_renewalPlan",
+ * // "slotCount": "my_slotCount",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.capacityCommitments.merge
* @memberOf! ()
*
@@ -1047,6 +1485,75 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.capacityCommitments.patch
* @desc Updates an existing capacity commitment. Only plan and renewal_plan fields can be updated. Plan can only be changed to a plan of a longer commitment period. Attempting to change to a plan with shorter commitment period will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.capacityCommitments.patch(
+ * {
+ * // Output only. The resource name of the capacity commitment, e.g.,
+ * // projects/myproject/locations/US/capacityCommitments/123
+ * name:
+ * 'projects/my-project/locations/my-location/capacityCommitments/my-capacityCommitment',
+ * // Standard field mask for the set of fields to be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "commitmentEndTime": "my_commitmentEndTime",
+ * // "failureStatus": {},
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "renewalPlan": "my_renewalPlan",
+ * // "slotCount": "my_slotCount",
+ * // "state": "my_state"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commitmentEndTime": "my_commitmentEndTime",
+ * // "failureStatus": {},
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "renewalPlan": "my_renewalPlan",
+ * // "slotCount": "my_slotCount",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.capacityCommitments.patch
* @memberOf! ()
*
@@ -1121,6 +1628,62 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.capacityCommitments.split
* @desc Splits capacity commitment to two commitments of the same plan and commitment_end_time. A common use case to do that is to perform a downgrade e.g., in order to downgrade from 10000 slots to 8000, one might split 10000 capacity commitment to 2000 and 8000, change the plan of the first one to flex and then delete it.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.capacityCommitments.split(
+ * {
+ * // Required. The resource name e.g.,:
+ * // projects/myproject/locations/US/capacityCommitments/123
+ * name:
+ * 'projects/my-project/locations/my-location/capacityCommitments/my-capacityCommitment',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "slotCount": "my_slotCount"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "first": {},
+ * // "second": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.capacityCommitments.split
* @memberOf! ()
*
@@ -1338,6 +1901,67 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.reservations.create
* @desc Creates a new reservation resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.create({
+ * // Required. Project, location. E.g.,
+ * // projects/myproject/locations/US
+ * parent: 'projects/my-project/locations/my-location',
+ * // The reservation ID. This field must only contain lower case alphanumeric
+ * // characters or dash. Max length is 64 characters.
+ * reservationId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscale": {},
+ * // "ignoreIdleSlots": false,
+ * // "name": "my_name",
+ * // "slotCapacity": "my_slotCapacity"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoscale": {},
+ * // "ignoreIdleSlots": false,
+ * // "name": "my_name",
+ * // "slotCapacity": "my_slotCapacity"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.create
* @memberOf! ()
*
@@ -1415,6 +2039,49 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.reservations.delete
* @desc Deletes a reservation. Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has assignments.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.delete({
+ * // Required. Resource name of the reservation to retrieve. E.g.,
+ * // projects/myproject/locations/US/reservations/team1-prod
+ * name:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.delete
* @memberOf! ()
*
@@ -1485,6 +2152,54 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.reservations.get
* @desc Returns information about the reservation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.get({
+ * // Required. Resource name of the reservation to retrieve. E.g.,
+ * // projects/myproject/locations/US/reservations/team1-prod
+ * name:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoscale": {},
+ * // "ignoreIdleSlots": false,
+ * // "name": "my_name",
+ * // "slotCapacity": "my_slotCapacity"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.get
* @memberOf! ()
*
@@ -1557,6 +2272,61 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.reservations.list
* @desc Lists all the reservations for the project in the specified location.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.list({
+ * // Can be used to filter out reservations based on names, capacity, etc, e.g.:
+ * // filter="reservation.slot_capacity > 200"
+ * // filter="reservation.name = \"*dev/x\""
+ * // Advanced filtering syntax can be
+ * // [here](https://cloud.google.com/logging/docs/view/advanced-filters).
+ * filter: 'placeholder-value',
+ * // The maximum number of items to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // Required. The parent resource name containing project and location, e.g.:
+ * // "projects/myproject/locations/US"
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "reservations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.list
* @memberOf! ()
*
@@ -1637,6 +2407,67 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.reservations.patch
* @desc Updates an existing reservation resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.patch({
+ * // The resource name of the reservation, e.g.,
+ * // "projects/x/locations/x/reservations/team1-prod".
+ * name:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation',
+ * // Standard field mask for the set of fields to be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscale": {},
+ * // "ignoreIdleSlots": false,
+ * // "name": "my_name",
+ * // "slotCapacity": "my_slotCapacity"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoscale": {},
+ * // "ignoreIdleSlots": false,
+ * // "name": "my_name",
+ * // "slotCapacity": "my_slotCapacity"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.patch
* @memberOf! ()
*
@@ -1809,6 +2640,67 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.reservations.assignments.create
* @desc Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have 'bigquery.admin' permissions on the project using the reservation and the project that owns this reservation. Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment does not match location of the reservation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.assignments.create(
+ * {
+ * // Required. The parent resource name of the assignment
+ * // E.g.: projects/myproject/locations/US/reservations/team1-prod
+ * parent:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "assignee": "my_assignee",
+ * // "jobType": "my_jobType",
+ * // "name": "my_name",
+ * // "state": "my_state"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assignee": "my_assignee",
+ * // "jobType": "my_jobType",
+ * // "name": "my_name",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.assignments.create
* @memberOf! ()
*
@@ -1885,6 +2777,51 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.reservations.assignments.delete
* @desc Deletes a assignment. No expansion will happen. E.g: organizationA contains project1 and project2. Reservation res1 exists. CreateAssignment was invoked previously and following assignments were created explicitly: Then deletion of won't affect . After deletion of , queries from project1 will still use res1, while queries from project2 will use on-demand mode.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.assignments.delete(
+ * {
+ * // Required. Name of the resource, e.g.:
+ * // projects/myproject/locations/US/reservations/team1-prod/assignments/123
+ * name:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation/assignments/my-assignment',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.assignments.delete
* @memberOf! ()
*
@@ -1955,6 +2892,60 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.reservations.assignments.list
* @desc Lists assignments. Only explicitly created assignments will be returned. E.g: organizationA contains project1 and project2. Reservation res1 exists. CreateAssignment was invoked previously and following assignments were created explicitly: Then this API will just return the above two assignments for reservation res1, and no expansion/merge will happen. Wildcard "-" can be used for reservations in the request. In that case all assignments belongs to the specified project and location will be listed. Note "-" cannot be used for projects nor locations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.assignments.list(
+ * {
+ * // The maximum number of items to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // Required. The parent resource name e.g.:
+ * // projects/myproject/locations/US/reservations/team1-prod
+ * // Or:
+ * // projects/myproject/locations/US/reservations/-
+ * parent:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assignments": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.assignments.list
* @memberOf! ()
*
@@ -2034,6 +3025,65 @@ export namespace bigqueryreservation_v1beta1 {
/**
* bigqueryreservation.projects.locations.reservations.assignments.move
* @desc Moves a assignment under a new reservation. Customers can do this by deleting the existing assignment followed by creating another assignment under the new reservation, but this method provides a transactional way to do so, to make sure the assignee always has an associated reservation. Without the method customers might see some queries run on-demand which might be unexpected.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigqueryreservation = google.bigqueryreservation('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigquery',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigqueryreservation.projects.locations.reservations.assignments.move(
+ * {
+ * // Required. The resource name of the assignment,
+ * // e.g.:
+ * // projects/myproject/locations/US/reservations/team1-prod/assignments/123
+ * name:
+ * 'projects/my-project/locations/my-location/reservations/my-reservation/assignments/my-assignment',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "destinationId": "my_destinationId"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assignee": "my_assignee",
+ * // "jobType": "my_jobType",
+ * // "name": "my_name",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigqueryreservation.projects.locations.reservations.assignments.move
* @memberOf! ()
*
diff --git a/src/apis/bigtableadmin/v2.ts b/src/apis/bigtableadmin/v2.ts
index 4a0ace44f55..b6835955814 100644
--- a/src/apis/bigtableadmin/v2.ts
+++ b/src/apis/bigtableadmin/v2.ts
@@ -833,6 +833,51 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.operations.cancel
* @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.operations.cancel({
+ * // The name of the operation resource to be cancelled.
+ * name: 'operations/.+',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.operations.cancel
* @memberOf! ()
*
@@ -903,6 +948,51 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.operations.delete
* @desc Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.operations.delete({
+ * // The name of the operation resource to be deleted.
+ * name: 'operations/.+',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.operations.delete
* @memberOf! ()
*
@@ -973,6 +1063,58 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.operations.get({
+ * // The name of the operation resource.
+ * name: 'operations/.+',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.operations.get
* @memberOf! ()
*
@@ -1098,6 +1240,61 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.operations.projects.operations.list
* @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.operations.projects.operations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The name of the operation's parent resource.
+ * name: 'operations/projects/.+',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.operations.projects.operations.list
* @memberOf! ()
*
@@ -1229,6 +1426,69 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.create
* @desc Create an instance within a project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.create({
+ * // Required. The unique name of the project in which to create the new instance.
+ * // Values are of the form `projects/{project}`.
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusters": {},
+ * // "instance": {},
+ * // "instanceId": "my_instanceId",
+ * // "parent": "my_parent"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.create
* @memberOf! ()
*
@@ -1305,6 +1565,52 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.delete
* @desc Delete an instance from a project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.delete({
+ * // Required. The unique name of the instance to be deleted.
+ * // Values are of the form `projects/{project}/instances/{instance}`.
+ * name: 'projects/my-project/instances/my-instance',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.delete
* @memberOf! ()
*
@@ -1375,6 +1681,59 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.get
* @desc Gets information about an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.get({
+ * // Required. The unique name of the requested instance. Values are of the form
+ * // `projects/{project}/instances/{instance}`.
+ * name: 'projects/my-project/instances/my-instance',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "state": "my_state",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.get
* @memberOf! ()
*
@@ -1445,6 +1804,65 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.getIamPolicy
* @desc Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/instances/my-instance',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.getIamPolicy
* @memberOf! ()
*
@@ -1519,6 +1937,59 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.list
* @desc Lists information about instances in a project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.list({
+ * // DEPRECATED: This field is unused and ignored.
+ * pageToken: 'placeholder-value',
+ * // Required. The unique name of the project for which a list of instances is requested.
+ * // Values are of the form `projects/{project}`.
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "failedLocations": [],
+ * // "instances": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.list
* @memberOf! ()
*
@@ -1597,6 +2068,74 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.partialUpdateInstance
* @desc Partially updates an instance within a project. This method can modify all fields of an Instance and is the preferred way to update an Instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.partialUpdateInstance({
+ * // Required. (`OutputOnly`)
+ * // The unique name of the instance. Values are of the form
+ * // `projects/{project}/instances/a-z+[a-z0-9]`.
+ * name: 'projects/my-project/instances/my-instance',
+ * // Required. The subset of Instance fields which should be replaced.
+ * // Must be explicitly set.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "displayName": "my_displayName",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "state": "my_state",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.partialUpdateInstance
* @memberOf! ()
*
@@ -1673,6 +2212,66 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.setIamPolicy
* @desc Sets the access control policy on an instance resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/instances/my-instance',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {},
+ * // "updateMask": "my_updateMask"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.setIamPolicy
* @memberOf! ()
*
@@ -1747,6 +2346,62 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.testIamPermissions
* @desc Returns permissions that the caller has on the specified instance resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/instances/my-instance',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.testIamPermissions
* @memberOf! ()
*
@@ -1830,6 +2485,71 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.update
* @desc Updates an instance within a project. This method updates only the display name and type for an Instance. To update other Instance properties, such as labels, use PartialUpdateInstance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.update({
+ * // Required. (`OutputOnly`)
+ * // The unique name of the instance. Values are of the form
+ * // `projects/{project}/instances/a-z+[a-z0-9]`.
+ * name: 'projects/my-project/instances/my-instance',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "displayName": "my_displayName",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "state": "my_state",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "state": "my_state",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.update
* @memberOf! ()
*
@@ -2055,6 +2775,77 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.appProfiles.create
* @desc Creates an app profile within an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.appProfiles.create({
+ * // Required. The ID to be used when referring to the new app profile within its
+ * // instance, e.g., just `myprofile` rather than
+ * // `projects/myproject/instances/myinstance/appProfiles/myprofile`.
+ * appProfileId: 'placeholder-value',
+ * // If true, ignore safety checks when creating the app profile.
+ * ignoreWarnings: 'placeholder-value',
+ * // Required. The unique name of the instance in which to create the new app profile.
+ * // Values are of the form
+ * // `projects/{project}/instances/{instance}`.
+ * parent: 'projects/my-project/instances/my-instance',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "multiClusterRoutingUseAny": {},
+ * // "name": "my_name",
+ * // "singleClusterRouting": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "multiClusterRoutingUseAny": {},
+ * // "name": "my_name",
+ * // "singleClusterRouting": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.appProfiles.create
* @memberOf! ()
*
@@ -2133,6 +2924,54 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.appProfiles.delete
* @desc Deletes an app profile from an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.appProfiles.delete({
+ * // Required. If true, ignore safety checks when deleting the app profile.
+ * ignoreWarnings: 'placeholder-value',
+ * // Required. The unique name of the app profile to be deleted. Values are of the form
+ * // `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
+ * name: 'projects/my-project/instances/my-instance/appProfiles/my-appProfile',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.appProfiles.delete
* @memberOf! ()
*
@@ -2204,6 +3043,59 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.appProfiles.get
* @desc Gets information about an app profile.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.appProfiles.get({
+ * // Required. The unique name of the requested app profile. Values are of the form
+ * // `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
+ * name: 'projects/my-project/instances/my-instance/appProfiles/my-appProfile',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "multiClusterRoutingUseAny": {},
+ * // "name": "my_name",
+ * // "singleClusterRouting": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.appProfiles.get
* @memberOf! ()
*
@@ -2276,6 +3168,71 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.appProfiles.list
* @desc Lists information about app profiles in an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.appProfiles.list({
+ * // Maximum number of results per page.
+ * //
+ * // A page_size of zero lets the server choose the number of items to return.
+ * // A page_size which is strictly positive will return at most that many items.
+ * // A negative page_size will cause an error.
+ * //
+ * // Following the first request, subsequent paginated calls are not required
+ * // to pass a page_size. If a page_size is set in subsequent calls, it must
+ * // match the page_size given in the first request.
+ * pageSize: 'placeholder-value',
+ * // The value of `next_page_token` returned by a previous call.
+ * pageToken: 'placeholder-value',
+ * // Required. The unique name of the instance for which a list of app profiles is
+ * // requested. Values are of the form
+ * // `projects/{project}/instances/{instance}`.
+ * // Use `{instance} = '-'` to list AppProfiles for all Instances in a project,
+ * // e.g., `projects/myproject/instances/-`.
+ * parent: 'projects/my-project/instances/my-instance',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appProfiles": [],
+ * // "failedLocations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.appProfiles.list
* @memberOf! ()
*
@@ -2355,6 +3312,76 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.appProfiles.patch
* @desc Updates an app profile within an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.appProfiles.patch({
+ * // If true, ignore safety checks when updating the app profile.
+ * ignoreWarnings: 'placeholder-value',
+ * // (`OutputOnly`)
+ * // The unique name of the app profile. Values are of the form
+ * // `projects//instances//appProfiles/_a-zA-Z0-9*`.
+ * name: 'projects/my-project/instances/my-instance/appProfiles/my-appProfile',
+ * // Required. The subset of app profile fields which should be replaced.
+ * // If unset, all fields will be replaced.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "multiClusterRoutingUseAny": {},
+ * // "name": "my_name",
+ * // "singleClusterRouting": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.appProfiles.patch
* @memberOf! ()
*
@@ -2540,6 +3567,75 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.clusters.create
* @desc Creates a cluster within an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.clusters.create({
+ * // Required. The ID to be used when referring to the new cluster within its instance,
+ * // e.g., just `mycluster` rather than
+ * // `projects/myproject/instances/myinstance/clusters/mycluster`.
+ * clusterId: 'placeholder-value',
+ * // Required. The unique name of the instance in which to create the new cluster.
+ * // Values are of the form
+ * // `projects/{project}/instances/{instance}`.
+ * parent: 'projects/my-project/instances/my-instance',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "defaultStorageType": "my_defaultStorageType",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "serveNodes": 0,
+ * // "state": "my_state"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.clusters.create
* @memberOf! ()
*
@@ -2617,6 +3713,52 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.clusters.delete
* @desc Deletes a cluster from an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.clusters.delete({
+ * // Required. The unique name of the cluster to be deleted. Values are of the form
+ * // `projects/{project}/instances/{instance}/clusters/{cluster}`.
+ * name: 'projects/my-project/instances/my-instance/clusters/my-cluster',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.clusters.delete
* @memberOf! ()
*
@@ -2687,6 +3829,59 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.clusters.get
* @desc Gets information about a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.clusters.get({
+ * // Required. The unique name of the requested cluster. Values are of the form
+ * // `projects/{project}/instances/{instance}/clusters/{cluster}`.
+ * name: 'projects/my-project/instances/my-instance/clusters/my-cluster',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "defaultStorageType": "my_defaultStorageType",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "serveNodes": 0,
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.clusters.get
* @memberOf! ()
*
@@ -2757,6 +3952,61 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.clusters.list
* @desc Lists information about clusters in an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.clusters.list({
+ * // DEPRECATED: This field is unused and ignored.
+ * pageToken: 'placeholder-value',
+ * // Required. The unique name of the instance for which a list of clusters is requested.
+ * // Values are of the form `projects/{project}/instances/{instance}`.
+ * // Use `{instance} = '-'` to list Clusters for all Instances in a project,
+ * // e.g., `projects/myproject/instances/-`.
+ * parent: 'projects/my-project/instances/my-instance',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusters": [],
+ * // "failedLocations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.clusters.list
* @memberOf! ()
*
@@ -2835,6 +4085,71 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.clusters.update
* @desc Updates a cluster within an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.clusters.update({
+ * // Required. (`OutputOnly`)
+ * // The unique name of the cluster. Values are of the form
+ * // `projects/{project}/instances/{instance}/clusters/a-z*`.
+ * name: 'projects/my-project/instances/my-instance/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "defaultStorageType": "my_defaultStorageType",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "serveNodes": 0,
+ * // "state": "my_state"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.clusters.update
* @memberOf! ()
*
@@ -2994,6 +4309,67 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.clusters.backups.getIamPolicy
* @desc Gets the access control policy for a Table or Backup resource. Returns an empty policy if the resource exists but does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.clusters.backups.getIamPolicy(
+ * {
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/instances/my-instance/clusters/my-cluster/backups/my-backup',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.clusters.backups.getIamPolicy
* @memberOf! ()
*
@@ -3068,6 +4444,68 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.clusters.backups.setIamPolicy
* @desc Sets the access control policy on a Table or Backup resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.clusters.backups.setIamPolicy(
+ * {
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/instances/my-instance/clusters/my-cluster/backups/my-backup',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {},
+ * // "updateMask": "my_updateMask"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.clusters.backups.setIamPolicy
* @memberOf! ()
*
@@ -3142,6 +4580,64 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.clusters.backups.testIamPermissions
* @desc Returns permissions that the caller has on the specified table resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.clusters.backups.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/instances/my-instance/clusters/my-cluster/backups/my-backup',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.clusters.backups.testIamPermissions
* @memberOf! ()
*
@@ -3284,6 +4780,62 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.tables.checkConsistency
* @desc Checks replication consistency based on a consistency token, that is, if replication has caught up based on the conditions specified in the token and the check request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.tables.checkConsistency({
+ * // Required. The unique name of the Table for which to check replication consistency.
+ * // Values are of the form
+ * // `projects/{project}/instances/{instance}/tables/{table}`.
+ * name: 'projects/my-project/instances/my-instance/tables/my-table',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "consistencyToken": "my_consistencyToken"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "consistent": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.tables.checkConsistency
* @memberOf! ()
*
@@ -3364,6 +4916,66 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.tables.create
* @desc Creates a new table in the specified instance. The table can be created with a full set of initial column families, specified in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.tables.create({
+ * // Required. The unique name of the instance in which to create the table.
+ * // Values are of the form `projects/{project}/instances/{instance}`.
+ * parent: 'projects/my-project/instances/my-instance',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "initialSplits": [],
+ * // "table": {},
+ * // "tableId": "my_tableId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterStates": {},
+ * // "columnFamilies": {},
+ * // "granularity": "my_granularity",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.tables.create
* @memberOf! ()
*
@@ -3438,6 +5050,52 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.tables.delete
* @desc Permanently deletes a specified table and all of its data.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.tables.delete({
+ * // Required. The unique name of the table to be deleted.
+ * // Values are of the form
+ * // `projects/{project}/instances/{instance}/tables/{table}`.
+ * name: 'projects/my-project/instances/my-instance/tables/my-table',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.tables.delete
* @memberOf! ()
*
@@ -3508,6 +5166,61 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.tables.dropRowRange
* @desc Permanently drop/delete a row range from a specified table. The request can specify whether to delete all rows in a table, or only those that match a particular prefix.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.tables.dropRowRange({
+ * // Required. The unique name of the table on which to drop a range of rows.
+ * // Values are of the form
+ * // `projects/{project}/instances/{instance}/tables/{table}`.
+ * name: 'projects/my-project/instances/my-instance/tables/my-table',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deleteAllDataFromTable": false,
+ * // "rowKeyPrefix": "my_rowKeyPrefix"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.tables.dropRowRange
* @memberOf! ()
*
@@ -3582,6 +5295,62 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.tables.generateConsistencyToken
* @desc Generates a consistency token for a Table, which can be used in CheckConsistency to check whether mutations to the table that finished before this call started have been replicated. The tokens will be available for 90 days.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.tables.generateConsistencyToken(
+ * {
+ * // Required. The unique name of the Table for which to create a consistency token.
+ * // Values are of the form
+ * // `projects/{project}/instances/{instance}/tables/{table}`.
+ * name: 'projects/my-project/instances/my-instance/tables/my-table',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "consistencyToken": "my_consistencyToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.tables.generateConsistencyToken
* @memberOf! ()
*
@@ -3667,6 +5436,61 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.tables.get
* @desc Gets metadata information about the specified table.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.tables.get({
+ * // Required. The unique name of the requested table.
+ * // Values are of the form
+ * // `projects/{project}/instances/{instance}/tables/{table}`.
+ * name: 'projects/my-project/instances/my-instance/tables/my-table',
+ * // The view to be applied to the returned table's fields.
+ * // Defaults to `SCHEMA_VIEW` if unspecified.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterStates": {},
+ * // "columnFamilies": {},
+ * // "granularity": "my_granularity",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.tables.get
* @memberOf! ()
*
@@ -3738,6 +5562,64 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.tables.getIamPolicy
* @desc Gets the access control policy for a Table or Backup resource. Returns an empty policy if the resource exists but does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.tables.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/instances/my-instance/tables/my-table',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.tables.getIamPolicy
* @memberOf! ()
*
@@ -3812,6 +5694,70 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.tables.list
* @desc Lists all tables served from a specified instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.tables.list({
+ * // Maximum number of results per page.
+ * //
+ * // A page_size of zero lets the server choose the number of items to return.
+ * // A page_size which is strictly positive will return at most that many items.
+ * // A negative page_size will cause an error.
+ * //
+ * // Following the first request, subsequent paginated calls are not required
+ * // to pass a page_size. If a page_size is set in subsequent calls, it must
+ * // match the page_size given in the first request.
+ * pageSize: 'placeholder-value',
+ * // The value of `next_page_token` returned by a previous call.
+ * pageToken: 'placeholder-value',
+ * // Required. The unique name of the instance for which tables should be listed.
+ * // Values are of the form `projects/{project}/instances/{instance}`.
+ * parent: 'projects/my-project/instances/my-instance',
+ * // The view to be applied to the returned tables' fields.
+ * // Only NAME_ONLY view (default) and REPLICATION_VIEW are supported.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "tables": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.tables.list
* @memberOf! ()
*
@@ -3890,6 +5836,67 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.tables.modifyColumnFamilies
* @desc Performs a series of column family modifications on the specified table. Either all or none of the modifications will occur before this method returns, but data requests received prior to that point may see a table where only some modifications have taken effect.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.tables.modifyColumnFamilies(
+ * {
+ * // Required. The unique name of the table whose families should be modified.
+ * // Values are of the form
+ * // `projects/{project}/instances/{instance}/tables/{table}`.
+ * name: 'projects/my-project/instances/my-instance/tables/my-table',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "modifications": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterStates": {},
+ * // "columnFamilies": {},
+ * // "granularity": "my_granularity",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.tables.modifyColumnFamilies
* @memberOf! ()
*
@@ -3964,6 +5971,65 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.tables.setIamPolicy
* @desc Sets the access control policy on a Table or Backup resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.tables.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/instances/my-instance/tables/my-table',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {},
+ * // "updateMask": "my_updateMask"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.tables.setIamPolicy
* @memberOf! ()
*
@@ -4038,6 +6104,61 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.instances.tables.testIamPermissions
* @desc Returns permissions that the caller has on the specified table resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.table',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.instances.tables.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/instances/my-instance/tables/my-table',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.instances.tables.testIamPermissions
* @memberOf! ()
*
@@ -4317,6 +6438,58 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.locations.get
* @desc Gets information about a location.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.locations.get({
+ * // Resource name for the location.
+ * name: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "labels": {},
+ * // "locationId": "my_locationId",
+ * // "metadata": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.locations.get
* @memberOf! ()
*
@@ -4387,6 +6560,61 @@ export namespace bigtableadmin_v2 {
/**
* bigtableadmin.projects.locations.list
* @desc Lists information about the supported locations for this service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/bigtableadmin.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const bigtableadmin = google.bigtableadmin('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/bigtable.admin',
+ * 'https://www.googleapis.com/auth/bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/bigtable.admin.instance',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin',
+ * 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await bigtableadmin.projects.locations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The resource that owns the locations collection, if applicable.
+ * name: 'projects/my-project',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "locations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias bigtableadmin.projects.locations.list
* @memberOf! ()
*
diff --git a/src/apis/billingbudgets/v1beta1.ts b/src/apis/billingbudgets/v1beta1.ts
index 9636a38e80e..45c83c38f67 100644
--- a/src/apis/billingbudgets/v1beta1.ts
+++ b/src/apis/billingbudgets/v1beta1.ts
@@ -281,6 +281,61 @@ export namespace billingbudgets_v1beta1 {
/**
* billingbudgets.billingAccounts.budgets.create
* @desc Creates a new budget. See Quotas and limits for more information on the limits of the number of budgets you can create.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/billingbudgets.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const billingbudgets = google.billingbudgets('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await billingbudgets.billingAccounts.budgets.create({
+ * // Required. The name of the billing account to create the budget in. Values
+ * // are of the form `billingAccounts/{billingAccountId}`.
+ * parent: 'billingAccounts/my-billingAccount',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "budget": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "allUpdatesRule": {},
+ * // "amount": {},
+ * // "budgetFilter": {},
+ * // "displayName": "my_displayName",
+ * // "etag": "my_etag",
+ * // "name": "my_name",
+ * // "thresholdRules": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias billingbudgets.billingAccounts.budgets.create
* @memberOf! ()
*
@@ -374,6 +429,45 @@ export namespace billingbudgets_v1beta1 {
/**
* billingbudgets.billingAccounts.budgets.delete
* @desc Deletes a budget. Returns successfully if already deleted.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/billingbudgets.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const billingbudgets = google.billingbudgets('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await billingbudgets.billingAccounts.budgets.delete({
+ * // Required. Name of the budget to delete. Values are of the form
+ * // `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
+ * name: 'billingAccounts/my-billingAccount/budgets/my-budget',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias billingbudgets.billingAccounts.budgets.delete
* @memberOf! ()
*
@@ -446,6 +540,53 @@ export namespace billingbudgets_v1beta1 {
/**
* billingbudgets.billingAccounts.budgets.get
* @desc Returns a budget. WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/billingbudgets.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const billingbudgets = google.billingbudgets('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await billingbudgets.billingAccounts.budgets.get({
+ * // Required. Name of budget to get. Values are of the form
+ * // `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
+ * name: 'billingAccounts/my-billingAccount/budgets/my-budget',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "allUpdatesRule": {},
+ * // "amount": {},
+ * // "budgetFilter": {},
+ * // "displayName": "my_displayName",
+ * // "etag": "my_etag",
+ * // "name": "my_name",
+ * // "thresholdRules": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias billingbudgets.billingAccounts.budgets.get
* @memberOf! ()
*
@@ -535,6 +676,55 @@ export namespace billingbudgets_v1beta1 {
/**
* billingbudgets.billingAccounts.budgets.list
* @desc Returns a list of budgets for a billing account. WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/billingbudgets.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const billingbudgets = google.billingbudgets('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await billingbudgets.billingAccounts.budgets.list({
+ * // Optional. The maximum number of budgets to return per page.
+ * // The default and maximum value are 100.
+ * pageSize: 'placeholder-value',
+ * // Optional. The value returned by the last `ListBudgetsResponse` which
+ * // indicates that this is a continuation of a prior `ListBudgets` call,
+ * // and that the system should return the next page of data.
+ * pageToken: 'placeholder-value',
+ * // Required. Name of billing account to list budgets under. Values
+ * // are of the form `billingAccounts/{billingAccountId}`.
+ * parent: 'billingAccounts/my-billingAccount',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "budgets": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias billingbudgets.billingAccounts.budgets.list
* @memberOf! ()
*
@@ -638,6 +828,63 @@ export namespace billingbudgets_v1beta1 {
/**
* billingbudgets.billingAccounts.budgets.patch
* @desc Updates a budget and returns the updated budget. WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. Budget fields that are not exposed in this API will not be changed by this method.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/billingbudgets.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const billingbudgets = google.billingbudgets('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await billingbudgets.billingAccounts.budgets.patch({
+ * // Output only. Resource name of the budget.
+ * // The resource name implies the scope of a budget. Values are of the form
+ * // `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
+ * name: 'billingAccounts/my-billingAccount/budgets/my-budget',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "budget": {},
+ * // "updateMask": "my_updateMask"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "allUpdatesRule": {},
+ * // "amount": {},
+ * // "budgetFilter": {},
+ * // "displayName": "my_displayName",
+ * // "etag": "my_etag",
+ * // "name": "my_name",
+ * // "thresholdRules": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias billingbudgets.billingAccounts.budgets.patch
* @memberOf! ()
*
diff --git a/src/apis/binaryauthorization/v1.ts b/src/apis/binaryauthorization/v1.ts
index b299a1e48d6..b21c62c25a1 100644
--- a/src/apis/binaryauthorization/v1.ts
+++ b/src/apis/binaryauthorization/v1.ts
@@ -357,6 +357,53 @@ export namespace binaryauthorization_v1 {
/**
* binaryauthorization.projects.getPolicy
* @desc A policy specifies the attestors that must attest to a container image, before the project is allowed to deploy that image. There is at most one policy per project. All image admission requests are permitted if a project has no policy. Gets the policy for this project. Returns a default policy if the project does not have one.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.getPolicy({
+ * // Required. The resource name of the policy to retrieve,
+ * // in the format `projects/x/policy`.
+ * name: 'projects/my-project/policy',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "admissionWhitelistPatterns": [],
+ * // "clusterAdmissionRules": {},
+ * // "defaultAdmissionRule": {},
+ * // "description": "my_description",
+ * // "globalPolicyEvaluationMode": "my_globalPolicyEvaluationMode",
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.getPolicy
* @memberOf! ()
*
@@ -427,6 +474,67 @@ export namespace binaryauthorization_v1 {
/**
* binaryauthorization.projects.updatePolicy
* @desc Creates or updates a project's policy, and returns a copy of the new policy. A policy is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.updatePolicy({
+ * // Output only. The resource name, in the format `projects/x/policy`. There is
+ * // at most one policy per project.
+ * name: 'projects/my-project/policy',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "admissionWhitelistPatterns": [],
+ * // "clusterAdmissionRules": {},
+ * // "defaultAdmissionRule": {},
+ * // "description": "my_description",
+ * // "globalPolicyEvaluationMode": "my_globalPolicyEvaluationMode",
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "admissionWhitelistPatterns": [],
+ * // "clusterAdmissionRules": {},
+ * // "defaultAdmissionRule": {},
+ * // "description": "my_description",
+ * // "globalPolicyEvaluationMode": "my_globalPolicyEvaluationMode",
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.updatePolicy
* @memberOf! ()
*
@@ -535,6 +643,62 @@ export namespace binaryauthorization_v1 {
/**
* binaryauthorization.projects.attestors.create
* @desc Creates an attestor, and returns a copy of the new attestor. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the attestor already exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.attestors.create({
+ * // Required. The attestors ID.
+ * attestorId: 'placeholder-value',
+ * // Required. The parent of this attestor.
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime",
+ * // "userOwnedGrafeasNote": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime",
+ * // "userOwnedGrafeasNote": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.attestors.create
* @memberOf! ()
*
@@ -610,6 +774,45 @@ export namespace binaryauthorization_v1 {
/**
* binaryauthorization.projects.attestors.delete
* @desc Deletes an attestor. Returns NOT_FOUND if the attestor does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.attestors.delete({
+ * // Required. The name of the attestors to delete, in the format
+ * // `projects/x/attestors/x`.
+ * name: 'projects/my-project/attestors/my-attestor',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.attestors.delete
* @memberOf! ()
*
@@ -680,6 +883,50 @@ export namespace binaryauthorization_v1 {
/**
* binaryauthorization.projects.attestors.get
* @desc Gets an attestor. Returns NOT_FOUND if the attestor does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.attestors.get({
+ * // Required. The name of the attestor to retrieve, in the format
+ * // `projects/x/attestors/x`.
+ * name: 'projects/my-project/attestors/my-attestor',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime",
+ * // "userOwnedGrafeasNote": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.attestors.get
* @memberOf! ()
*
@@ -750,6 +997,62 @@ export namespace binaryauthorization_v1 {
/**
* binaryauthorization.projects.attestors.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.attestors.getIamPolicy({
+ * // Optional. The policy format version to be returned.
+ * //
+ * // Valid values are 0, 1, and 3. Requests specifying an invalid value will be
+ * // rejected.
+ * //
+ * // Requests for policies with any conditional bindings must specify version 3.
+ * // Policies without any conditional bindings may specify any valid value or
+ * // leave the field unset.
+ * //
+ * // To learn which resources support conditions in their IAM policies, see the
+ * // [IAM
+ * // documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ * 'options.requestedPolicyVersion': 'placeholder-value',
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/attestors/my-attestor',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.attestors.getIamPolicy
* @memberOf! ()
*
@@ -826,6 +1129,55 @@ export namespace binaryauthorization_v1 {
/**
* binaryauthorization.projects.attestors.list
* @desc Lists attestors. Returns INVALID_ARGUMENT if the project does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.attestors.list({
+ * // Requested page size. The server may return fewer results than requested. If
+ * // unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return. Typically,
+ * // this is the value of ListAttestorsResponse.next_page_token returned
+ * // from the previous call to the `ListAttestors` method.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name of the project associated with the
+ * // attestors, in the format `projects/x`.
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestors": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.attestors.list
* @memberOf! ()
*
@@ -905,6 +1257,57 @@ export namespace binaryauthorization_v1 {
/**
* binaryauthorization.projects.attestors.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.attestors.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/attestors/my-attestor',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.attestors.setIamPolicy
* @memberOf! ()
*
@@ -981,6 +1384,55 @@ export namespace binaryauthorization_v1 {
/**
* binaryauthorization.projects.attestors.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.attestors.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/attestors/my-attestor',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.attestors.testIamPermissions
* @memberOf! ()
*
@@ -1064,6 +1516,61 @@ export namespace binaryauthorization_v1 {
/**
* binaryauthorization.projects.attestors.update
* @desc Updates an attestor. Returns NOT_FOUND if the attestor does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.attestors.update({
+ * // Required. The resource name, in the format:
+ * // `projects/x/attestors/x`. This field may not be updated.
+ * name: 'projects/my-project/attestors/my-attestor',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime",
+ * // "userOwnedGrafeasNote": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime",
+ * // "userOwnedGrafeasNote": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.attestors.update
* @memberOf! ()
*
@@ -1275,6 +1782,62 @@ export namespace binaryauthorization_v1 {
/**
* binaryauthorization.projects.policy.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.policy.getIamPolicy({
+ * // Optional. The policy format version to be returned.
+ * //
+ * // Valid values are 0, 1, and 3. Requests specifying an invalid value will be
+ * // rejected.
+ * //
+ * // Requests for policies with any conditional bindings must specify version 3.
+ * // Policies without any conditional bindings may specify any valid value or
+ * // leave the field unset.
+ * //
+ * // To learn which resources support conditions in their IAM policies, see the
+ * // [IAM
+ * // documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ * 'options.requestedPolicyVersion': 'placeholder-value',
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/policy',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.policy.getIamPolicy
* @memberOf! ()
*
@@ -1351,6 +1914,57 @@ export namespace binaryauthorization_v1 {
/**
* binaryauthorization.projects.policy.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.policy.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/policy',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.policy.setIamPolicy
* @memberOf! ()
*
@@ -1427,6 +2041,55 @@ export namespace binaryauthorization_v1 {
/**
* binaryauthorization.projects.policy.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.policy.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/policy',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.policy.testIamPermissions
* @memberOf! ()
*
diff --git a/src/apis/binaryauthorization/v1beta1.ts b/src/apis/binaryauthorization/v1beta1.ts
index 619d302cfea..1d5b3882030 100644
--- a/src/apis/binaryauthorization/v1beta1.ts
+++ b/src/apis/binaryauthorization/v1beta1.ts
@@ -357,6 +357,53 @@ export namespace binaryauthorization_v1beta1 {
/**
* binaryauthorization.projects.getPolicy
* @desc A policy specifies the attestors that must attest to a container image, before the project is allowed to deploy that image. There is at most one policy per project. All image admission requests are permitted if a project has no policy. Gets the policy for this project. Returns a default policy if the project does not have one.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.getPolicy({
+ * // Required. The resource name of the policy to retrieve,
+ * // in the format `projects/x/policy`.
+ * name: 'projects/my-project/policy',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "admissionWhitelistPatterns": [],
+ * // "clusterAdmissionRules": {},
+ * // "defaultAdmissionRule": {},
+ * // "description": "my_description",
+ * // "globalPolicyEvaluationMode": "my_globalPolicyEvaluationMode",
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.getPolicy
* @memberOf! ()
*
@@ -427,6 +474,67 @@ export namespace binaryauthorization_v1beta1 {
/**
* binaryauthorization.projects.updatePolicy
* @desc Creates or updates a project's policy, and returns a copy of the new policy. A policy is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.updatePolicy({
+ * // Output only. The resource name, in the format `projects/x/policy`. There is
+ * // at most one policy per project.
+ * name: 'projects/my-project/policy',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "admissionWhitelistPatterns": [],
+ * // "clusterAdmissionRules": {},
+ * // "defaultAdmissionRule": {},
+ * // "description": "my_description",
+ * // "globalPolicyEvaluationMode": "my_globalPolicyEvaluationMode",
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "admissionWhitelistPatterns": [],
+ * // "clusterAdmissionRules": {},
+ * // "defaultAdmissionRule": {},
+ * // "description": "my_description",
+ * // "globalPolicyEvaluationMode": "my_globalPolicyEvaluationMode",
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.updatePolicy
* @memberOf! ()
*
@@ -535,6 +643,62 @@ export namespace binaryauthorization_v1beta1 {
/**
* binaryauthorization.projects.attestors.create
* @desc Creates an attestor, and returns a copy of the new attestor. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the attestor already exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.attestors.create({
+ * // Required. The attestors ID.
+ * attestorId: 'placeholder-value',
+ * // Required. The parent of this attestor.
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime",
+ * // "userOwnedDrydockNote": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime",
+ * // "userOwnedDrydockNote": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.attestors.create
* @memberOf! ()
*
@@ -610,6 +774,45 @@ export namespace binaryauthorization_v1beta1 {
/**
* binaryauthorization.projects.attestors.delete
* @desc Deletes an attestor. Returns NOT_FOUND if the attestor does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.attestors.delete({
+ * // Required. The name of the attestors to delete, in the format
+ * // `projects/x/attestors/x`.
+ * name: 'projects/my-project/attestors/my-attestor',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.attestors.delete
* @memberOf! ()
*
@@ -680,6 +883,50 @@ export namespace binaryauthorization_v1beta1 {
/**
* binaryauthorization.projects.attestors.get
* @desc Gets an attestor. Returns NOT_FOUND if the attestor does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.attestors.get({
+ * // Required. The name of the attestor to retrieve, in the format
+ * // `projects/x/attestors/x`.
+ * name: 'projects/my-project/attestors/my-attestor',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime",
+ * // "userOwnedDrydockNote": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.attestors.get
* @memberOf! ()
*
@@ -750,6 +997,62 @@ export namespace binaryauthorization_v1beta1 {
/**
* binaryauthorization.projects.attestors.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.attestors.getIamPolicy({
+ * // Optional. The policy format version to be returned.
+ * //
+ * // Valid values are 0, 1, and 3. Requests specifying an invalid value will be
+ * // rejected.
+ * //
+ * // Requests for policies with any conditional bindings must specify version 3.
+ * // Policies without any conditional bindings may specify any valid value or
+ * // leave the field unset.
+ * //
+ * // To learn which resources support conditions in their IAM policies, see the
+ * // [IAM
+ * // documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ * 'options.requestedPolicyVersion': 'placeholder-value',
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/attestors/my-attestor',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.attestors.getIamPolicy
* @memberOf! ()
*
@@ -826,6 +1129,55 @@ export namespace binaryauthorization_v1beta1 {
/**
* binaryauthorization.projects.attestors.list
* @desc Lists attestors. Returns INVALID_ARGUMENT if the project does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.attestors.list({
+ * // Requested page size. The server may return fewer results than requested. If
+ * // unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return. Typically,
+ * // this is the value of ListAttestorsResponse.next_page_token returned
+ * // from the previous call to the `ListAttestors` method.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name of the project associated with the
+ * // attestors, in the format `projects/x`.
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestors": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.attestors.list
* @memberOf! ()
*
@@ -905,6 +1257,57 @@ export namespace binaryauthorization_v1beta1 {
/**
* binaryauthorization.projects.attestors.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.attestors.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/attestors/my-attestor',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.attestors.setIamPolicy
* @memberOf! ()
*
@@ -981,6 +1384,55 @@ export namespace binaryauthorization_v1beta1 {
/**
* binaryauthorization.projects.attestors.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.attestors.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/attestors/my-attestor',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.attestors.testIamPermissions
* @memberOf! ()
*
@@ -1064,6 +1516,61 @@ export namespace binaryauthorization_v1beta1 {
/**
* binaryauthorization.projects.attestors.update
* @desc Updates an attestor. Returns NOT_FOUND if the attestor does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.attestors.update({
+ * // Required. The resource name, in the format:
+ * // `projects/x/attestors/x`. This field may not be updated.
+ * name: 'projects/my-project/attestors/my-attestor',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime",
+ * // "userOwnedDrydockNote": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "description": "my_description",
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime",
+ * // "userOwnedDrydockNote": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.attestors.update
* @memberOf! ()
*
@@ -1275,6 +1782,62 @@ export namespace binaryauthorization_v1beta1 {
/**
* binaryauthorization.projects.policy.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.policy.getIamPolicy({
+ * // Optional. The policy format version to be returned.
+ * //
+ * // Valid values are 0, 1, and 3. Requests specifying an invalid value will be
+ * // rejected.
+ * //
+ * // Requests for policies with any conditional bindings must specify version 3.
+ * // Policies without any conditional bindings may specify any valid value or
+ * // leave the field unset.
+ * //
+ * // To learn which resources support conditions in their IAM policies, see the
+ * // [IAM
+ * // documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ * 'options.requestedPolicyVersion': 'placeholder-value',
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/policy',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.policy.getIamPolicy
* @memberOf! ()
*
@@ -1351,6 +1914,57 @@ export namespace binaryauthorization_v1beta1 {
/**
* binaryauthorization.projects.policy.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.policy.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/policy',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.policy.setIamPolicy
* @memberOf! ()
*
@@ -1427,6 +2041,55 @@ export namespace binaryauthorization_v1beta1 {
/**
* binaryauthorization.projects.policy.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/binaryauthorization.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const binaryauthorization = google.binaryauthorization('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await binaryauthorization.projects.policy.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/policy',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias binaryauthorization.projects.policy.testIamPermissions
* @memberOf! ()
*
diff --git a/src/apis/blogger/v2.ts b/src/apis/blogger/v2.ts
index e0cb7639f23..26d982ea54d 100644
--- a/src/apis/blogger/v2.ts
+++ b/src/apis/blogger/v2.ts
@@ -541,6 +541,57 @@ export namespace blogger_v2 {
/**
* blogger.blogs.get
* @desc Gets a blog by id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.blogs.get({
+ * blogId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "customMetaData": "my_customMetaData",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": {},
+ * // "name": "my_name",
+ * // "pages": {},
+ * // "posts": {},
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.blogs.get
* @memberOf! ()
*
@@ -609,6 +660,47 @@ export namespace blogger_v2 {
/**
* blogger.blogs.list
* @desc Lists blogs by user id, possibly filtered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.blogs.list({
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "blogUserInfos": [],
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.blogs.list
* @memberOf! ()
*
@@ -710,6 +802,59 @@ export namespace blogger_v2 {
/**
* blogger.comments.get
* @desc Gets a comment by blog id, post id and comment id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.comments.get({
+ * blogId: 'placeholder-value',
+ *
+ * commentId: 'placeholder-value',
+ *
+ * postId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "id": "my_id",
+ * // "inReplyTo": {},
+ * // "kind": "my_kind",
+ * // "post": {},
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "updated": "my_updated"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.comments.get
* @memberOf! ()
*
@@ -782,6 +927,59 @@ export namespace blogger_v2 {
/**
* blogger.comments.list
* @desc Lists comments.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.comments.list({
+ * blogId: 'placeholder-value',
+ *
+ * fetchBodies: 'placeholder-value',
+ *
+ * maxResults: 'placeholder-value',
+ *
+ * pageToken: 'placeholder-value',
+ *
+ * postId: 'placeholder-value',
+ *
+ * startDate: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "prevPageToken": "my_prevPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.comments.list
* @memberOf! ()
*
@@ -917,6 +1115,58 @@ export namespace blogger_v2 {
/**
* blogger.pages.get
* @desc Gets a page by blog id and page id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.pages.get({
+ * blogId: 'placeholder-value',
+ *
+ * pageId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.pages.get
* @memberOf! ()
*
@@ -989,6 +1239,50 @@ export namespace blogger_v2 {
/**
* blogger.pages.list
* @desc Lists pages.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.pages.list({
+ * blogId: 'placeholder-value',
+ *
+ * fetchBodies: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.pages.list
* @memberOf! ()
*
@@ -1099,6 +1393,65 @@ export namespace blogger_v2 {
/**
* blogger.posts.get
* @desc Gets a post by blog id and post id
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.posts.get({
+ * blogId: 'placeholder-value',
+ *
+ * postId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "customMetaData": "my_customMetaData",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "images": [],
+ * // "kind": "my_kind",
+ * // "labels": [],
+ * // "location": {},
+ * // "published": "my_published",
+ * // "readerComments": "my_readerComments",
+ * // "replies": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "titleLink": "my_titleLink",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.posts.get
* @memberOf! ()
*
@@ -1171,6 +1524,57 @@ export namespace blogger_v2 {
/**
* blogger.posts.list
* @desc Lists posts.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.posts.list({
+ * blogId: 'placeholder-value',
+ *
+ * fetchBodies: 'placeholder-value',
+ *
+ * maxResults: 'placeholder-value',
+ *
+ * pageToken: 'placeholder-value',
+ *
+ * startDate: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "prevPageToken": "my_prevPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.posts.list
* @memberOf! ()
*
@@ -1296,6 +1700,53 @@ export namespace blogger_v2 {
/**
* blogger.users.get
* @desc Gets a user by user id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.users.get({
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "about": "my_about",
+ * // "blogs": {},
+ * // "created": "my_created",
+ * // "displayName": "my_displayName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": {},
+ * // "selfLink": "my_selfLink",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.users.get
* @memberOf! ()
*
diff --git a/src/apis/blogger/v3.ts b/src/apis/blogger/v3.ts
index 4142c078191..3dd8cd9f7a8 100644
--- a/src/apis/blogger/v3.ts
+++ b/src/apis/blogger/v3.ts
@@ -611,6 +611,64 @@ export namespace blogger_v3 {
/**
* blogger.blogs.get
* @desc Gets a blog by id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/blogger',
+ * 'https://www.googleapis.com/auth/blogger.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.blogs.get({
+ * blogId: 'placeholder-value',
+ *
+ * maxPosts: 'placeholder-value',
+ *
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "customMetaData": "my_customMetaData",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": {},
+ * // "name": "my_name",
+ * // "pages": {},
+ * // "posts": {},
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.blogs.get
* @memberOf! ()
*
@@ -681,6 +739,62 @@ export namespace blogger_v3 {
/**
* blogger.blogs.getByUrl
* @desc Gets a blog by url.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/blogger',
+ * 'https://www.googleapis.com/auth/blogger.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.blogs.getByUrl({
+ * url: 'placeholder-value',
+ *
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "customMetaData": "my_customMetaData",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": {},
+ * // "name": "my_name",
+ * // "pages": {},
+ * // "posts": {},
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.blogs.getByUrl
* @memberOf! ()
*
@@ -750,6 +864,58 @@ export namespace blogger_v3 {
/**
* blogger.blogs.listByUser
* @desc Lists blogs by user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/blogger',
+ * 'https://www.googleapis.com/auth/blogger.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.blogs.listByUser({
+ * fetchUserInfo: 'placeholder-value',
+ *
+ * role: 'placeholder-value',
+ * // Default value of status is LIVE.
+ * status: 'placeholder-value',
+ *
+ * userId: 'placeholder-value',
+ *
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "blogUserInfos": [],
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.blogs.listByUser
* @memberOf! ()
*
@@ -894,6 +1060,54 @@ export namespace blogger_v3 {
/**
* blogger.blogUserInfos.get
* @desc Gets one blog and user info pair by blog id and user id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/blogger',
+ * 'https://www.googleapis.com/auth/blogger.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.blogUserInfos.get({
+ * blogId: 'placeholder-value',
+ *
+ * maxPosts: 'placeholder-value',
+ *
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "blog": {},
+ * // "blog_user_info": {},
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.blogUserInfos.get
* @memberOf! ()
*
@@ -998,6 +1212,59 @@ export namespace blogger_v3 {
/**
* blogger.comments.approve
* @desc Marks a comment as not spam by blog id, post id and comment id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.comments.approve({
+ * blogId: 'placeholder-value',
+ *
+ * commentId: 'placeholder-value',
+ *
+ * postId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "id": "my_id",
+ * // "inReplyTo": {},
+ * // "kind": "my_kind",
+ * // "post": {},
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "updated": "my_updated"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.comments.approve
* @memberOf! ()
*
@@ -1071,6 +1338,44 @@ export namespace blogger_v3 {
/**
* blogger.comments.delete
* @desc Deletes a comment by blog id, post id and comment id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.comments.delete({
+ * blogId: 'placeholder-value',
+ *
+ * commentId: 'placeholder-value',
+ *
+ * postId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.comments.delete
* @memberOf! ()
*
@@ -1143,6 +1448,64 @@ export namespace blogger_v3 {
/**
* blogger.comments.get
* @desc Gets a comment by id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/blogger',
+ * 'https://www.googleapis.com/auth/blogger.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.comments.get({
+ * blogId: 'placeholder-value',
+ *
+ * commentId: 'placeholder-value',
+ *
+ * postId: 'placeholder-value',
+ *
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "id": "my_id",
+ * // "inReplyTo": {},
+ * // "kind": "my_kind",
+ * // "post": {},
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "updated": "my_updated"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.comments.get
* @memberOf! ()
*
@@ -1216,6 +1579,68 @@ export namespace blogger_v3 {
/**
* blogger.comments.list
* @desc Lists comments.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/blogger',
+ * 'https://www.googleapis.com/auth/blogger.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.comments.list({
+ * blogId: 'placeholder-value',
+ *
+ * endDate: 'placeholder-value',
+ *
+ * fetchBodies: 'placeholder-value',
+ *
+ * maxResults: 'placeholder-value',
+ *
+ * pageToken: 'placeholder-value',
+ *
+ * postId: 'placeholder-value',
+ *
+ * startDate: 'placeholder-value',
+ *
+ * status: 'placeholder-value',
+ *
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "prevPageToken": "my_prevPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.comments.list
* @memberOf! ()
*
@@ -1296,6 +1721,64 @@ export namespace blogger_v3 {
/**
* blogger.comments.listByBlog
* @desc Lists comments by blog.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/blogger',
+ * 'https://www.googleapis.com/auth/blogger.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.comments.listByBlog({
+ * blogId: 'placeholder-value',
+ *
+ * endDate: 'placeholder-value',
+ *
+ * fetchBodies: 'placeholder-value',
+ *
+ * maxResults: 'placeholder-value',
+ *
+ * pageToken: 'placeholder-value',
+ *
+ * startDate: 'placeholder-value',
+ *
+ * status: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "prevPageToken": "my_prevPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.comments.listByBlog
* @memberOf! ()
*
@@ -1376,6 +1859,59 @@ export namespace blogger_v3 {
/**
* blogger.comments.markAsSpam
* @desc Marks a comment as spam by blog id, post id and comment id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.comments.markAsSpam({
+ * blogId: 'placeholder-value',
+ *
+ * commentId: 'placeholder-value',
+ *
+ * postId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "id": "my_id",
+ * // "inReplyTo": {},
+ * // "kind": "my_kind",
+ * // "post": {},
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "updated": "my_updated"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.comments.markAsSpam
* @memberOf! ()
*
@@ -1450,6 +1986,59 @@ export namespace blogger_v3 {
/**
* blogger.comments.removeContent
* @desc Removes the content of a comment by blog id, post id and comment id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.comments.removeContent({
+ * blogId: 'placeholder-value',
+ *
+ * commentId: 'placeholder-value',
+ *
+ * postId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "id": "my_id",
+ * // "inReplyTo": {},
+ * // "kind": "my_kind",
+ * // "post": {},
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "updated": "my_updated"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.comments.removeContent
* @memberOf! ()
*
@@ -1712,6 +2301,42 @@ export namespace blogger_v3 {
/**
* blogger.pages.delete
* @desc Deletes a page by blog id and page id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.pages.delete({
+ * blogId: 'placeholder-value',
+ *
+ * pageId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.pages.delete
* @memberOf! ()
*
@@ -1784,6 +2409,63 @@ export namespace blogger_v3 {
/**
* blogger.pages.get
* @desc Gets a page by blog id and page id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/blogger',
+ * 'https://www.googleapis.com/auth/blogger.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.pages.get({
+ * blogId: 'placeholder-value',
+ *
+ * pageId: 'placeholder-value',
+ *
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.pages.get
* @memberOf! ()
*
@@ -1857,6 +2539,77 @@ export namespace blogger_v3 {
/**
* blogger.pages.insert
* @desc Inserts a page.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.pages.insert({
+ * blogId: 'placeholder-value',
+ *
+ * isDraft: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.pages.insert
* @memberOf! ()
*
@@ -1930,6 +2683,61 @@ export namespace blogger_v3 {
/**
* blogger.pages.list
* @desc Lists pages.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/blogger',
+ * 'https://www.googleapis.com/auth/blogger.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.pages.list({
+ * blogId: 'placeholder-value',
+ *
+ * fetchBodies: 'placeholder-value',
+ *
+ * maxResults: 'placeholder-value',
+ *
+ * pageToken: 'placeholder-value',
+ *
+ * status: 'placeholder-value',
+ *
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.pages.list
* @memberOf! ()
*
@@ -2006,6 +2814,81 @@ export namespace blogger_v3 {
/**
* blogger.pages.patch
* @desc Patches a page.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.pages.patch({
+ * blogId: 'placeholder-value',
+ *
+ * pageId: 'placeholder-value',
+ *
+ * publish: 'placeholder-value',
+ *
+ * revert: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.pages.patch
* @memberOf! ()
*
@@ -2081,6 +2964,58 @@ export namespace blogger_v3 {
/**
* blogger.pages.publish
* @desc Publishes a page.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.pages.publish({
+ * blogId: 'placeholder-value',
+ *
+ * pageId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.pages.publish
* @memberOf! ()
*
@@ -2152,6 +3087,58 @@ export namespace blogger_v3 {
/**
* blogger.pages.revert
* @desc Reverts a published or scheduled page to draft state.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.pages.revert({
+ * blogId: 'placeholder-value',
+ *
+ * pageId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.pages.revert
* @memberOf! ()
*
@@ -2224,6 +3211,81 @@ export namespace blogger_v3 {
/**
* blogger.pages.update
* @desc Updates a page by blog id and page id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.pages.update({
+ * blogId: 'placeholder-value',
+ *
+ * pageId: 'placeholder-value',
+ *
+ * publish: 'placeholder-value',
+ *
+ * revert: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "published": "my_published",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.pages.update
* @memberOf! ()
*
@@ -2478,6 +3540,49 @@ export namespace blogger_v3 {
/**
* blogger.pageViews.get
* @desc Gets page views by blog id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.pageViews.get({
+ * blogId: 'placeholder-value',
+ *
+ * range: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "blogId": "my_blogId",
+ * // "counts": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.pageViews.get
* @memberOf! ()
*
@@ -2575,6 +3680,42 @@ export namespace blogger_v3 {
/**
* blogger.posts.delete
* @desc Deletes a post by blog id and post id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.posts.delete({
+ * blogId: 'placeholder-value',
+ *
+ * postId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.posts.delete
* @memberOf! ()
*
@@ -2647,6 +3788,76 @@ export namespace blogger_v3 {
/**
* blogger.posts.get
* @desc Gets a post by blog id and post id
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/blogger',
+ * 'https://www.googleapis.com/auth/blogger.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.posts.get({
+ * blogId: 'placeholder-value',
+ *
+ * fetchBody: 'placeholder-value',
+ *
+ * fetchImages: 'placeholder-value',
+ *
+ * maxComments: 'placeholder-value',
+ *
+ * postId: 'placeholder-value',
+ *
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "customMetaData": "my_customMetaData",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "images": [],
+ * // "kind": "my_kind",
+ * // "labels": [],
+ * // "location": {},
+ * // "published": "my_published",
+ * // "readerComments": "my_readerComments",
+ * // "replies": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "titleLink": "my_titleLink",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.posts.get
* @memberOf! ()
*
@@ -2723,6 +3934,72 @@ export namespace blogger_v3 {
/**
* blogger.posts.getByPath
* @desc Gets a post by path.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/blogger',
+ * 'https://www.googleapis.com/auth/blogger.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.posts.getByPath({
+ * blogId: 'placeholder-value',
+ *
+ * maxComments: 'placeholder-value',
+ *
+ * path: 'placeholder-value',
+ *
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "customMetaData": "my_customMetaData",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "images": [],
+ * // "kind": "my_kind",
+ * // "labels": [],
+ * // "location": {},
+ * // "published": "my_published",
+ * // "readerComments": "my_readerComments",
+ * // "replies": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "titleLink": "my_titleLink",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.posts.getByPath
* @memberOf! ()
*
@@ -2797,6 +4074,95 @@ export namespace blogger_v3 {
/**
* blogger.posts.insert
* @desc Inserts a post.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.posts.insert({
+ * blogId: 'placeholder-value',
+ *
+ * fetchBody: 'placeholder-value',
+ *
+ * fetchImages: 'placeholder-value',
+ *
+ * isDraft: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "customMetaData": "my_customMetaData",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "images": [],
+ * // "kind": "my_kind",
+ * // "labels": [],
+ * // "location": {},
+ * // "published": "my_published",
+ * // "readerComments": "my_readerComments",
+ * // "replies": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "titleLink": "my_titleLink",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "customMetaData": "my_customMetaData",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "images": [],
+ * // "kind": "my_kind",
+ * // "labels": [],
+ * // "location": {},
+ * // "published": "my_published",
+ * // "readerComments": "my_readerComments",
+ * // "replies": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "titleLink": "my_titleLink",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.posts.insert
* @memberOf! ()
*
@@ -2872,6 +4238,72 @@ export namespace blogger_v3 {
/**
* blogger.posts.list
* @desc Lists posts.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/blogger',
+ * 'https://www.googleapis.com/auth/blogger.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.posts.list({
+ * blogId: 'placeholder-value',
+ *
+ * endDate: 'placeholder-value',
+ *
+ * fetchBodies: 'placeholder-value',
+ *
+ * fetchImages: 'placeholder-value',
+ *
+ * labels: 'placeholder-value',
+ *
+ * maxResults: 'placeholder-value',
+ *
+ * orderBy: 'placeholder-value',
+ *
+ * pageToken: 'placeholder-value',
+ *
+ * startDate: 'placeholder-value',
+ *
+ * status: 'placeholder-value',
+ *
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "prevPageToken": "my_prevPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.posts.list
* @memberOf! ()
*
@@ -2953,6 +4385,101 @@ export namespace blogger_v3 {
/**
* blogger.posts.patch
* @desc Patches a post.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.posts.patch({
+ * blogId: 'placeholder-value',
+ *
+ * fetchBody: 'placeholder-value',
+ *
+ * fetchImages: 'placeholder-value',
+ *
+ * maxComments: 'placeholder-value',
+ *
+ * postId: 'placeholder-value',
+ *
+ * publish: 'placeholder-value',
+ *
+ * revert: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "customMetaData": "my_customMetaData",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "images": [],
+ * // "kind": "my_kind",
+ * // "labels": [],
+ * // "location": {},
+ * // "published": "my_published",
+ * // "readerComments": "my_readerComments",
+ * // "replies": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "titleLink": "my_titleLink",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "customMetaData": "my_customMetaData",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "images": [],
+ * // "kind": "my_kind",
+ * // "labels": [],
+ * // "location": {},
+ * // "published": "my_published",
+ * // "readerComments": "my_readerComments",
+ * // "replies": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "titleLink": "my_titleLink",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.posts.patch
* @memberOf! ()
*
@@ -3031,6 +4558,67 @@ export namespace blogger_v3 {
/**
* blogger.posts.publish
* @desc Publishes a post.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.posts.publish({
+ * blogId: 'placeholder-value',
+ *
+ * postId: 'placeholder-value',
+ *
+ * publishDate: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "customMetaData": "my_customMetaData",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "images": [],
+ * // "kind": "my_kind",
+ * // "labels": [],
+ * // "location": {},
+ * // "published": "my_published",
+ * // "readerComments": "my_readerComments",
+ * // "replies": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "titleLink": "my_titleLink",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.posts.publish
* @memberOf! ()
*
@@ -3103,6 +4691,65 @@ export namespace blogger_v3 {
/**
* blogger.posts.revert
* @desc Reverts a published or scheduled post to draft state.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.posts.revert({
+ * blogId: 'placeholder-value',
+ *
+ * postId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "customMetaData": "my_customMetaData",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "images": [],
+ * // "kind": "my_kind",
+ * // "labels": [],
+ * // "location": {},
+ * // "published": "my_published",
+ * // "readerComments": "my_readerComments",
+ * // "replies": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "titleLink": "my_titleLink",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.posts.revert
* @memberOf! ()
*
@@ -3175,6 +4822,58 @@ export namespace blogger_v3 {
/**
* blogger.posts.search
* @desc Searches for posts matching given query terms in the specified blog.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/blogger',
+ * 'https://www.googleapis.com/auth/blogger.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.posts.search({
+ * blogId: 'placeholder-value',
+ *
+ * fetchBodies: 'placeholder-value',
+ *
+ * orderBy: 'placeholder-value',
+ *
+ * q: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "prevPageToken": "my_prevPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.posts.search
* @memberOf! ()
*
@@ -3249,6 +4948,101 @@ export namespace blogger_v3 {
/**
* blogger.posts.update
* @desc Updates a post by blog id and post id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/blogger'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.posts.update({
+ * blogId: 'placeholder-value',
+ *
+ * fetchBody: 'placeholder-value',
+ *
+ * fetchImages: 'placeholder-value',
+ *
+ * maxComments: 'placeholder-value',
+ *
+ * postId: 'placeholder-value',
+ *
+ * publish: 'placeholder-value',
+ *
+ * revert: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "customMetaData": "my_customMetaData",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "images": [],
+ * // "kind": "my_kind",
+ * // "labels": [],
+ * // "location": {},
+ * // "published": "my_published",
+ * // "readerComments": "my_readerComments",
+ * // "replies": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "titleLink": "my_titleLink",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": {},
+ * // "blog": {},
+ * // "content": "my_content",
+ * // "customMetaData": "my_customMetaData",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "images": [],
+ * // "kind": "my_kind",
+ * // "labels": [],
+ * // "location": {},
+ * // "published": "my_published",
+ * // "readerComments": "my_readerComments",
+ * // "replies": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "title": "my_title",
+ * // "titleLink": "my_titleLink",
+ * // "updated": "my_updated",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.posts.update
* @memberOf! ()
*
@@ -3620,6 +5414,56 @@ export namespace blogger_v3 {
/**
* blogger.postUserInfos.get
* @desc Gets one post and user info pair, by post_id and user_id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/blogger',
+ * 'https://www.googleapis.com/auth/blogger.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.postUserInfos.get({
+ * blogId: 'placeholder-value',
+ *
+ * maxComments: 'placeholder-value',
+ *
+ * postId: 'placeholder-value',
+ *
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "post": {},
+ * // "post_user_info": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.postUserInfos.get
* @memberOf! ()
*
@@ -3696,6 +5540,70 @@ export namespace blogger_v3 {
/**
* blogger.postUserInfos.list
* @desc Lists post and user info pairs.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/blogger',
+ * 'https://www.googleapis.com/auth/blogger.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.postUserInfos.list({
+ * blogId: 'placeholder-value',
+ *
+ * endDate: 'placeholder-value',
+ *
+ * fetchBodies: 'placeholder-value',
+ *
+ * labels: 'placeholder-value',
+ *
+ * maxResults: 'placeholder-value',
+ *
+ * orderBy: 'placeholder-value',
+ *
+ * pageToken: 'placeholder-value',
+ *
+ * startDate: 'placeholder-value',
+ *
+ * status: 'placeholder-value',
+ *
+ * userId: 'placeholder-value',
+ *
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.postUserInfos.list
* @memberOf! ()
*
@@ -3864,6 +5772,56 @@ export namespace blogger_v3 {
/**
* blogger.users.get
* @desc Gets one user by user_id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/blogger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const blogger = google.blogger('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/blogger',
+ * 'https://www.googleapis.com/auth/blogger.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await blogger.users.get({
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "about": "my_about",
+ * // "blogs": {},
+ * // "created": "my_created",
+ * // "displayName": "my_displayName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": {},
+ * // "selfLink": "my_selfLink",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias blogger.users.get
* @memberOf! ()
*
diff --git a/src/apis/books/v1.ts b/src/apis/books/v1.ts
index 6b021fe8261..0e2d2e8e234 100644
--- a/src/apis/books/v1.ts
+++ b/src/apis/books/v1.ts
@@ -1166,6 +1166,59 @@ export namespace books_v1 {
/**
* books.bookshelves.get
* @desc Retrieves metadata for a specific bookshelf for the specified user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.bookshelves.get({
+ * // ID of bookshelf to retrieve.
+ * shelf: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // ID of user for whom to retrieve bookshelves.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "access": "my_access",
+ * // "created": "my_created",
+ * // "description": "my_description",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "selfLink": "my_selfLink",
+ * // "title": "my_title",
+ * // "updated": "my_updated",
+ * // "volumeCount": 0,
+ * // "volumesLastUpdated": "my_volumesLastUpdated"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.bookshelves.get
* @memberOf! ()
*
@@ -1240,6 +1293,49 @@ export namespace books_v1 {
/**
* books.bookshelves.list
* @desc Retrieves a list of public bookshelves for the specified user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.bookshelves.list({
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // ID of user for whom to retrieve bookshelves.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.bookshelves.list
* @memberOf! ()
*
@@ -1356,6 +1452,58 @@ export namespace books_v1 {
/**
* books.bookshelves.volumes.list
* @desc Retrieves volumes in a specific bookshelf for the specified user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.bookshelves.volumes.list({
+ * // Maximum number of results to return
+ * maxResults: 'placeholder-value',
+ * // ID of bookshelf to retrieve volumes.
+ * shelf: 'placeholder-value',
+ * // Set to true to show pre-ordered books. Defaults to false.
+ * showPreorders: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // Index of the first element to return (starts at 0)
+ * startIndex: 'placeholder-value',
+ * // ID of user for whom to retrieve bookshelf volumes.
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "totalItems": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.bookshelves.volumes.list
* @memberOf! ()
*
@@ -1471,6 +1619,55 @@ export namespace books_v1 {
/**
* books.cloudloading.addBook
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.cloudloading.addBook({
+ * // A drive document id. The upload_client_token must not be set.
+ * drive_document_id: 'placeholder-value',
+ * // The document MIME type. It can be set only if the drive_document_id is set.
+ * mime_type: 'placeholder-value',
+ * // The document name. It can be set only if the drive_document_id is set.
+ * name: 'placeholder-value',
+ *
+ * upload_client_token: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": "my_author",
+ * // "processingState": "my_processingState",
+ * // "title": "my_title",
+ * // "volumeId": "my_volumeId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.cloudloading.addBook
* @memberOf! ()
*
@@ -1555,6 +1752,41 @@ export namespace books_v1 {
/**
* books.cloudloading.deleteBook
* @desc Remove the book and its contents
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.cloudloading.deleteBook({
+ * // The id of the book to be removed.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.cloudloading.deleteBook
* @memberOf! ()
*
@@ -1626,6 +1858,57 @@ export namespace books_v1 {
/**
* books.cloudloading.updateBook
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.cloudloading.updateBook({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "author": "my_author",
+ * // "processingState": "my_processingState",
+ * // "title": "my_title",
+ * // "volumeId": "my_volumeId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "author": "my_author",
+ * // "processingState": "my_processingState",
+ * // "title": "my_title",
+ * // "volumeId": "my_volumeId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.cloudloading.updateBook
* @memberOf! ()
*
@@ -1763,6 +2046,47 @@ export namespace books_v1 {
/**
* books.dictionary.listOfflineMetadata
* @desc Returns a list of offline dictionary metadata available
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.dictionary.listOfflineMetadata({
+ * // The device/version ID from which to request the data.
+ * cpksver: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.dictionary.listOfflineMetadata
* @memberOf! ()
*
@@ -1855,6 +2179,47 @@ export namespace books_v1 {
/**
* books.familysharing.getFamilyInfo
* @desc Gets information regarding the family that the user is part of.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.familysharing.getFamilyInfo({
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "membership": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.familysharing.getFamilyInfo
* @memberOf! ()
*
@@ -1929,6 +2294,45 @@ export namespace books_v1 {
/**
* books.familysharing.share
* @desc Initiates sharing of the content with the user's family. Empty response indicates success.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.familysharing.share({
+ * // The docid to share.
+ * docId: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // The volume to share.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.familysharing.share
* @memberOf! ()
*
@@ -2003,6 +2407,45 @@ export namespace books_v1 {
/**
* books.familysharing.unshare
* @desc Initiates revoking content that has already been shared with the user's family. Empty response indicates success.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.familysharing.unshare({
+ * // The docid to unshare.
+ * docId: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // The volume to unshare.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.familysharing.unshare
* @memberOf! ()
*
@@ -2143,6 +2586,64 @@ export namespace books_v1 {
/**
* books.layers.get
* @desc Gets the layer summary for a volume.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.layers.get({
+ * // The content version for the requested volume.
+ * contentVersion: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // The ID for the layer to get the summary for.
+ * summaryId: 'placeholder-value',
+ * // The volume to retrieve layers for.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "annotationCount": 0,
+ * // "annotationTypes": [],
+ * // "annotationsDataLink": "my_annotationsDataLink",
+ * // "annotationsLink": "my_annotationsLink",
+ * // "contentVersion": "my_contentVersion",
+ * // "dataCount": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "layerId": "my_layerId",
+ * // "selfLink": "my_selfLink",
+ * // "updated": "my_updated",
+ * // "volumeAnnotationsVersion": "my_volumeAnnotationsVersion",
+ * // "volumeId": "my_volumeId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.layers.get
* @memberOf! ()
*
@@ -2218,6 +2719,56 @@ export namespace books_v1 {
/**
* books.layers.list
* @desc List the layer summaries for a volume.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.layers.list({
+ * // The content version for the requested volume.
+ * contentVersion: 'placeholder-value',
+ * // Maximum number of results to return
+ * maxResults: 'placeholder-value',
+ * // The value of the nextToken from the previous page.
+ * pageToken: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // The volume to retrieve layers for.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "totalItems": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.layers.list
* @memberOf! ()
*
@@ -2352,6 +2903,72 @@ export namespace books_v1 {
/**
* books.layers.annotationData.get
* @desc Gets the annotation data.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.layers.annotationData.get({
+ * // For the dictionary layer. Whether or not to allow web definitions.
+ * allowWebDefinitions: 'placeholder-value',
+ * // The ID of the annotation data to retrieve.
+ * annotationDataId: 'placeholder-value',
+ * // The content version for the volume you are trying to retrieve.
+ * contentVersion: 'placeholder-value',
+ * // The requested pixel height for any images. If height is provided width must also be provided.
+ * h: 'placeholder-value',
+ * // The ID for the layer to get the annotations.
+ * layerId: 'placeholder-value',
+ * // The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.
+ * locale: 'placeholder-value',
+ * // The requested scale for the image.
+ * scale: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // The volume to retrieve annotations for.
+ * volumeId: 'placeholder-value',
+ * // The requested pixel width for any images. If width is provided height must also be provided.
+ * w: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "annotationType": "my_annotationType",
+ * // "data": {},
+ * // "encoded_data": "my_encoded_data",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "layerId": "my_layerId",
+ * // "selfLink": "my_selfLink",
+ * // "updated": "my_updated",
+ * // "volumeId": "my_volumeId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.layers.annotationData.get
* @memberOf! ()
*
@@ -2440,6 +3057,73 @@ export namespace books_v1 {
/**
* books.layers.annotationData.list
* @desc Gets the annotation data for a volume and layer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.layers.annotationData.list({
+ * // The list of Annotation Data Ids to retrieve. Pagination is ignored if this is set.
+ * annotationDataId: 'placeholder-value',
+ * // The content version for the requested volume.
+ * contentVersion: 'placeholder-value',
+ * // The requested pixel height for any images. If height is provided width must also be provided.
+ * h: 'placeholder-value',
+ * // The ID for the layer to get the annotation data.
+ * layerId: 'placeholder-value',
+ * // The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.
+ * locale: 'placeholder-value',
+ * // Maximum number of results to return
+ * maxResults: 'placeholder-value',
+ * // The value of the nextToken from the previous page.
+ * pageToken: 'placeholder-value',
+ * // The requested scale for the image.
+ * scale: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).
+ * updatedMax: 'placeholder-value',
+ * // RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).
+ * updatedMin: 'placeholder-value',
+ * // The volume to retrieve annotation data for.
+ * volumeId: 'placeholder-value',
+ * // The requested pixel width for any images. If width is provided height must also be provided.
+ * w: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "totalItems": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.layers.annotationData.list
* @memberOf! ()
*
@@ -2641,6 +3325,67 @@ export namespace books_v1 {
/**
* books.layers.volumeAnnotations.get
* @desc Gets the volume annotation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.layers.volumeAnnotations.get({
+ * // The ID of the volume annotation to retrieve.
+ * annotationId: 'placeholder-value',
+ * // The ID for the layer to get the annotations.
+ * layerId: 'placeholder-value',
+ * // The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.
+ * locale: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // The volume to retrieve annotations for.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "annotationDataId": "my_annotationDataId",
+ * // "annotationDataLink": "my_annotationDataLink",
+ * // "annotationType": "my_annotationType",
+ * // "contentRanges": {},
+ * // "data": "my_data",
+ * // "deleted": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "layerId": "my_layerId",
+ * // "pageIds": [],
+ * // "selectedText": "my_selectedText",
+ * // "selfLink": "my_selfLink",
+ * // "updated": "my_updated",
+ * // "volumeId": "my_volumeId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.layers.volumeAnnotations.get
* @memberOf! ()
*
@@ -2719,6 +3464,78 @@ export namespace books_v1 {
/**
* books.layers.volumeAnnotations.list
* @desc Gets the volume annotations for a volume and layer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.layers.volumeAnnotations.list({
+ * // The content version for the requested volume.
+ * contentVersion: 'placeholder-value',
+ * // The end offset to end retrieving data from.
+ * endOffset: 'placeholder-value',
+ * // The end position to end retrieving data from.
+ * endPosition: 'placeholder-value',
+ * // The ID for the layer to get the annotations.
+ * layerId: 'placeholder-value',
+ * // The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.
+ * locale: 'placeholder-value',
+ * // Maximum number of results to return
+ * maxResults: 'placeholder-value',
+ * // The value of the nextToken from the previous page.
+ * pageToken: 'placeholder-value',
+ * // Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false.
+ * showDeleted: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // The start offset to start retrieving data from.
+ * startOffset: 'placeholder-value',
+ * // The start position to start retrieving data from.
+ * startPosition: 'placeholder-value',
+ * // RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).
+ * updatedMax: 'placeholder-value',
+ * // RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).
+ * updatedMin: 'placeholder-value',
+ * // The version of the volume annotations that you are requesting.
+ * volumeAnnotationsVersion: 'placeholder-value',
+ * // The volume to retrieve annotations for.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "totalItems": 0,
+ * // "version": "my_version"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.layers.volumeAnnotations.list
* @memberOf! ()
*
@@ -2910,6 +3727,45 @@ export namespace books_v1 {
/**
* books.myconfig.getUserSettings
* @desc Gets the current settings for the user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.myconfig.getUserSettings({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "notesExport": {},
+ * // "notification": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.myconfig.getUserSettings
* @memberOf! ()
*
@@ -2983,6 +3839,53 @@ export namespace books_v1 {
/**
* books.myconfig.releaseDownloadAccess
* @desc Release downloaded content access restriction.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.myconfig.releaseDownloadAccess({
+ * // The device/version ID from which to release the restriction.
+ * cpksver: 'placeholder-value',
+ * // ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.
+ * locale: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // The volume(s) to release restrictions for.
+ * volumeIds: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "downloadAccessList": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.myconfig.releaseDownloadAccess
* @memberOf! ()
*
@@ -3062,6 +3965,58 @@ export namespace books_v1 {
/**
* books.myconfig.requestAccess
* @desc Request concurrent and download access restrictions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.myconfig.requestAccess({
+ * // The device/version ID from which to request the restrictions.
+ * cpksver: 'placeholder-value',
+ * // The type of access license to request. If not specified, the default is BOTH.
+ * licenseTypes: 'placeholder-value',
+ * // ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.
+ * locale: 'placeholder-value',
+ * // The client nonce value.
+ * nonce: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // The volume to request concurrent/download restrictions for.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "concurrentAccess": {},
+ * // "downloadAccess": {},
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.myconfig.requestAccess
* @memberOf! ()
*
@@ -3141,6 +4096,62 @@ export namespace books_v1 {
/**
* books.myconfig.syncVolumeLicenses
* @desc Request downloaded content access for specified volumes on the My eBooks shelf.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.myconfig.syncVolumeLicenses({
+ * // The device/version ID from which to release the restriction.
+ * cpksver: 'placeholder-value',
+ * // List of features supported by the client, i.e., 'RENTALS'
+ * features: 'placeholder-value',
+ * // Set to true to include non-comics series. Defaults to false.
+ * includeNonComicsSeries: 'placeholder-value',
+ * // ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.
+ * locale: 'placeholder-value',
+ * // The client nonce value.
+ * nonce: 'placeholder-value',
+ * // Set to true to show pre-ordered books. Defaults to false.
+ * showPreorders: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // The volume(s) to request download restrictions for.
+ * volumeIds: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "totalItems": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.myconfig.syncVolumeLicenses
* @memberOf! ()
*
@@ -3220,6 +4231,55 @@ export namespace books_v1 {
/**
* books.myconfig.updateUserSettings
* @desc Sets the settings for the user. If a sub-object is specified, it will overwrite the existing sub-object stored in the server. Unspecified sub-objects will retain the existing value.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.myconfig.updateUserSettings({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "notesExport": {},
+ * // "notification": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "notesExport": {},
+ * // "notification": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.myconfig.updateUserSettings
* @memberOf! ()
*
@@ -3434,6 +4494,43 @@ export namespace books_v1 {
/**
* books.mylibrary.annotations.delete
* @desc Deletes an annotation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.mylibrary.annotations.delete({
+ * // The ID for the annotation to delete.
+ * annotationId: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.mylibrary.annotations.delete
* @memberOf! ()
*
@@ -3506,6 +4603,92 @@ export namespace books_v1 {
/**
* books.mylibrary.annotations.insert
* @desc Inserts a new annotation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.mylibrary.annotations.insert({
+ * // The ID for the annotation to insert.
+ * annotationId: 'placeholder-value',
+ * // ISO-3166-1 code to override the IP-based location.
+ * country: 'placeholder-value',
+ * // Requests that only the summary of the specified layer be provided in the response.
+ * showOnlySummaryInResponse: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "afterSelectedText": "my_afterSelectedText",
+ * // "beforeSelectedText": "my_beforeSelectedText",
+ * // "clientVersionRanges": {},
+ * // "created": "my_created",
+ * // "currentVersionRanges": {},
+ * // "data": "my_data",
+ * // "deleted": false,
+ * // "highlightStyle": "my_highlightStyle",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "layerId": "my_layerId",
+ * // "layerSummary": {},
+ * // "pageIds": [],
+ * // "selectedText": "my_selectedText",
+ * // "selfLink": "my_selfLink",
+ * // "updated": "my_updated",
+ * // "volumeId": "my_volumeId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "afterSelectedText": "my_afterSelectedText",
+ * // "beforeSelectedText": "my_beforeSelectedText",
+ * // "clientVersionRanges": {},
+ * // "created": "my_created",
+ * // "currentVersionRanges": {},
+ * // "data": "my_data",
+ * // "deleted": false,
+ * // "highlightStyle": "my_highlightStyle",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "layerId": "my_layerId",
+ * // "layerSummary": {},
+ * // "pageIds": [],
+ * // "selectedText": "my_selectedText",
+ * // "selfLink": "my_selfLink",
+ * // "updated": "my_updated",
+ * // "volumeId": "my_volumeId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.mylibrary.annotations.insert
* @memberOf! ()
*
@@ -3584,6 +4767,67 @@ export namespace books_v1 {
/**
* books.mylibrary.annotations.list
* @desc Retrieves a list of annotations, possibly filtered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.mylibrary.annotations.list({
+ * // The content version for the requested volume.
+ * contentVersion: 'placeholder-value',
+ * // The layer ID to limit annotation by.
+ * layerId: 'placeholder-value',
+ * // The layer ID(s) to limit annotation by.
+ * layerIds: 'placeholder-value',
+ * // Maximum number of results to return
+ * maxResults: 'placeholder-value',
+ * // The value of the nextToken from the previous page.
+ * pageToken: 'placeholder-value',
+ * // Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false.
+ * showDeleted: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).
+ * updatedMax: 'placeholder-value',
+ * // RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).
+ * updatedMin: 'placeholder-value',
+ * // The volume to restrict annotations to.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "totalItems": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.mylibrary.annotations.list
* @memberOf! ()
*
@@ -3667,6 +4911,49 @@ export namespace books_v1 {
/**
* books.mylibrary.annotations.summary
* @desc Gets the summary of specified layers.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.mylibrary.annotations.summary({
+ * // Array of layer IDs to get the summary for.
+ * layerIds: 'placeholder-value',
+ * // Volume id to get the summary for.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "layers": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.mylibrary.annotations.summary
* @memberOf! ()
*
@@ -3742,6 +5029,88 @@ export namespace books_v1 {
/**
* books.mylibrary.annotations.update
* @desc Updates an existing annotation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.mylibrary.annotations.update({
+ * // The ID for the annotation to update.
+ * annotationId: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "afterSelectedText": "my_afterSelectedText",
+ * // "beforeSelectedText": "my_beforeSelectedText",
+ * // "clientVersionRanges": {},
+ * // "created": "my_created",
+ * // "currentVersionRanges": {},
+ * // "data": "my_data",
+ * // "deleted": false,
+ * // "highlightStyle": "my_highlightStyle",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "layerId": "my_layerId",
+ * // "layerSummary": {},
+ * // "pageIds": [],
+ * // "selectedText": "my_selectedText",
+ * // "selfLink": "my_selfLink",
+ * // "updated": "my_updated",
+ * // "volumeId": "my_volumeId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "afterSelectedText": "my_afterSelectedText",
+ * // "beforeSelectedText": "my_beforeSelectedText",
+ * // "clientVersionRanges": {},
+ * // "created": "my_created",
+ * // "currentVersionRanges": {},
+ * // "data": "my_data",
+ * // "deleted": false,
+ * // "highlightStyle": "my_highlightStyle",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "layerId": "my_layerId",
+ * // "layerSummary": {},
+ * // "pageIds": [],
+ * // "selectedText": "my_selectedText",
+ * // "selfLink": "my_selfLink",
+ * // "updated": "my_updated",
+ * // "volumeId": "my_volumeId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.mylibrary.annotations.update
* @memberOf! ()
*
@@ -3957,6 +5326,47 @@ export namespace books_v1 {
/**
* books.mylibrary.bookshelves.addVolume
* @desc Adds a volume to a bookshelf.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.mylibrary.bookshelves.addVolume({
+ * // The reason for which the book is added to the library.
+ * reason: 'placeholder-value',
+ * // ID of bookshelf to which to add a volume.
+ * shelf: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // ID of volume to add.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.mylibrary.bookshelves.addVolume
* @memberOf! ()
*
@@ -4031,6 +5441,43 @@ export namespace books_v1 {
/**
* books.mylibrary.bookshelves.clearVolumes
* @desc Clears all volumes from a bookshelf.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.mylibrary.bookshelves.clearVolumes({
+ * // ID of bookshelf from which to remove a volume.
+ * shelf: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.mylibrary.bookshelves.clearVolumes
* @memberOf! ()
*
@@ -4103,6 +5550,57 @@ export namespace books_v1 {
/**
* books.mylibrary.bookshelves.get
* @desc Retrieves metadata for a specific bookshelf belonging to the authenticated user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.mylibrary.bookshelves.get({
+ * // ID of bookshelf to retrieve.
+ * shelf: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "access": "my_access",
+ * // "created": "my_created",
+ * // "description": "my_description",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "selfLink": "my_selfLink",
+ * // "title": "my_title",
+ * // "updated": "my_updated",
+ * // "volumeCount": 0,
+ * // "volumesLastUpdated": "my_volumesLastUpdated"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.mylibrary.bookshelves.get
* @memberOf! ()
*
@@ -4178,6 +5676,47 @@ export namespace books_v1 {
/**
* books.mylibrary.bookshelves.list
* @desc Retrieves a list of bookshelves belonging to the authenticated user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.mylibrary.bookshelves.list({
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.mylibrary.bookshelves.list
* @memberOf! ()
*
@@ -4252,6 +5791,47 @@ export namespace books_v1 {
/**
* books.mylibrary.bookshelves.moveVolume
* @desc Moves a volume within a bookshelf.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.mylibrary.bookshelves.moveVolume({
+ * // ID of bookshelf with the volume.
+ * shelf: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // ID of volume to move.
+ * volumeId: 'placeholder-value',
+ * // Position on shelf to move the item (0 puts the item before the current first item, 1 puts it between the first and the second and so on.)
+ * volumePosition: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.mylibrary.bookshelves.moveVolume
* @memberOf! ()
*
@@ -4326,6 +5906,47 @@ export namespace books_v1 {
/**
* books.mylibrary.bookshelves.removeVolume
* @desc Removes a volume from a bookshelf.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.mylibrary.bookshelves.removeVolume({
+ * // The reason for which the book is removed from the library.
+ * reason: 'placeholder-value',
+ * // ID of bookshelf from which to remove a volume.
+ * shelf: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // ID of volume to remove.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.mylibrary.bookshelves.removeVolume
* @memberOf! ()
*
@@ -4524,6 +6145,62 @@ export namespace books_v1 {
/**
* books.mylibrary.bookshelves.volumes.list
* @desc Gets volume information for volumes on a bookshelf.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.mylibrary.bookshelves.volumes.list({
+ * // ISO-3166-1 code to override the IP-based location.
+ * country: 'placeholder-value',
+ * // Maximum number of results to return
+ * maxResults: 'placeholder-value',
+ * // Restrict information returned to a set of selected fields.
+ * projection: 'placeholder-value',
+ * // Full-text search query string in this bookshelf.
+ * q: 'placeholder-value',
+ * // The bookshelf ID or name retrieve volumes for.
+ * shelf: 'placeholder-value',
+ * // Set to true to show pre-ordered books. Defaults to false.
+ * showPreorders: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // Index of the first element to return (starts at 0)
+ * startIndex: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "totalItems": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.mylibrary.bookshelves.volumes.list
* @memberOf! ()
*
@@ -4650,6 +6327,56 @@ export namespace books_v1 {
/**
* books.mylibrary.readingpositions.get
* @desc Retrieves my reading position information for a volume.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.mylibrary.readingpositions.get({
+ * // Volume content version for which this reading position is requested.
+ * contentVersion: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // ID of volume for which to retrieve a reading position.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "epubCfiPosition": "my_epubCfiPosition",
+ * // "gbImagePosition": "my_gbImagePosition",
+ * // "gbTextPosition": "my_gbTextPosition",
+ * // "kind": "my_kind",
+ * // "pdfPosition": "my_pdfPosition",
+ * // "updated": "my_updated",
+ * // "volumeId": "my_volumeId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.mylibrary.readingpositions.get
* @memberOf! ()
*
@@ -4725,6 +6452,53 @@ export namespace books_v1 {
/**
* books.mylibrary.readingpositions.setPosition
* @desc Sets my reading position information for a volume.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.mylibrary.readingpositions.setPosition({
+ * // Action that caused this reading position to be set.
+ * action: 'placeholder-value',
+ * // Volume content version for which this reading position applies.
+ * contentVersion: 'placeholder-value',
+ * // Random persistent device cookie optional on set position.
+ * deviceCookie: 'placeholder-value',
+ * // Position string for the new volume reading position.
+ * position: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // RFC 3339 UTC format timestamp associated with this reading position.
+ * timestamp: 'placeholder-value',
+ * // ID of volume for which to update the reading position.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.mylibrary.readingpositions.setPosition
* @memberOf! ()
*
@@ -4867,6 +6641,65 @@ export namespace books_v1 {
/**
* books.notification.get
* @desc Returns notification details for a given notification id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.notification.get({
+ * // ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating notification title and body.
+ * locale: 'placeholder-value',
+ * // String to identify the notification.
+ * notification_id: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "body": "my_body",
+ * // "crmExperimentIds": [],
+ * // "doc_id": "my_doc_id",
+ * // "doc_type": "my_doc_type",
+ * // "dont_show_notification": false,
+ * // "iconUrl": "my_iconUrl",
+ * // "is_document_mature": false,
+ * // "kind": "my_kind",
+ * // "notificationGroup": "my_notificationGroup",
+ * // "notification_type": "my_notification_type",
+ * // "pcampaign_id": "my_pcampaign_id",
+ * // "reason": "my_reason",
+ * // "show_notification_settings_action": false,
+ * // "targetUrl": "my_targetUrl",
+ * // "timeToExpireMs": "my_timeToExpireMs",
+ * // "title": "my_title"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.notification.get
* @memberOf! ()
*
@@ -4969,6 +6802,47 @@ export namespace books_v1 {
/**
* books.onboarding.listCategories
* @desc List categories for onboarding experience.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.onboarding.listCategories({
+ * // ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset.
+ * locale: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.onboarding.listCategories
* @memberOf! ()
*
@@ -5041,6 +6915,56 @@ export namespace books_v1 {
/**
* books.onboarding.listCategoryVolumes
* @desc List available volumes under categories for onboarding experience.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.onboarding.listCategoryVolumes({
+ * // List of category ids requested.
+ * categoryId: 'placeholder-value',
+ * // ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset.
+ * locale: 'placeholder-value',
+ * // The maximum allowed maturity rating of returned volumes. Books with a higher maturity rating are filtered out.
+ * maxAllowedMaturityRating: 'placeholder-value',
+ * // Number of maximum results per page to be included in the response.
+ * pageSize: 'placeholder-value',
+ * // The value of the nextToken from the previous page.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.onboarding.listCategoryVolumes
* @memberOf! ()
*
@@ -5165,6 +7089,52 @@ export namespace books_v1 {
/**
* books.personalizedstream.get
* @desc Returns a stream of personalized book clusters
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.personalizedstream.get({
+ * // ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.
+ * locale: 'placeholder-value',
+ * // The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out.
+ * maxAllowedMaturityRating: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusters": [],
+ * // "kind": "my_kind",
+ * // "totalClusters": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.personalizedstream.get
* @memberOf! ()
*
@@ -5268,6 +7238,55 @@ export namespace books_v1 {
/**
* books.promooffer.accept
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.promooffer.accept({
+ * // device android_id
+ * androidId: 'placeholder-value',
+ * // device device
+ * device: 'placeholder-value',
+ * // device manufacturer
+ * manufacturer: 'placeholder-value',
+ * // device model
+ * model: 'placeholder-value',
+ *
+ * offerId: 'placeholder-value',
+ * // device product
+ * product: 'placeholder-value',
+ * // device serial
+ * serial: 'placeholder-value',
+ * // Volume id to exercise the offer
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.promooffer.accept
* @memberOf! ()
*
@@ -5346,6 +7365,53 @@ export namespace books_v1 {
/**
* books.promooffer.dismiss
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.promooffer.dismiss({
+ * // device android_id
+ * androidId: 'placeholder-value',
+ * // device device
+ * device: 'placeholder-value',
+ * // device manufacturer
+ * manufacturer: 'placeholder-value',
+ * // device model
+ * model: 'placeholder-value',
+ * // Offer to dimiss
+ * offerId: 'placeholder-value',
+ * // device product
+ * product: 'placeholder-value',
+ * // device serial
+ * serial: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.promooffer.dismiss
* @memberOf! ()
*
@@ -5424,6 +7490,57 @@ export namespace books_v1 {
/**
* books.promooffer.get
* @desc Returns a list of promo offers available to the user
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.promooffer.get({
+ * // device android_id
+ * androidId: 'placeholder-value',
+ * // device device
+ * device: 'placeholder-value',
+ * // device manufacturer
+ * manufacturer: 'placeholder-value',
+ * // device model
+ * model: 'placeholder-value',
+ * // device product
+ * product: 'placeholder-value',
+ * // device serial
+ * serial: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.promooffer.get
* @memberOf! ()
*
@@ -5617,6 +7734,47 @@ export namespace books_v1 {
/**
* books.series.get
* @desc Returns Series metadata for the given series ids.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.series.get({
+ * // String that identifies the series
+ * series_id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "series": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.series.get
* @memberOf! ()
*
@@ -5707,6 +7865,52 @@ export namespace books_v1 {
/**
* books.series.membership.get
* @desc Returns Series membership data given the series id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.series.membership.get({
+ * // Number of maximum results per page to be included in the response.
+ * page_size: 'placeholder-value',
+ * // The value of the nextToken from the previous page.
+ * page_token: 'placeholder-value',
+ * // String that identifies the series
+ * series_id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "member": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.series.membership.get
* @memberOf! ()
*
@@ -5819,6 +8023,68 @@ export namespace books_v1 {
/**
* books.volumes.get
* @desc Gets volume information for a single volume.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.volumes.get({
+ * // ISO-3166-1 code to override the IP-based location.
+ * country: 'placeholder-value',
+ * // Set to true to include non-comics series. Defaults to false.
+ * includeNonComicsSeries: 'placeholder-value',
+ * // Brand results for partner ID.
+ * partner: 'placeholder-value',
+ * // Restrict information returned to a set of selected fields.
+ * projection: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ *
+ * user_library_consistent_read: 'placeholder-value',
+ * // ID of volume to retrieve.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accessInfo": {},
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "layerInfo": {},
+ * // "recommendedInfo": {},
+ * // "saleInfo": {},
+ * // "searchInfo": {},
+ * // "selfLink": "my_selfLink",
+ * // "userInfo": {},
+ * // "volumeInfo": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.volumes.get
* @memberOf! ()
*
@@ -5896,6 +8162,74 @@ export namespace books_v1 {
/**
* books.volumes.list
* @desc Performs a book search.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.volumes.list({
+ * // Restrict to volumes by download availability.
+ * download: 'placeholder-value',
+ * // Filter search results.
+ * filter: 'placeholder-value',
+ * // Restrict results to books with this language code.
+ * langRestrict: 'placeholder-value',
+ * // Restrict search to this user's library.
+ * libraryRestrict: 'placeholder-value',
+ * // The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out.
+ * maxAllowedMaturityRating: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Sort search results.
+ * orderBy: 'placeholder-value',
+ * // Restrict and brand results for partner ID.
+ * partner: 'placeholder-value',
+ * // Restrict to books or magazines.
+ * printType: 'placeholder-value',
+ * // Restrict information returned to a set of selected fields.
+ * projection: 'placeholder-value',
+ * // Full-text search query string.
+ * q: 'placeholder-value',
+ * // Set to true to show books available for preorder. Defaults to false.
+ * showPreorders: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // Index of the first result to return (starts at 0)
+ * startIndex: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "totalItems": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.volumes.list
* @memberOf! ()
*
@@ -6083,6 +8417,56 @@ export namespace books_v1 {
/**
* books.volumes.associated.list
* @desc Return a list of associated books.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.volumes.associated.list({
+ * // Association type.
+ * association: 'placeholder-value',
+ * // ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.
+ * locale: 'placeholder-value',
+ * // The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out.
+ * maxAllowedMaturityRating: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // ID of the source volume.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "totalItems": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.volumes.associated.list
* @memberOf! ()
*
@@ -6195,6 +8579,60 @@ export namespace books_v1 {
/**
* books.volumes.mybooks.list
* @desc Return a list of books in My Library.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.volumes.mybooks.list({
+ * // How the book was acquired
+ * acquireMethod: 'placeholder-value',
+ * // ISO-3166-1 code to override the IP-based location.
+ * country: 'placeholder-value',
+ * // ISO-639-1 language and ISO-3166-1 country code. Ex:'en_US'. Used for generating recommendations.
+ * locale: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // The processing state of the user uploaded volumes to be returned. Applicable only if the UPLOADED is specified in the acquireMethod.
+ * processingState: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // Index of the first result to return (starts at 0)
+ * startIndex: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "totalItems": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.volumes.mybooks.list
* @memberOf! ()
*
@@ -6317,6 +8755,52 @@ export namespace books_v1 {
/**
* books.volumes.recommended.list
* @desc Return a list of recommended books for the current user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.volumes.recommended.list({
+ * // ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.
+ * locale: 'placeholder-value',
+ * // The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out.
+ * maxAllowedMaturityRating: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "totalItems": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.volumes.recommended.list
* @memberOf! ()
*
@@ -6391,6 +8875,52 @@ export namespace books_v1 {
/**
* books.volumes.recommended.rate
* @desc Rate a recommended book for the current user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.volumes.recommended.rate({
+ * // ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.
+ * locale: 'placeholder-value',
+ * // Rating to be given to the volume.
+ * rating: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // ID of the source volume.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "consistency_token": "my_consistency_token"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.volumes.recommended.rate
* @memberOf! ()
*
@@ -6531,6 +9061,58 @@ export namespace books_v1 {
/**
* books.volumes.useruploaded.list
* @desc Return a list of books uploaded by the current user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/books.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const books = google.books('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/books'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await books.volumes.useruploaded.list({
+ * // ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.
+ * locale: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // The processing state of the user uploaded volumes to be returned.
+ * processingState: 'placeholder-value',
+ * // String to identify the originator of this request.
+ * source: 'placeholder-value',
+ * // Index of the first result to return (starts at 0)
+ * startIndex: 'placeholder-value',
+ * // The ids of the volumes to be returned. If not specified all that match the processingState are returned.
+ * volumeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "totalItems": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias books.volumes.useruploaded.list
* @memberOf! ()
*
diff --git a/src/apis/calendar/v3.ts b/src/apis/calendar/v3.ts
index 47b603acd43..e3ccbf70fd3 100644
--- a/src/apis/calendar/v3.ts
+++ b/src/apis/calendar/v3.ts
@@ -955,6 +955,43 @@ export namespace calendar_v3 {
/**
* calendar.acl.delete
* @desc Deletes an access control rule.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/calendar'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.acl.delete({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // ACL rule identifier.
+ * ruleId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.acl.delete
* @memberOf! ()
*
@@ -1026,6 +1063,55 @@ export namespace calendar_v3 {
/**
* calendar.acl.get
* @desc Returns an access control rule.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.acl.get({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // ACL rule identifier.
+ * ruleId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "role": "my_role",
+ * // "scope": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.acl.get
* @memberOf! ()
*
@@ -1097,6 +1183,64 @@ export namespace calendar_v3 {
/**
* calendar.acl.insert
* @desc Creates an access control rule.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/calendar'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.acl.insert({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // Whether to send notifications about the calendar sharing change. Optional. The default is True.
+ * sendNotifications: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "role": "my_role",
+ * // "scope": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "role": "my_role",
+ * // "scope": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.acl.insert
* @memberOf! ()
*
@@ -1170,6 +1314,61 @@ export namespace calendar_v3 {
/**
* calendar.acl.list
* @desc Returns the rules in the access control list for the calendar.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/calendar'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.acl.list({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional.
+ * maxResults: 'placeholder-value',
+ * // Token specifying which result page to return. Optional.
+ * pageToken: 'placeholder-value',
+ * // Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to "none". Deleted ACLs will always be included if syncToken is provided. Optional. The default is False.
+ * showDeleted: 'placeholder-value',
+ * // Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All entries deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False.
+ * // If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken.
+ * // Learn more about incremental synchronization.
+ * // Optional. The default is to return all entries.
+ * syncToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "nextSyncToken": "my_nextSyncToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.acl.list
* @memberOf! ()
*
@@ -1245,6 +1444,66 @@ export namespace calendar_v3 {
/**
* calendar.acl.patch
* @desc Updates an access control rule. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/calendar'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.acl.patch({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // ACL rule identifier.
+ * ruleId: 'placeholder-value',
+ * // Whether to send notifications about the calendar sharing change. Note that there are no notifications on access removal. Optional. The default is True.
+ * sendNotifications: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "role": "my_role",
+ * // "scope": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "role": "my_role",
+ * // "scope": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.acl.patch
* @memberOf! ()
*
@@ -1318,6 +1577,66 @@ export namespace calendar_v3 {
/**
* calendar.acl.update
* @desc Updates an access control rule.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/calendar'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.acl.update({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // ACL rule identifier.
+ * ruleId: 'placeholder-value',
+ * // Whether to send notifications about the calendar sharing change. Note that there are no notifications on access removal. Optional. The default is True.
+ * sendNotifications: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "role": "my_role",
+ * // "scope": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "role": "my_role",
+ * // "scope": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.acl.update
* @memberOf! ()
*
@@ -1391,6 +1710,83 @@ export namespace calendar_v3 {
/**
* calendar.acl.watch
* @desc Watch for changes to ACL resources.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/calendar'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.acl.watch({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional.
+ * maxResults: 'placeholder-value',
+ * // Token specifying which result page to return. Optional.
+ * pageToken: 'placeholder-value',
+ * // Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to "none". Deleted ACLs will always be included if syncToken is provided. Optional. The default is False.
+ * showDeleted: 'placeholder-value',
+ * // Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All entries deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False.
+ * // If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken.
+ * // Learn more about incremental synchronization.
+ * // Optional. The default is to return all entries.
+ * syncToken: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": "my_address",
+ * // "expiration": "my_expiration",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "params": {},
+ * // "payload": false,
+ * // "resourceId": "my_resourceId",
+ * // "resourceUri": "my_resourceUri",
+ * // "token": "my_token",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": "my_address",
+ * // "expiration": "my_expiration",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "params": {},
+ * // "payload": false,
+ * // "resourceId": "my_resourceId",
+ * // "resourceUri": "my_resourceUri",
+ * // "token": "my_token",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.acl.watch
* @memberOf! ()
*
@@ -1631,6 +2027,41 @@ export namespace calendar_v3 {
/**
* calendar.calendarList.delete
* @desc Removes a calendar from the user's calendar list.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/calendar'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.calendarList.delete({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.calendarList.delete
* @memberOf! ()
*
@@ -1702,6 +2133,67 @@ export namespace calendar_v3 {
/**
* calendar.calendarList.get
* @desc Returns a calendar from the user's calendar list.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.calendarList.get({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accessRole": "my_accessRole",
+ * // "backgroundColor": "my_backgroundColor",
+ * // "colorId": "my_colorId",
+ * // "conferenceProperties": {},
+ * // "defaultReminders": [],
+ * // "deleted": false,
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "foregroundColor": "my_foregroundColor",
+ * // "hidden": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "notificationSettings": {},
+ * // "primary": false,
+ * // "selected": false,
+ * // "summary": "my_summary",
+ * // "summaryOverride": "my_summaryOverride",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.calendarList.get
* @memberOf! ()
*
@@ -1774,6 +2266,90 @@ export namespace calendar_v3 {
/**
* calendar.calendarList.insert
* @desc Inserts an existing calendar into the user's calendar list.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/calendar'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.calendarList.insert({
+ * // Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be set to the best matching option automatically. Optional. The default is False.
+ * colorRgbFormat: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accessRole": "my_accessRole",
+ * // "backgroundColor": "my_backgroundColor",
+ * // "colorId": "my_colorId",
+ * // "conferenceProperties": {},
+ * // "defaultReminders": [],
+ * // "deleted": false,
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "foregroundColor": "my_foregroundColor",
+ * // "hidden": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "notificationSettings": {},
+ * // "primary": false,
+ * // "selected": false,
+ * // "summary": "my_summary",
+ * // "summaryOverride": "my_summaryOverride",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accessRole": "my_accessRole",
+ * // "backgroundColor": "my_backgroundColor",
+ * // "colorId": "my_colorId",
+ * // "conferenceProperties": {},
+ * // "defaultReminders": [],
+ * // "deleted": false,
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "foregroundColor": "my_foregroundColor",
+ * // "hidden": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "notificationSettings": {},
+ * // "primary": false,
+ * // "selected": false,
+ * // "summary": "my_summary",
+ * // "summaryOverride": "my_summaryOverride",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.calendarList.insert
* @memberOf! ()
*
@@ -1849,6 +2425,67 @@ export namespace calendar_v3 {
/**
* calendar.calendarList.list
* @desc Returns the calendars on the user's calendar list.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.calendarList.list({
+ * // Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional.
+ * maxResults: 'placeholder-value',
+ * // The minimum access role for the user in the returned entries. Optional. The default is no restriction.
+ * minAccessRole: 'placeholder-value',
+ * // Token specifying which result page to return. Optional.
+ * pageToken: 'placeholder-value',
+ * // Whether to include deleted calendar list entries in the result. Optional. The default is False.
+ * showDeleted: 'placeholder-value',
+ * // Whether to show hidden entries. Optional. The default is False.
+ * showHidden: 'placeholder-value',
+ * // Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. If only read-only fields such as calendar properties or ACLs have changed, the entry won't be returned. All entries deleted and hidden since the previous list request will always be in the result set and it is not allowed to set showDeleted neither showHidden to False.
+ * // To ensure client state consistency minAccessRole query parameter cannot be specified together with nextSyncToken.
+ * // If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken.
+ * // Learn more about incremental synchronization.
+ * // Optional. The default is to return all entries.
+ * syncToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "nextSyncToken": "my_nextSyncToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.calendarList.list
* @memberOf! ()
*
@@ -1928,6 +2565,92 @@ export namespace calendar_v3 {
/**
* calendar.calendarList.patch
* @desc Updates an existing calendar on the user's calendar list. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/calendar'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.calendarList.patch({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be set to the best matching option automatically. Optional. The default is False.
+ * colorRgbFormat: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accessRole": "my_accessRole",
+ * // "backgroundColor": "my_backgroundColor",
+ * // "colorId": "my_colorId",
+ * // "conferenceProperties": {},
+ * // "defaultReminders": [],
+ * // "deleted": false,
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "foregroundColor": "my_foregroundColor",
+ * // "hidden": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "notificationSettings": {},
+ * // "primary": false,
+ * // "selected": false,
+ * // "summary": "my_summary",
+ * // "summaryOverride": "my_summaryOverride",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accessRole": "my_accessRole",
+ * // "backgroundColor": "my_backgroundColor",
+ * // "colorId": "my_colorId",
+ * // "conferenceProperties": {},
+ * // "defaultReminders": [],
+ * // "deleted": false,
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "foregroundColor": "my_foregroundColor",
+ * // "hidden": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "notificationSettings": {},
+ * // "primary": false,
+ * // "selected": false,
+ * // "summary": "my_summary",
+ * // "summaryOverride": "my_summaryOverride",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.calendarList.patch
* @memberOf! ()
*
@@ -2003,6 +2726,92 @@ export namespace calendar_v3 {
/**
* calendar.calendarList.update
* @desc Updates an existing calendar on the user's calendar list.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/calendar'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.calendarList.update({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be set to the best matching option automatically. Optional. The default is False.
+ * colorRgbFormat: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accessRole": "my_accessRole",
+ * // "backgroundColor": "my_backgroundColor",
+ * // "colorId": "my_colorId",
+ * // "conferenceProperties": {},
+ * // "defaultReminders": [],
+ * // "deleted": false,
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "foregroundColor": "my_foregroundColor",
+ * // "hidden": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "notificationSettings": {},
+ * // "primary": false,
+ * // "selected": false,
+ * // "summary": "my_summary",
+ * // "summaryOverride": "my_summaryOverride",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accessRole": "my_accessRole",
+ * // "backgroundColor": "my_backgroundColor",
+ * // "colorId": "my_colorId",
+ * // "conferenceProperties": {},
+ * // "defaultReminders": [],
+ * // "deleted": false,
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "foregroundColor": "my_foregroundColor",
+ * // "hidden": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "notificationSettings": {},
+ * // "primary": false,
+ * // "selected": false,
+ * // "summary": "my_summary",
+ * // "summaryOverride": "my_summaryOverride",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.calendarList.update
* @memberOf! ()
*
@@ -2078,6 +2887,89 @@ export namespace calendar_v3 {
/**
* calendar.calendarList.watch
* @desc Watch for changes to CalendarList resources.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.calendarList.watch({
+ * // Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional.
+ * maxResults: 'placeholder-value',
+ * // The minimum access role for the user in the returned entries. Optional. The default is no restriction.
+ * minAccessRole: 'placeholder-value',
+ * // Token specifying which result page to return. Optional.
+ * pageToken: 'placeholder-value',
+ * // Whether to include deleted calendar list entries in the result. Optional. The default is False.
+ * showDeleted: 'placeholder-value',
+ * // Whether to show hidden entries. Optional. The default is False.
+ * showHidden: 'placeholder-value',
+ * // Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. If only read-only fields such as calendar properties or ACLs have changed, the entry won't be returned. All entries deleted and hidden since the previous list request will always be in the result set and it is not allowed to set showDeleted neither showHidden to False.
+ * // To ensure client state consistency minAccessRole query parameter cannot be specified together with nextSyncToken.
+ * // If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken.
+ * // Learn more about incremental synchronization.
+ * // Optional. The default is to return all entries.
+ * syncToken: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": "my_address",
+ * // "expiration": "my_expiration",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "params": {},
+ * // "payload": false,
+ * // "resourceId": "my_resourceId",
+ * // "resourceUri": "my_resourceUri",
+ * // "token": "my_token",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": "my_address",
+ * // "expiration": "my_expiration",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "params": {},
+ * // "payload": false,
+ * // "resourceId": "my_resourceId",
+ * // "resourceUri": "my_resourceUri",
+ * // "token": "my_token",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.calendarList.watch
* @memberOf! ()
*
@@ -2315,6 +3207,41 @@ export namespace calendar_v3 {
/**
* calendar.calendars.clear
* @desc Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/calendar'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.calendars.clear({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.calendars.clear
* @memberOf! ()
*
@@ -2385,6 +3312,41 @@ export namespace calendar_v3 {
/**
* calendar.calendars.delete
* @desc Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/calendar'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.calendars.delete({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.calendars.delete
* @memberOf! ()
*
@@ -2456,6 +3418,56 @@ export namespace calendar_v3 {
/**
* calendar.calendars.get
* @desc Returns metadata for a calendar.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.calendars.get({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "conferenceProperties": {},
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "summary": "my_summary",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.calendars.get
* @memberOf! ()
*
@@ -2527,6 +3539,65 @@ export namespace calendar_v3 {
/**
* calendar.calendars.insert
* @desc Creates a secondary calendar.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/calendar'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.calendars.insert({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "conferenceProperties": {},
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "summary": "my_summary",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "conferenceProperties": {},
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "summary": "my_summary",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.calendars.insert
* @memberOf! ()
*
@@ -2598,6 +3669,68 @@ export namespace calendar_v3 {
/**
* calendar.calendars.patch
* @desc Updates metadata for a calendar. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/calendar'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.calendars.patch({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "conferenceProperties": {},
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "summary": "my_summary",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "conferenceProperties": {},
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "summary": "my_summary",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.calendars.patch
* @memberOf! ()
*
@@ -2670,6 +3803,68 @@ export namespace calendar_v3 {
/**
* calendar.calendars.update
* @desc Updates metadata for a calendar.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/calendar'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.calendars.update({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "conferenceProperties": {},
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "summary": "my_summary",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "conferenceProperties": {},
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "summary": "my_summary",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.calendars.update
* @memberOf! ()
*
@@ -2826,6 +4021,61 @@ export namespace calendar_v3 {
/**
* calendar.channels.stop
* @desc Stop watching resources through this channel
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.events',
+ * 'https://www.googleapis.com/auth/calendar.events.readonly',
+ * 'https://www.googleapis.com/auth/calendar.readonly',
+ * 'https://www.googleapis.com/auth/calendar.settings.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.channels.stop({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": "my_address",
+ * // "expiration": "my_expiration",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "params": {},
+ * // "payload": false,
+ * // "resourceId": "my_resourceId",
+ * // "resourceUri": "my_resourceUri",
+ * // "token": "my_token",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.channels.stop
* @memberOf! ()
*
@@ -2916,6 +4166,49 @@ export namespace calendar_v3 {
/**
* calendar.colors.get
* @desc Returns the color definitions for calendars and events.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.colors.get({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "calendar": {},
+ * // "event": {},
+ * // "kind": "my_kind",
+ * // "updated": "my_updated"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.colors.get
* @memberOf! ()
*
@@ -3000,6 +4293,52 @@ export namespace calendar_v3 {
/**
* calendar.events.delete
* @desc Deletes an event.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.events',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.events.delete({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // Event identifier.
+ * eventId: 'placeholder-value',
+ * // Deprecated. Please use sendUpdates instead.
+ * //
+ * // Whether to send notifications about the deletion of the event. Note that some emails might still be sent even if you set the value to false. The default is false.
+ * sendNotifications: 'placeholder-value',
+ * // Guests who should receive notifications about the deletion of the event.
+ * sendUpdates: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.events.delete
* @memberOf! ()
*
@@ -3073,6 +4412,96 @@ export namespace calendar_v3 {
/**
* calendar.events.get
* @desc Returns an event.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.events',
+ * 'https://www.googleapis.com/auth/calendar.events.readonly',
+ * 'https://www.googleapis.com/auth/calendar.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.events.get({
+ * // Deprecated and ignored. A value will always be returned in the email field for the organizer, creator and attendees, even if no real email address is available (i.e. a generated, non-working value will be provided).
+ * alwaysIncludeEmail: 'placeholder-value',
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // Event identifier.
+ * eventId: 'placeholder-value',
+ * // The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional.
+ * maxAttendees: 'placeholder-value',
+ * // Time zone used in the response. Optional. The default is the time zone of the calendar.
+ * timeZone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "anyoneCanAddSelf": false,
+ * // "attachments": [],
+ * // "attendees": [],
+ * // "attendeesOmitted": false,
+ * // "colorId": "my_colorId",
+ * // "conferenceData": {},
+ * // "created": "my_created",
+ * // "creator": {},
+ * // "description": "my_description",
+ * // "end": {},
+ * // "endTimeUnspecified": false,
+ * // "etag": "my_etag",
+ * // "extendedProperties": {},
+ * // "gadget": {},
+ * // "guestsCanInviteOthers": false,
+ * // "guestsCanModify": false,
+ * // "guestsCanSeeOtherGuests": false,
+ * // "hangoutLink": "my_hangoutLink",
+ * // "htmlLink": "my_htmlLink",
+ * // "iCalUID": "my_iCalUID",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "locked": false,
+ * // "organizer": {},
+ * // "originalStartTime": {},
+ * // "privateCopy": false,
+ * // "recurrence": [],
+ * // "recurringEventId": "my_recurringEventId",
+ * // "reminders": {},
+ * // "sequence": 0,
+ * // "source": {},
+ * // "start": {},
+ * // "status": "my_status",
+ * // "summary": "my_summary",
+ * // "transparency": "my_transparency",
+ * // "updated": "my_updated",
+ * // "visibility": "my_visibility"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.events.get
* @memberOf! ()
*
@@ -3147,6 +4576,135 @@ export namespace calendar_v3 {
/**
* calendar.events.import
* @desc Imports an event. This operation is used to add a private copy of an existing event to a calendar.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.events',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.events.import({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // Version number of conference data supported by the API client. Version 0 assumes no conference data support and ignores conference data in the event's body. Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. The default is 0.
+ * conferenceDataVersion: 'placeholder-value',
+ * // Whether API client performing operation supports event attachments. Optional. The default is False.
+ * supportsAttachments: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "anyoneCanAddSelf": false,
+ * // "attachments": [],
+ * // "attendees": [],
+ * // "attendeesOmitted": false,
+ * // "colorId": "my_colorId",
+ * // "conferenceData": {},
+ * // "created": "my_created",
+ * // "creator": {},
+ * // "description": "my_description",
+ * // "end": {},
+ * // "endTimeUnspecified": false,
+ * // "etag": "my_etag",
+ * // "extendedProperties": {},
+ * // "gadget": {},
+ * // "guestsCanInviteOthers": false,
+ * // "guestsCanModify": false,
+ * // "guestsCanSeeOtherGuests": false,
+ * // "hangoutLink": "my_hangoutLink",
+ * // "htmlLink": "my_htmlLink",
+ * // "iCalUID": "my_iCalUID",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "locked": false,
+ * // "organizer": {},
+ * // "originalStartTime": {},
+ * // "privateCopy": false,
+ * // "recurrence": [],
+ * // "recurringEventId": "my_recurringEventId",
+ * // "reminders": {},
+ * // "sequence": 0,
+ * // "source": {},
+ * // "start": {},
+ * // "status": "my_status",
+ * // "summary": "my_summary",
+ * // "transparency": "my_transparency",
+ * // "updated": "my_updated",
+ * // "visibility": "my_visibility"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "anyoneCanAddSelf": false,
+ * // "attachments": [],
+ * // "attendees": [],
+ * // "attendeesOmitted": false,
+ * // "colorId": "my_colorId",
+ * // "conferenceData": {},
+ * // "created": "my_created",
+ * // "creator": {},
+ * // "description": "my_description",
+ * // "end": {},
+ * // "endTimeUnspecified": false,
+ * // "etag": "my_etag",
+ * // "extendedProperties": {},
+ * // "gadget": {},
+ * // "guestsCanInviteOthers": false,
+ * // "guestsCanModify": false,
+ * // "guestsCanSeeOtherGuests": false,
+ * // "hangoutLink": "my_hangoutLink",
+ * // "htmlLink": "my_htmlLink",
+ * // "iCalUID": "my_iCalUID",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "locked": false,
+ * // "organizer": {},
+ * // "originalStartTime": {},
+ * // "privateCopy": false,
+ * // "recurrence": [],
+ * // "recurringEventId": "my_recurringEventId",
+ * // "reminders": {},
+ * // "sequence": 0,
+ * // "source": {},
+ * // "start": {},
+ * // "status": "my_status",
+ * // "summary": "my_summary",
+ * // "transparency": "my_transparency",
+ * // "updated": "my_updated",
+ * // "visibility": "my_visibility"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.events.import
* @memberOf! ()
*
@@ -3220,6 +4778,143 @@ export namespace calendar_v3 {
/**
* calendar.events.insert
* @desc Creates an event.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.events',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.events.insert({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // Version number of conference data supported by the API client. Version 0 assumes no conference data support and ignores conference data in the event's body. Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. The default is 0.
+ * conferenceDataVersion: 'placeholder-value',
+ * // The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional.
+ * maxAttendees: 'placeholder-value',
+ * // Deprecated. Please use sendUpdates instead.
+ * //
+ * // Whether to send notifications about the creation of the new event. Note that some emails might still be sent even if you set the value to false. The default is false.
+ * sendNotifications: 'placeholder-value',
+ * // Whether to send notifications about the creation of the new event. Note that some emails might still be sent. The default is false.
+ * sendUpdates: 'placeholder-value',
+ * // Whether API client performing operation supports event attachments. Optional. The default is False.
+ * supportsAttachments: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "anyoneCanAddSelf": false,
+ * // "attachments": [],
+ * // "attendees": [],
+ * // "attendeesOmitted": false,
+ * // "colorId": "my_colorId",
+ * // "conferenceData": {},
+ * // "created": "my_created",
+ * // "creator": {},
+ * // "description": "my_description",
+ * // "end": {},
+ * // "endTimeUnspecified": false,
+ * // "etag": "my_etag",
+ * // "extendedProperties": {},
+ * // "gadget": {},
+ * // "guestsCanInviteOthers": false,
+ * // "guestsCanModify": false,
+ * // "guestsCanSeeOtherGuests": false,
+ * // "hangoutLink": "my_hangoutLink",
+ * // "htmlLink": "my_htmlLink",
+ * // "iCalUID": "my_iCalUID",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "locked": false,
+ * // "organizer": {},
+ * // "originalStartTime": {},
+ * // "privateCopy": false,
+ * // "recurrence": [],
+ * // "recurringEventId": "my_recurringEventId",
+ * // "reminders": {},
+ * // "sequence": 0,
+ * // "source": {},
+ * // "start": {},
+ * // "status": "my_status",
+ * // "summary": "my_summary",
+ * // "transparency": "my_transparency",
+ * // "updated": "my_updated",
+ * // "visibility": "my_visibility"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "anyoneCanAddSelf": false,
+ * // "attachments": [],
+ * // "attendees": [],
+ * // "attendeesOmitted": false,
+ * // "colorId": "my_colorId",
+ * // "conferenceData": {},
+ * // "created": "my_created",
+ * // "creator": {},
+ * // "description": "my_description",
+ * // "end": {},
+ * // "endTimeUnspecified": false,
+ * // "etag": "my_etag",
+ * // "extendedProperties": {},
+ * // "gadget": {},
+ * // "guestsCanInviteOthers": false,
+ * // "guestsCanModify": false,
+ * // "guestsCanSeeOtherGuests": false,
+ * // "hangoutLink": "my_hangoutLink",
+ * // "htmlLink": "my_htmlLink",
+ * // "iCalUID": "my_iCalUID",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "locked": false,
+ * // "organizer": {},
+ * // "originalStartTime": {},
+ * // "privateCopy": false,
+ * // "recurrence": [],
+ * // "recurringEventId": "my_recurringEventId",
+ * // "reminders": {},
+ * // "sequence": 0,
+ * // "source": {},
+ * // "start": {},
+ * // "status": "my_status",
+ * // "summary": "my_summary",
+ * // "transparency": "my_transparency",
+ * // "updated": "my_updated",
+ * // "visibility": "my_visibility"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.events.insert
* @memberOf! ()
*
@@ -3296,6 +4991,81 @@ export namespace calendar_v3 {
/**
* calendar.events.instances
* @desc Returns instances of the specified recurring event.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.events',
+ * 'https://www.googleapis.com/auth/calendar.events.readonly',
+ * 'https://www.googleapis.com/auth/calendar.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.events.instances({
+ * // Deprecated and ignored. A value will always be returned in the email field for the organizer, creator and attendees, even if no real email address is available (i.e. a generated, non-working value will be provided).
+ * alwaysIncludeEmail: 'placeholder-value',
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // Recurring event identifier.
+ * eventId: 'placeholder-value',
+ * // The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional.
+ * maxAttendees: 'placeholder-value',
+ * // Maximum number of events returned on one result page. By default the value is 250 events. The page size can never be larger than 2500 events. Optional.
+ * maxResults: 'placeholder-value',
+ * // The original start time of the instance in the result. Optional.
+ * originalStart: 'placeholder-value',
+ * // Token specifying which result page to return. Optional.
+ * pageToken: 'placeholder-value',
+ * // Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events will still be included if singleEvents is False. Optional. The default is False.
+ * showDeleted: 'placeholder-value',
+ * // Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. Must be an RFC3339 timestamp with mandatory time zone offset.
+ * timeMax: 'placeholder-value',
+ * // Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. Must be an RFC3339 timestamp with mandatory time zone offset.
+ * timeMin: 'placeholder-value',
+ * // Time zone used in the response. Optional. The default is the time zone of the calendar.
+ * timeZone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accessRole": "my_accessRole",
+ * // "defaultReminders": [],
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "nextSyncToken": "my_nextSyncToken",
+ * // "summary": "my_summary",
+ * // "timeZone": "my_timeZone",
+ * // "updated": "my_updated"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.events.instances
* @memberOf! ()
*
@@ -3377,6 +5147,108 @@ export namespace calendar_v3 {
/**
* calendar.events.list
* @desc Returns events on the specified calendar.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.events',
+ * 'https://www.googleapis.com/auth/calendar.events.readonly',
+ * 'https://www.googleapis.com/auth/calendar.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.events.list({
+ * // Deprecated and ignored. A value will always be returned in the email field for the organizer, creator and attendees, even if no real email address is available (i.e. a generated, non-working value will be provided).
+ * alwaysIncludeEmail: 'placeholder-value',
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // Specifies event ID in the iCalendar format to be included in the response. Optional.
+ * iCalUID: 'placeholder-value',
+ * // The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional.
+ * maxAttendees: 'placeholder-value',
+ * // Maximum number of events returned on one result page. The number of events in the resulting page may be less than this value, or none at all, even if there are more events matching the query. Incomplete pages can be detected by a non-empty nextPageToken field in the response. By default the value is 250 events. The page size can never be larger than 2500 events. Optional.
+ * maxResults: 'placeholder-value',
+ * // The order of the events returned in the result. Optional. The default is an unspecified, stable order.
+ * orderBy: 'placeholder-value',
+ * // Token specifying which result page to return. Optional.
+ * pageToken: 'placeholder-value',
+ * // Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return events that match all given constraints.
+ * privateExtendedProperty: 'placeholder-value',
+ * // Free text search terms to find events that match these terms in any field, except for extended properties. Optional.
+ * q: 'placeholder-value',
+ * // Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events that match all given constraints.
+ * sharedExtendedProperty: 'placeholder-value',
+ * // Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. Optional. The default is False.
+ * showDeleted: 'placeholder-value',
+ * // Whether to include hidden invitations in the result. Optional. The default is False.
+ * showHiddenInvitations: 'placeholder-value',
+ * // Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. Optional. The default is False.
+ * singleEvents: 'placeholder-value',
+ * // Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All events deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False.
+ * // There are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state.
+ * //
+ * // These are:
+ * // - iCalUID
+ * // - orderBy
+ * // - privateExtendedProperty
+ * // - q
+ * // - sharedExtendedProperty
+ * // - timeMin
+ * // - timeMax
+ * // - updatedMin If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken.
+ * // Learn more about incremental synchronization.
+ * // Optional. The default is to return all entries.
+ * syncToken: 'placeholder-value',
+ * // Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided but are ignored. If timeMin is set, timeMax must be greater than timeMin.
+ * timeMax: 'placeholder-value',
+ * // Lower bound (exclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided but are ignored. If timeMax is set, timeMin must be smaller than timeMax.
+ * timeMin: 'placeholder-value',
+ * // Time zone used in the response. Optional. The default is the time zone of the calendar.
+ * timeZone: 'placeholder-value',
+ * // Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by. When specified, entries deleted since this time will always be included regardless of showDeleted. Optional. The default is not to filter by last modification time.
+ * updatedMin: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accessRole": "my_accessRole",
+ * // "defaultReminders": [],
+ * // "description": "my_description",
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "nextSyncToken": "my_nextSyncToken",
+ * // "summary": "my_summary",
+ * // "timeZone": "my_timeZone",
+ * // "updated": "my_updated"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.events.list
* @memberOf! ()
*
@@ -3464,6 +5336,96 @@ export namespace calendar_v3 {
/**
* calendar.events.move
* @desc Moves an event to another calendar, i.e. changes an event's organizer.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.events',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.events.move({
+ * // Calendar identifier of the source calendar where the event currently is on.
+ * calendarId: 'placeholder-value',
+ * // Calendar identifier of the target calendar where the event is to be moved to.
+ * destination: 'placeholder-value',
+ * // Event identifier.
+ * eventId: 'placeholder-value',
+ * // Deprecated. Please use sendUpdates instead.
+ * //
+ * // Whether to send notifications about the change of the event's organizer. Note that some emails might still be sent even if you set the value to false. The default is false.
+ * sendNotifications: 'placeholder-value',
+ * // Guests who should receive notifications about the change of the event's organizer.
+ * sendUpdates: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "anyoneCanAddSelf": false,
+ * // "attachments": [],
+ * // "attendees": [],
+ * // "attendeesOmitted": false,
+ * // "colorId": "my_colorId",
+ * // "conferenceData": {},
+ * // "created": "my_created",
+ * // "creator": {},
+ * // "description": "my_description",
+ * // "end": {},
+ * // "endTimeUnspecified": false,
+ * // "etag": "my_etag",
+ * // "extendedProperties": {},
+ * // "gadget": {},
+ * // "guestsCanInviteOthers": false,
+ * // "guestsCanModify": false,
+ * // "guestsCanSeeOtherGuests": false,
+ * // "hangoutLink": "my_hangoutLink",
+ * // "htmlLink": "my_htmlLink",
+ * // "iCalUID": "my_iCalUID",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "locked": false,
+ * // "organizer": {},
+ * // "originalStartTime": {},
+ * // "privateCopy": false,
+ * // "recurrence": [],
+ * // "recurringEventId": "my_recurringEventId",
+ * // "reminders": {},
+ * // "sequence": 0,
+ * // "source": {},
+ * // "start": {},
+ * // "status": "my_status",
+ * // "summary": "my_summary",
+ * // "transparency": "my_transparency",
+ * // "updated": "my_updated",
+ * // "visibility": "my_visibility"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.events.move
* @memberOf! ()
*
@@ -3539,6 +5501,147 @@ export namespace calendar_v3 {
/**
* calendar.events.patch
* @desc Updates an event. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.events',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.events.patch({
+ * // Deprecated and ignored. A value will always be returned in the email field for the organizer, creator and attendees, even if no real email address is available (i.e. a generated, non-working value will be provided).
+ * alwaysIncludeEmail: 'placeholder-value',
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // Version number of conference data supported by the API client. Version 0 assumes no conference data support and ignores conference data in the event's body. Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. The default is 0.
+ * conferenceDataVersion: 'placeholder-value',
+ * // Event identifier.
+ * eventId: 'placeholder-value',
+ * // The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional.
+ * maxAttendees: 'placeholder-value',
+ * // Deprecated. Please use sendUpdates instead.
+ * //
+ * // Whether to send notifications about the event update (for example, description changes, etc.). Note that some emails might still be sent even if you set the value to false. The default is false.
+ * sendNotifications: 'placeholder-value',
+ * // Guests who should receive notifications about the event update (for example, title changes, etc.).
+ * sendUpdates: 'placeholder-value',
+ * // Whether API client performing operation supports event attachments. Optional. The default is False.
+ * supportsAttachments: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "anyoneCanAddSelf": false,
+ * // "attachments": [],
+ * // "attendees": [],
+ * // "attendeesOmitted": false,
+ * // "colorId": "my_colorId",
+ * // "conferenceData": {},
+ * // "created": "my_created",
+ * // "creator": {},
+ * // "description": "my_description",
+ * // "end": {},
+ * // "endTimeUnspecified": false,
+ * // "etag": "my_etag",
+ * // "extendedProperties": {},
+ * // "gadget": {},
+ * // "guestsCanInviteOthers": false,
+ * // "guestsCanModify": false,
+ * // "guestsCanSeeOtherGuests": false,
+ * // "hangoutLink": "my_hangoutLink",
+ * // "htmlLink": "my_htmlLink",
+ * // "iCalUID": "my_iCalUID",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "locked": false,
+ * // "organizer": {},
+ * // "originalStartTime": {},
+ * // "privateCopy": false,
+ * // "recurrence": [],
+ * // "recurringEventId": "my_recurringEventId",
+ * // "reminders": {},
+ * // "sequence": 0,
+ * // "source": {},
+ * // "start": {},
+ * // "status": "my_status",
+ * // "summary": "my_summary",
+ * // "transparency": "my_transparency",
+ * // "updated": "my_updated",
+ * // "visibility": "my_visibility"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "anyoneCanAddSelf": false,
+ * // "attachments": [],
+ * // "attendees": [],
+ * // "attendeesOmitted": false,
+ * // "colorId": "my_colorId",
+ * // "conferenceData": {},
+ * // "created": "my_created",
+ * // "creator": {},
+ * // "description": "my_description",
+ * // "end": {},
+ * // "endTimeUnspecified": false,
+ * // "etag": "my_etag",
+ * // "extendedProperties": {},
+ * // "gadget": {},
+ * // "guestsCanInviteOthers": false,
+ * // "guestsCanModify": false,
+ * // "guestsCanSeeOtherGuests": false,
+ * // "hangoutLink": "my_hangoutLink",
+ * // "htmlLink": "my_htmlLink",
+ * // "iCalUID": "my_iCalUID",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "locked": false,
+ * // "organizer": {},
+ * // "originalStartTime": {},
+ * // "privateCopy": false,
+ * // "recurrence": [],
+ * // "recurringEventId": "my_recurringEventId",
+ * // "reminders": {},
+ * // "sequence": 0,
+ * // "source": {},
+ * // "start": {},
+ * // "status": "my_status",
+ * // "summary": "my_summary",
+ * // "transparency": "my_transparency",
+ * // "updated": "my_updated",
+ * // "visibility": "my_visibility"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.events.patch
* @memberOf! ()
*
@@ -3617,6 +5720,94 @@ export namespace calendar_v3 {
/**
* calendar.events.quickAdd
* @desc Creates an event based on a simple text string.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.events',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.events.quickAdd({
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // Deprecated. Please use sendUpdates instead.
+ * //
+ * // Whether to send notifications about the creation of the event. Note that some emails might still be sent even if you set the value to false. The default is false.
+ * sendNotifications: 'placeholder-value',
+ * // Guests who should receive notifications about the creation of the new event.
+ * sendUpdates: 'placeholder-value',
+ * // The text describing the event to be created.
+ * text: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "anyoneCanAddSelf": false,
+ * // "attachments": [],
+ * // "attendees": [],
+ * // "attendeesOmitted": false,
+ * // "colorId": "my_colorId",
+ * // "conferenceData": {},
+ * // "created": "my_created",
+ * // "creator": {},
+ * // "description": "my_description",
+ * // "end": {},
+ * // "endTimeUnspecified": false,
+ * // "etag": "my_etag",
+ * // "extendedProperties": {},
+ * // "gadget": {},
+ * // "guestsCanInviteOthers": false,
+ * // "guestsCanModify": false,
+ * // "guestsCanSeeOtherGuests": false,
+ * // "hangoutLink": "my_hangoutLink",
+ * // "htmlLink": "my_htmlLink",
+ * // "iCalUID": "my_iCalUID",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "locked": false,
+ * // "organizer": {},
+ * // "originalStartTime": {},
+ * // "privateCopy": false,
+ * // "recurrence": [],
+ * // "recurringEventId": "my_recurringEventId",
+ * // "reminders": {},
+ * // "sequence": 0,
+ * // "source": {},
+ * // "start": {},
+ * // "status": "my_status",
+ * // "summary": "my_summary",
+ * // "transparency": "my_transparency",
+ * // "updated": "my_updated",
+ * // "visibility": "my_visibility"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.events.quickAdd
* @memberOf! ()
*
@@ -3690,6 +5881,147 @@ export namespace calendar_v3 {
/**
* calendar.events.update
* @desc Updates an event.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.events',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.events.update({
+ * // Deprecated and ignored. A value will always be returned in the email field for the organizer, creator and attendees, even if no real email address is available (i.e. a generated, non-working value will be provided).
+ * alwaysIncludeEmail: 'placeholder-value',
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // Version number of conference data supported by the API client. Version 0 assumes no conference data support and ignores conference data in the event's body. Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. The default is 0.
+ * conferenceDataVersion: 'placeholder-value',
+ * // Event identifier.
+ * eventId: 'placeholder-value',
+ * // The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional.
+ * maxAttendees: 'placeholder-value',
+ * // Deprecated. Please use sendUpdates instead.
+ * //
+ * // Whether to send notifications about the event update (for example, description changes, etc.). Note that some emails might still be sent even if you set the value to false. The default is false.
+ * sendNotifications: 'placeholder-value',
+ * // Guests who should receive notifications about the event update (for example, title changes, etc.).
+ * sendUpdates: 'placeholder-value',
+ * // Whether API client performing operation supports event attachments. Optional. The default is False.
+ * supportsAttachments: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "anyoneCanAddSelf": false,
+ * // "attachments": [],
+ * // "attendees": [],
+ * // "attendeesOmitted": false,
+ * // "colorId": "my_colorId",
+ * // "conferenceData": {},
+ * // "created": "my_created",
+ * // "creator": {},
+ * // "description": "my_description",
+ * // "end": {},
+ * // "endTimeUnspecified": false,
+ * // "etag": "my_etag",
+ * // "extendedProperties": {},
+ * // "gadget": {},
+ * // "guestsCanInviteOthers": false,
+ * // "guestsCanModify": false,
+ * // "guestsCanSeeOtherGuests": false,
+ * // "hangoutLink": "my_hangoutLink",
+ * // "htmlLink": "my_htmlLink",
+ * // "iCalUID": "my_iCalUID",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "locked": false,
+ * // "organizer": {},
+ * // "originalStartTime": {},
+ * // "privateCopy": false,
+ * // "recurrence": [],
+ * // "recurringEventId": "my_recurringEventId",
+ * // "reminders": {},
+ * // "sequence": 0,
+ * // "source": {},
+ * // "start": {},
+ * // "status": "my_status",
+ * // "summary": "my_summary",
+ * // "transparency": "my_transparency",
+ * // "updated": "my_updated",
+ * // "visibility": "my_visibility"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "anyoneCanAddSelf": false,
+ * // "attachments": [],
+ * // "attendees": [],
+ * // "attendeesOmitted": false,
+ * // "colorId": "my_colorId",
+ * // "conferenceData": {},
+ * // "created": "my_created",
+ * // "creator": {},
+ * // "description": "my_description",
+ * // "end": {},
+ * // "endTimeUnspecified": false,
+ * // "etag": "my_etag",
+ * // "extendedProperties": {},
+ * // "gadget": {},
+ * // "guestsCanInviteOthers": false,
+ * // "guestsCanModify": false,
+ * // "guestsCanSeeOtherGuests": false,
+ * // "hangoutLink": "my_hangoutLink",
+ * // "htmlLink": "my_htmlLink",
+ * // "iCalUID": "my_iCalUID",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "location": "my_location",
+ * // "locked": false,
+ * // "organizer": {},
+ * // "originalStartTime": {},
+ * // "privateCopy": false,
+ * // "recurrence": [],
+ * // "recurringEventId": "my_recurringEventId",
+ * // "reminders": {},
+ * // "sequence": 0,
+ * // "source": {},
+ * // "start": {},
+ * // "status": "my_status",
+ * // "summary": "my_summary",
+ * // "transparency": "my_transparency",
+ * // "updated": "my_updated",
+ * // "visibility": "my_visibility"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.events.update
* @memberOf! ()
*
@@ -3768,6 +6100,124 @@ export namespace calendar_v3 {
/**
* calendar.events.watch
* @desc Watch for changes to Events resources.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.events',
+ * 'https://www.googleapis.com/auth/calendar.events.readonly',
+ * 'https://www.googleapis.com/auth/calendar.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.events.watch({
+ * // Deprecated and ignored. A value will always be returned in the email field for the organizer, creator and attendees, even if no real email address is available (i.e. a generated, non-working value will be provided).
+ * alwaysIncludeEmail: 'placeholder-value',
+ * // Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
+ * calendarId: 'placeholder-value',
+ * // Specifies event ID in the iCalendar format to be included in the response. Optional.
+ * iCalUID: 'placeholder-value',
+ * // The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional.
+ * maxAttendees: 'placeholder-value',
+ * // Maximum number of events returned on one result page. The number of events in the resulting page may be less than this value, or none at all, even if there are more events matching the query. Incomplete pages can be detected by a non-empty nextPageToken field in the response. By default the value is 250 events. The page size can never be larger than 2500 events. Optional.
+ * maxResults: 'placeholder-value',
+ * // The order of the events returned in the result. Optional. The default is an unspecified, stable order.
+ * orderBy: 'placeholder-value',
+ * // Token specifying which result page to return. Optional.
+ * pageToken: 'placeholder-value',
+ * // Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return events that match all given constraints.
+ * privateExtendedProperty: 'placeholder-value',
+ * // Free text search terms to find events that match these terms in any field, except for extended properties. Optional.
+ * q: 'placeholder-value',
+ * // Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events that match all given constraints.
+ * sharedExtendedProperty: 'placeholder-value',
+ * // Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. Optional. The default is False.
+ * showDeleted: 'placeholder-value',
+ * // Whether to include hidden invitations in the result. Optional. The default is False.
+ * showHiddenInvitations: 'placeholder-value',
+ * // Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. Optional. The default is False.
+ * singleEvents: 'placeholder-value',
+ * // Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All events deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False.
+ * // There are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state.
+ * //
+ * // These are:
+ * // - iCalUID
+ * // - orderBy
+ * // - privateExtendedProperty
+ * // - q
+ * // - sharedExtendedProperty
+ * // - timeMin
+ * // - timeMax
+ * // - updatedMin If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken.
+ * // Learn more about incremental synchronization.
+ * // Optional. The default is to return all entries.
+ * syncToken: 'placeholder-value',
+ * // Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided but are ignored. If timeMin is set, timeMax must be greater than timeMin.
+ * timeMax: 'placeholder-value',
+ * // Lower bound (exclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided but are ignored. If timeMax is set, timeMin must be smaller than timeMax.
+ * timeMin: 'placeholder-value',
+ * // Time zone used in the response. Optional. The default is the time zone of the calendar.
+ * timeZone: 'placeholder-value',
+ * // Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by. When specified, entries deleted since this time will always be included regardless of showDeleted. Optional. The default is not to filter by last modification time.
+ * updatedMin: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": "my_address",
+ * // "expiration": "my_expiration",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "params": {},
+ * // "payload": false,
+ * // "resourceId": "my_resourceId",
+ * // "resourceUri": "my_resourceUri",
+ * // "token": "my_token",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": "my_address",
+ * // "expiration": "my_expiration",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "params": {},
+ * // "payload": false,
+ * // "resourceId": "my_resourceId",
+ * // "resourceUri": "my_resourceUri",
+ * // "token": "my_token",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.events.watch
* @memberOf! ()
*
@@ -4326,6 +6776,63 @@ export namespace calendar_v3 {
/**
* calendar.freebusy.query
* @desc Returns free/busy information for a set of calendars.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.freebusy.query({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "calendarExpansionMax": 0,
+ * // "groupExpansionMax": 0,
+ * // "items": [],
+ * // "timeMax": "my_timeMax",
+ * // "timeMin": "my_timeMin",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "calendars": {},
+ * // "groups": {},
+ * // "kind": "my_kind",
+ * // "timeMax": "my_timeMax",
+ * // "timeMin": "my_timeMin"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.freebusy.query
* @memberOf! ()
*
@@ -4418,6 +6925,53 @@ export namespace calendar_v3 {
/**
* calendar.settings.get
* @desc Returns a single user setting.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.readonly',
+ * 'https://www.googleapis.com/auth/calendar.settings.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.settings.get({
+ * // The id of the user setting.
+ * setting: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "value": "my_value"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.settings.get
* @memberOf! ()
*
@@ -4489,6 +7043,61 @@ export namespace calendar_v3 {
/**
* calendar.settings.list
* @desc Returns all user settings for the authenticated user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.readonly',
+ * 'https://www.googleapis.com/auth/calendar.settings.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.settings.list({
+ * // Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional.
+ * maxResults: 'placeholder-value',
+ * // Token specifying which result page to return. Optional.
+ * pageToken: 'placeholder-value',
+ * // Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then.
+ * // If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken.
+ * // Learn more about incremental synchronization.
+ * // Optional. The default is to return all entries.
+ * syncToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "nextSyncToken": "my_nextSyncToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.settings.list
* @memberOf! ()
*
@@ -4562,6 +7171,83 @@ export namespace calendar_v3 {
/**
* calendar.settings.watch
* @desc Watch for changes to Settings resources.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/calendar.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const calendar = google.calendar('v3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/calendar',
+ * 'https://www.googleapis.com/auth/calendar.readonly',
+ * 'https://www.googleapis.com/auth/calendar.settings.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await calendar.settings.watch({
+ * // Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional.
+ * maxResults: 'placeholder-value',
+ * // Token specifying which result page to return. Optional.
+ * pageToken: 'placeholder-value',
+ * // Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then.
+ * // If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken.
+ * // Learn more about incremental synchronization.
+ * // Optional. The default is to return all entries.
+ * syncToken: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": "my_address",
+ * // "expiration": "my_expiration",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "params": {},
+ * // "payload": false,
+ * // "resourceId": "my_resourceId",
+ * // "resourceUri": "my_resourceUri",
+ * // "token": "my_token",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": "my_address",
+ * // "expiration": "my_expiration",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "params": {},
+ * // "payload": false,
+ * // "resourceId": "my_resourceId",
+ * // "resourceUri": "my_resourceUri",
+ * // "token": "my_token",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias calendar.settings.watch
* @memberOf! ()
*
diff --git a/src/apis/chat/v1.ts b/src/apis/chat/v1.ts
index 700fa27dbd0..9b67049a962 100644
--- a/src/apis/chat/v1.ts
+++ b/src/apis/chat/v1.ts
@@ -601,6 +601,50 @@ export namespace chat_v1 {
/**
* chat.spaces.get
* @desc Returns a space.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/chat.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const chat = google.chat('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await chat.spaces.get({
+ * // Required. Resource name of the space, in the form "spaces/x".
+ * //
+ * // Example: spaces/AAAAMpdlehY
+ * name: 'spaces/my-space',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "name": "my_name",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias chat.spaces.get
* @memberOf! ()
*
@@ -669,6 +713,51 @@ export namespace chat_v1 {
/**
* chat.spaces.list
* @desc Lists spaces the caller is a member of.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/chat.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const chat = google.chat('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await chat.spaces.list({
+ * // Requested page size. The value is capped at 1000.
+ * // Server may return fewer results than requested.
+ * // If unspecified, server will default to 100.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "spaces": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias chat.spaces.list
* @memberOf! ()
*
@@ -774,6 +863,52 @@ export namespace chat_v1 {
/**
* chat.spaces.members.get
* @desc Returns a membership.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/chat.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const chat = google.chat('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await chat.spaces.members.get({
+ * // Required. Resource name of the membership to be retrieved, in the form
+ * // "spaces/x/members/x".
+ * //
+ * // Example: spaces/AAAAMpdlehY/members/105115627578887013105
+ * name: 'spaces/my-space/members/my-member',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "member": {},
+ * // "name": "my_name",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias chat.spaces.members.get
* @memberOf! ()
*
@@ -845,6 +980,56 @@ export namespace chat_v1 {
/**
* chat.spaces.members.list
* @desc Lists human memberships in a space.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/chat.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const chat = google.chat('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await chat.spaces.members.list({
+ * // Requested page size. The value is capped at 1000.
+ * // Server may return fewer results than requested.
+ * // If unspecified, server will default to 100.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server should return.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name of the space for which membership list is to be
+ * // fetched, in the form "spaces/x".
+ * //
+ * // Example: spaces/AAAAMpdlehY
+ * parent: 'spaces/my-space',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "memberships": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias chat.spaces.members.list
* @memberOf! ()
*
@@ -963,6 +1148,87 @@ export namespace chat_v1 {
/**
* chat.spaces.messages.create
* @desc Creates a message.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/chat.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const chat = google.chat('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await chat.spaces.messages.create({
+ * // Required. Space resource name, in the form "spaces/x".
+ * // Example: spaces/AAAAMpdlehY
+ * parent: 'spaces/my-space',
+ * // Opaque thread identifier string that can be specified to group messages
+ * // into a single thread. If this is the first message with a given thread
+ * // identifier, a new thread is created. Subsequent messages with the same
+ * // thread identifier will be posted into the same thread. This relieves bots
+ * // and webhooks from having to store the Hangouts Chat thread ID of a thread (created earlier by them) to post
+ * // further updates to it.
+ * //
+ * // Has no effect if thread field,
+ * // corresponding to an existing thread, is set in message.
+ * threadKey: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "actionResponse": {},
+ * // "annotations": [],
+ * // "argumentText": "my_argumentText",
+ * // "cards": [],
+ * // "createTime": "my_createTime",
+ * // "fallbackText": "my_fallbackText",
+ * // "name": "my_name",
+ * // "previewText": "my_previewText",
+ * // "sender": {},
+ * // "space": {},
+ * // "text": "my_text",
+ * // "thread": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "actionResponse": {},
+ * // "annotations": [],
+ * // "argumentText": "my_argumentText",
+ * // "cards": [],
+ * // "createTime": "my_createTime",
+ * // "fallbackText": "my_fallbackText",
+ * // "name": "my_name",
+ * // "previewText": "my_previewText",
+ * // "sender": {},
+ * // "space": {},
+ * // "text": "my_text",
+ * // "thread": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias chat.spaces.messages.create
* @memberOf! ()
*
@@ -1037,6 +1303,47 @@ export namespace chat_v1 {
/**
* chat.spaces.messages.delete
* @desc Deletes a message.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/chat.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const chat = google.chat('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await chat.spaces.messages.delete({
+ * // Required. Resource name of the message to be deleted, in the form
+ * // "spaces/x/messages/x"
+ * //
+ * // Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4
+ * name: 'spaces/my-space/messages/my-message',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias chat.spaces.messages.delete
* @memberOf! ()
*
@@ -1106,6 +1413,60 @@ export namespace chat_v1 {
/**
* chat.spaces.messages.get
* @desc Returns a message.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/chat.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const chat = google.chat('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await chat.spaces.messages.get({
+ * // Required. Resource name of the message to be retrieved, in the form
+ * // "spaces/x/messages/x".
+ * //
+ * // Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4
+ * name: 'spaces/my-space/messages/my-message',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "actionResponse": {},
+ * // "annotations": [],
+ * // "argumentText": "my_argumentText",
+ * // "cards": [],
+ * // "createTime": "my_createTime",
+ * // "fallbackText": "my_fallbackText",
+ * // "name": "my_name",
+ * // "previewText": "my_previewText",
+ * // "sender": {},
+ * // "space": {},
+ * // "text": "my_text",
+ * // "thread": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias chat.spaces.messages.get
* @memberOf! ()
*
@@ -1175,6 +1536,85 @@ export namespace chat_v1 {
/**
* chat.spaces.messages.update
* @desc Updates a message.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/chat.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const chat = google.chat('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await chat.spaces.messages.update({
+ * // Resource name, in the form "spaces/x/messages/x".
+ * //
+ * // Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4
+ * name: 'spaces/my-space/messages/my-message',
+ * // Required. The field paths to be updated, comma separated if there are
+ * // multiple.
+ * //
+ * // Currently supported field paths:
+ * // * text
+ * // * cards
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "actionResponse": {},
+ * // "annotations": [],
+ * // "argumentText": "my_argumentText",
+ * // "cards": [],
+ * // "createTime": "my_createTime",
+ * // "fallbackText": "my_fallbackText",
+ * // "name": "my_name",
+ * // "previewText": "my_previewText",
+ * // "sender": {},
+ * // "space": {},
+ * // "text": "my_text",
+ * // "thread": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "actionResponse": {},
+ * // "annotations": [],
+ * // "argumentText": "my_argumentText",
+ * // "cards": [],
+ * // "createTime": "my_createTime",
+ * // "fallbackText": "my_fallbackText",
+ * // "name": "my_name",
+ * // "previewText": "my_previewText",
+ * // "sender": {},
+ * // "space": {},
+ * // "text": "my_text",
+ * // "thread": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias chat.spaces.messages.update
* @memberOf! ()
*
diff --git a/src/apis/civicinfo/v2.ts b/src/apis/civicinfo/v2.ts
index 244471b110e..8e085a0b5da 100644
--- a/src/apis/civicinfo/v2.ts
+++ b/src/apis/civicinfo/v2.ts
@@ -854,6 +854,55 @@ export namespace civicinfo_v2 {
/**
* civicinfo.divisions.search
* @desc Searches for political divisions by their natural name or OCD ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/civicinfo.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const civicinfo = google.civicinfo('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await civicinfo.divisions.search({
+ * // The search query. Queries can cover any parts of a OCD ID or a human readable division name. All words given in the query are treated as required patterns. In addition to that, most query operators of the Apache Lucene library are supported. See http://lucene.apache.org/core/2_9_4/queryparsersyntax.html
+ * query: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "contextParams": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "results": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias civicinfo.divisions.search
* @memberOf! ()
*
@@ -954,6 +1003,52 @@ export namespace civicinfo_v2 {
/**
* civicinfo.elections.electionQuery
* @desc List of available elections to query.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/civicinfo.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const civicinfo = google.civicinfo('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await civicinfo.elections.electionQuery({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "contextParams": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "elections": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias civicinfo.elections.electionQuery
* @memberOf! ()
*
@@ -1032,6 +1127,72 @@ export namespace civicinfo_v2 {
/**
* civicinfo.elections.voterInfoQuery
* @desc Looks up information relevant to a voter based on the voter's registered address.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/civicinfo.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const civicinfo = google.civicinfo('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await civicinfo.elections.voterInfoQuery({
+ * // The registered address of the voter to look up.
+ * address: 'placeholder-value',
+ * // The unique ID of the election to look up. A list of election IDs can be obtained at https://www.googleapis.com/civicinfo/{version}/electionsIf no election ID is specified in the query and there is more than one election with data for the given voter, the additional elections are provided in the otherElections response field.
+ * electionId: 'placeholder-value',
+ * // If set to true, only data from official state sources will be returned.
+ * officialOnly: 'placeholder-value',
+ * // If set to true, the query will return the success codeand include any partial information when it is unable to determine a matching address or unable to determine the election for electionId=0 queries.
+ * returnAllAvailableData: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "contextParams": {},
+ * // "voterInfoSegmentResult": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "contests": [],
+ * // "dropOffLocations": [],
+ * // "earlyVoteSites": [],
+ * // "election": {},
+ * // "kind": "my_kind",
+ * // "mailOnly": false,
+ * // "normalizedInput": {},
+ * // "otherElections": [],
+ * // "pollingLocations": [],
+ * // "precinctId": "my_precinctId",
+ * // "segments": [],
+ * // "state": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias civicinfo.elections.voterInfoQuery
* @memberOf! ()
*
@@ -1161,6 +1322,64 @@ export namespace civicinfo_v2 {
/**
* civicinfo.representatives.representativeInfoByAddress
* @desc Looks up political geography and representative information for a single address.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/civicinfo.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const civicinfo = google.civicinfo('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await civicinfo.representatives.representativeInfoByAddress({
+ * // The address to look up. May only be specified if the field ocdId is not given in the URL.
+ * address: 'placeholder-value',
+ * // Whether to return information about offices and officials. If false, only the top-level district information will be returned.
+ * includeOffices: 'placeholder-value',
+ * // A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don't contain a matching office will not be returned.
+ * levels: 'placeholder-value',
+ * // A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don't contain a matching office will not be returned.
+ * roles: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "contextParams": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "divisions": {},
+ * // "kind": "my_kind",
+ * // "normalizedInput": {},
+ * // "offices": [],
+ * // "officials": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias civicinfo.representatives.representativeInfoByAddress
* @memberOf! ()
*
@@ -1246,6 +1465,62 @@ export namespace civicinfo_v2 {
/**
* civicinfo.representatives.representativeInfoByDivision
* @desc Looks up representative information for a single geographic division.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/civicinfo.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const civicinfo = google.civicinfo('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await civicinfo.representatives.representativeInfoByDivision({
+ * // A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don't contain a matching office will not be returned.
+ * levels: 'placeholder-value',
+ * // The Open Civic Data division identifier of the division to look up.
+ * ocdId: 'placeholder-value',
+ * // If true, information about all divisions contained in the division requested will be included as well. For example, if querying ocd-division/country:us/district:dc, this would also return all DC's wards and ANCs.
+ * recursive: 'placeholder-value',
+ * // A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don't contain a matching office will not be returned.
+ * roles: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "contextParams": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "divisions": {},
+ * // "offices": [],
+ * // "officials": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias civicinfo.representatives.representativeInfoByDivision
* @memberOf! ()
*
diff --git a/src/apis/classroom/v1.ts b/src/apis/classroom/v1.ts
index 3eb8995bb37..35b3d2dd756 100644
--- a/src/apis/classroom/v1.ts
+++ b/src/apis/classroom/v1.ts
@@ -1232,6 +1232,85 @@ export namespace classroom_v1 {
/**
* classroom.courses.create
* @desc Creates a course. The user specified in `ownerId` is the owner of the created course and added as a teacher. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create courses or for access errors. * `NOT_FOUND` if the primary teacher is not a valid user. * `FAILED_PRECONDITION` if the course owner's account is disabled or for the following request errors: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.courses'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.create({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "calendarId": "my_calendarId",
+ * // "courseGroupEmail": "my_courseGroupEmail",
+ * // "courseMaterialSets": [],
+ * // "courseState": "my_courseState",
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "descriptionHeading": "my_descriptionHeading",
+ * // "enrollmentCode": "my_enrollmentCode",
+ * // "guardiansEnabled": false,
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "ownerId": "my_ownerId",
+ * // "room": "my_room",
+ * // "section": "my_section",
+ * // "teacherFolder": {},
+ * // "teacherGroupEmail": "my_teacherGroupEmail",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "calendarId": "my_calendarId",
+ * // "courseGroupEmail": "my_courseGroupEmail",
+ * // "courseMaterialSets": [],
+ * // "courseState": "my_courseState",
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "descriptionHeading": "my_descriptionHeading",
+ * // "enrollmentCode": "my_enrollmentCode",
+ * // "guardiansEnabled": false,
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "ownerId": "my_ownerId",
+ * // "room": "my_room",
+ * // "section": "my_section",
+ * // "teacherFolder": {},
+ * // "teacherGroupEmail": "my_teacherGroupEmail",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.create
* @memberOf! ()
*
@@ -1300,6 +1379,46 @@ export namespace classroom_v1 {
/**
* classroom.courses.delete
* @desc Deletes a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.courses'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.delete({
+ * // Identifier of the course to delete.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.delete
* @memberOf! ()
*
@@ -1368,6 +1487,68 @@ export namespace classroom_v1 {
/**
* classroom.courses.get
* @desc Returns a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.courses',
+ * 'https://www.googleapis.com/auth/classroom.courses.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.get({
+ * // Identifier of the course to return.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "calendarId": "my_calendarId",
+ * // "courseGroupEmail": "my_courseGroupEmail",
+ * // "courseMaterialSets": [],
+ * // "courseState": "my_courseState",
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "descriptionHeading": "my_descriptionHeading",
+ * // "enrollmentCode": "my_enrollmentCode",
+ * // "guardiansEnabled": false,
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "ownerId": "my_ownerId",
+ * // "room": "my_room",
+ * // "section": "my_section",
+ * // "teacherFolder": {},
+ * // "teacherGroupEmail": "my_teacherGroupEmail",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.get
* @memberOf! ()
*
@@ -1436,6 +1617,78 @@ export namespace classroom_v1 {
/**
* classroom.courses.list
* @desc Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. Returned courses are ordered by creation time, with the most recently created coming first. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the query argument is malformed. * `NOT_FOUND` if any users specified in the query arguments do not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.courses',
+ * 'https://www.googleapis.com/auth/classroom.courses.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.list({
+ * // Restricts returned courses to those in one of the specified states
+ * // The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED.
+ * courseStates: 'placeholder-value',
+ * // Maximum number of items to return. Zero or unspecified indicates that the
+ * // server may assign a maximum.
+ * //
+ * // The server may return fewer than the specified number of results.
+ * pageSize: 'placeholder-value',
+ * // nextPageToken
+ * // value returned from a previous
+ * // list call,
+ * // indicating that the subsequent page of results should be returned.
+ * //
+ * // The list request must be
+ * // otherwise identical to the one that resulted in this token.
+ * pageToken: 'placeholder-value',
+ * // Restricts returned courses to those having a student with the specified
+ * // identifier. The identifier can be one of the following:
+ * //
+ * // * the numeric identifier for the user
+ * // * the email address of the user
+ * // * the string literal `"me"`, indicating the requesting user
+ * studentId: 'placeholder-value',
+ * // Restricts returned courses to those having a teacher with the specified
+ * // identifier. The identifier can be one of the following:
+ * //
+ * // * the numeric identifier for the user
+ * // * the email address of the user
+ * // * the string literal `"me"`, indicating the requesting user
+ * teacherId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "courses": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.list
* @memberOf! ()
*
@@ -1510,6 +1763,110 @@ export namespace classroom_v1 {
/**
* classroom.courses.patch
* @desc Updates one or more fields in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.courses'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.patch({
+ * // Identifier of the course to update.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * id: 'placeholder-value',
+ * // Mask that identifies which fields on the course to update.
+ * // This field is required to do an update. The update will fail if invalid
+ * // fields are specified. The following fields are valid:
+ * //
+ * // * `name`
+ * // * `section`
+ * // * `descriptionHeading`
+ * // * `description`
+ * // * `room`
+ * // * `courseState`
+ * // * `ownerId`
+ * //
+ * // Note: patches to ownerId are treated as being effective immediately, but in
+ * // practice it may take some time for the ownership transfer of all affected
+ * // resources to complete.
+ * //
+ * // When set in a query parameter, this field should be specified as
+ * //
+ * // `updateMask=,,...`
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "calendarId": "my_calendarId",
+ * // "courseGroupEmail": "my_courseGroupEmail",
+ * // "courseMaterialSets": [],
+ * // "courseState": "my_courseState",
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "descriptionHeading": "my_descriptionHeading",
+ * // "enrollmentCode": "my_enrollmentCode",
+ * // "guardiansEnabled": false,
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "ownerId": "my_ownerId",
+ * // "room": "my_room",
+ * // "section": "my_section",
+ * // "teacherFolder": {},
+ * // "teacherGroupEmail": "my_teacherGroupEmail",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "calendarId": "my_calendarId",
+ * // "courseGroupEmail": "my_courseGroupEmail",
+ * // "courseMaterialSets": [],
+ * // "courseState": "my_courseState",
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "descriptionHeading": "my_descriptionHeading",
+ * // "enrollmentCode": "my_enrollmentCode",
+ * // "guardiansEnabled": false,
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "ownerId": "my_ownerId",
+ * // "room": "my_room",
+ * // "section": "my_section",
+ * // "teacherFolder": {},
+ * // "teacherGroupEmail": "my_teacherGroupEmail",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.patch
* @memberOf! ()
*
@@ -1580,6 +1937,90 @@ export namespace classroom_v1 {
/**
* classroom.courses.update
* @desc Updates a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.courses'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.update({
+ * // Identifier of the course to update.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * id: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "calendarId": "my_calendarId",
+ * // "courseGroupEmail": "my_courseGroupEmail",
+ * // "courseMaterialSets": [],
+ * // "courseState": "my_courseState",
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "descriptionHeading": "my_descriptionHeading",
+ * // "enrollmentCode": "my_enrollmentCode",
+ * // "guardiansEnabled": false,
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "ownerId": "my_ownerId",
+ * // "room": "my_room",
+ * // "section": "my_section",
+ * // "teacherFolder": {},
+ * // "teacherGroupEmail": "my_teacherGroupEmail",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "calendarId": "my_calendarId",
+ * // "courseGroupEmail": "my_courseGroupEmail",
+ * // "courseMaterialSets": [],
+ * // "courseState": "my_courseState",
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "descriptionHeading": "my_descriptionHeading",
+ * // "enrollmentCode": "my_enrollmentCode",
+ * // "guardiansEnabled": false,
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "ownerId": "my_ownerId",
+ * // "room": "my_room",
+ * // "section": "my_section",
+ * // "teacherFolder": {},
+ * // "teacherGroupEmail": "my_teacherGroupEmail",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.update
* @memberOf! ()
*
@@ -1753,6 +2194,56 @@ export namespace classroom_v1 {
/**
* classroom.courses.aliases.create
* @desc Creates an alias for a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create the alias or for access errors. * `NOT_FOUND` if the course does not exist. * `ALREADY_EXISTS` if the alias already exists. * `FAILED_PRECONDITION` if the alias requested does not make sense for the requesting user or course (for example, if a user not in a domain attempts to access a domain-scoped alias).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.courses'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.aliases.create({
+ * // Identifier of the course to alias.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "alias": "my_alias"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alias": "my_alias"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.aliases.create
* @memberOf! ()
*
@@ -1828,6 +2319,49 @@ export namespace classroom_v1 {
/**
* classroom.courses.aliases.delete
* @desc Deletes an alias of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to remove the alias or for access errors. * `NOT_FOUND` if the alias does not exist. * `FAILED_PRECONDITION` if the alias requested does not make sense for the requesting user or course (for example, if a user not in a domain attempts to delete a domain-scoped alias).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.courses'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.aliases.delete({
+ * // Alias to delete.
+ * // This may not be the Classroom-assigned identifier.
+ * alias: 'placeholder-value',
+ * // Identifier of the course whose alias should be deleted.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.aliases.delete
* @memberOf! ()
*
@@ -1901,6 +2435,65 @@ export namespace classroom_v1 {
/**
* classroom.courses.aliases.list
* @desc Returns a list of aliases for a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the course or for access errors. * `NOT_FOUND` if the course does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.courses',
+ * 'https://www.googleapis.com/auth/classroom.courses.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.aliases.list({
+ * // The identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Maximum number of items to return. Zero or unspecified indicates that the
+ * // server may assign a maximum.
+ * //
+ * // The server may return fewer than the specified number of results.
+ * pageSize: 'placeholder-value',
+ * // nextPageToken
+ * // value returned from a previous
+ * // list call,
+ * // indicating that the subsequent page of results should be returned.
+ * //
+ * // The list request
+ * // must be otherwise identical to the one that resulted in this token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "aliases": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.aliases.list
* @memberOf! ()
*
@@ -2045,6 +2638,78 @@ export namespace classroom_v1 {
/**
* classroom.courses.announcements.create
* @desc Creates an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create announcements in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.announcements'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.announcements.create({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "assigneeMode": "my_assigneeMode",
+ * // "courseId": "my_courseId",
+ * // "creationTime": "my_creationTime",
+ * // "creatorUserId": "my_creatorUserId",
+ * // "id": "my_id",
+ * // "individualStudentsOptions": {},
+ * // "materials": [],
+ * // "scheduledTime": "my_scheduledTime",
+ * // "state": "my_state",
+ * // "text": "my_text",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "assigneeMode": "my_assigneeMode",
+ * // "courseId": "my_courseId",
+ * // "creationTime": "my_creationTime",
+ * // "creatorUserId": "my_creatorUserId",
+ * // "id": "my_id",
+ * // "individualStudentsOptions": {},
+ * // "materials": [],
+ * // "scheduledTime": "my_scheduledTime",
+ * // "state": "my_state",
+ * // "text": "my_text",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.announcements.create
* @memberOf! ()
*
@@ -2120,6 +2785,49 @@ export namespace classroom_v1 {
/**
* classroom.courses.announcements.delete
* @desc Deletes an announcement. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding announcement item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding announcement, if the requesting user is not permitted to delete the requested course or for access errors. * `FAILED_PRECONDITION` if the requested announcement has already been deleted. * `NOT_FOUND` if no course exists with the requested ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.announcements'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.announcements.delete({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the announcement to delete.
+ * // This identifier is a Classroom-assigned identifier.
+ * id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.announcements.delete
* @memberOf! ()
*
@@ -2192,6 +2900,64 @@ export namespace classroom_v1 {
/**
* classroom.courses.announcements.get
* @desc Returns an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or announcement, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or announcement does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.announcements',
+ * 'https://www.googleapis.com/auth/classroom.announcements.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.announcements.get({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the announcement.
+ * id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "assigneeMode": "my_assigneeMode",
+ * // "courseId": "my_courseId",
+ * // "creationTime": "my_creationTime",
+ * // "creatorUserId": "my_creatorUserId",
+ * // "id": "my_id",
+ * // "individualStudentsOptions": {},
+ * // "materials": [],
+ * // "scheduledTime": "my_scheduledTime",
+ * // "state": "my_state",
+ * // "text": "my_text",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.announcements.get
* @memberOf! ()
*
@@ -2266,6 +3032,74 @@ export namespace classroom_v1 {
/**
* classroom.courses.announcements.list
* @desc Returns a list of announcements that the requester is permitted to view. Course students may only view `PUBLISHED` announcements. Course teachers and domain administrators may view all announcements. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.announcements',
+ * 'https://www.googleapis.com/auth/classroom.announcements.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.announcements.list({
+ * // Restriction on the `state` of announcements returned.
+ * // If this argument is left unspecified, the default value is `PUBLISHED`.
+ * announcementStates: 'placeholder-value',
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Optional sort ordering for results. A comma-separated list of fields with
+ * // an optional sort direction keyword. Supported field is `updateTime`.
+ * // Supported direction keywords are `asc` and `desc`.
+ * // If not specified, `updateTime desc` is the default behavior.
+ * // Examples: `updateTime asc`, `updateTime`
+ * orderBy: 'placeholder-value',
+ * // Maximum number of items to return. Zero or unspecified indicates that the
+ * // server may assign a maximum.
+ * //
+ * // The server may return fewer than the specified number of results.
+ * pageSize: 'placeholder-value',
+ * // nextPageToken
+ * // value returned from a previous
+ * // list call,
+ * // indicating that the subsequent page of results should be returned.
+ * //
+ * // The list request
+ * // must be otherwise identical to the one that resulted in this token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "announcements": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.announcements.list
* @memberOf! ()
*
@@ -2351,6 +3185,70 @@ export namespace classroom_v1 {
/**
* classroom.courses.announcements.modifyAssignees
* @desc Modifies assignee mode and options of an announcement. Only a teacher of the course that contains the announcement may call this method. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.announcements'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.announcements.modifyAssignees({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the announcement.
+ * id: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "assigneeMode": "my_assigneeMode",
+ * // "modifyIndividualStudentsOptions": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "assigneeMode": "my_assigneeMode",
+ * // "courseId": "my_courseId",
+ * // "creationTime": "my_creationTime",
+ * // "creatorUserId": "my_creatorUserId",
+ * // "id": "my_id",
+ * // "individualStudentsOptions": {},
+ * // "materials": [],
+ * // "scheduledTime": "my_scheduledTime",
+ * // "state": "my_state",
+ * // "text": "my_text",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.announcements.modifyAssignees
* @memberOf! ()
*
@@ -2427,6 +3325,94 @@ export namespace classroom_v1 {
/**
* classroom.courses.announcements.patch
* @desc Updates one or more fields of an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding announcement or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested announcement has already been deleted. * `NOT_FOUND` if the requested course or announcement does not exist
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.announcements'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.announcements.patch({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the announcement.
+ * id: 'placeholder-value',
+ * // Mask that identifies which fields on the announcement to update.
+ * // This field is required to do an update. The update fails if invalid
+ * // fields are specified. If a field supports empty values, it can be cleared
+ * // by specifying it in the update mask and not in the Announcement object. If
+ * // a field that does not support empty values is included in the update mask
+ * // and not set in the Announcement object, an `INVALID_ARGUMENT` error is
+ * // returned.
+ * //
+ * // The following fields may be specified by teachers:
+ * //
+ * // * `text`
+ * // * `state`
+ * // * `scheduled_time`
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "assigneeMode": "my_assigneeMode",
+ * // "courseId": "my_courseId",
+ * // "creationTime": "my_creationTime",
+ * // "creatorUserId": "my_creatorUserId",
+ * // "id": "my_id",
+ * // "individualStudentsOptions": {},
+ * // "materials": [],
+ * // "scheduledTime": "my_scheduledTime",
+ * // "state": "my_state",
+ * // "text": "my_text",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "assigneeMode": "my_assigneeMode",
+ * // "courseId": "my_courseId",
+ * // "creationTime": "my_creationTime",
+ * // "creatorUserId": "my_creatorUserId",
+ * // "id": "my_id",
+ * // "individualStudentsOptions": {},
+ * // "materials": [],
+ * // "scheduledTime": "my_scheduledTime",
+ * // "state": "my_state",
+ * // "text": "my_text",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.announcements.patch
* @memberOf! ()
*
@@ -2638,6 +3624,98 @@ export namespace classroom_v1 {
/**
* classroom.courses.courseWork.create
* @desc Creates course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to make the request. Classroom API requests to modify course work and student submissions must be made with an OAuth client ID from the associated Developer Console project. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create course work in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.coursework.students'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.courseWork.create({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "assigneeMode": "my_assigneeMode",
+ * // "assignment": {},
+ * // "associatedWithDeveloper": false,
+ * // "courseId": "my_courseId",
+ * // "creationTime": "my_creationTime",
+ * // "creatorUserId": "my_creatorUserId",
+ * // "description": "my_description",
+ * // "dueDate": {},
+ * // "dueTime": {},
+ * // "id": "my_id",
+ * // "individualStudentsOptions": {},
+ * // "materials": [],
+ * // "maxPoints": {},
+ * // "multipleChoiceQuestion": {},
+ * // "scheduledTime": "my_scheduledTime",
+ * // "state": "my_state",
+ * // "submissionModificationMode": "my_submissionModificationMode",
+ * // "title": "my_title",
+ * // "topicId": "my_topicId",
+ * // "updateTime": "my_updateTime",
+ * // "workType": "my_workType"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "assigneeMode": "my_assigneeMode",
+ * // "assignment": {},
+ * // "associatedWithDeveloper": false,
+ * // "courseId": "my_courseId",
+ * // "creationTime": "my_creationTime",
+ * // "creatorUserId": "my_creatorUserId",
+ * // "description": "my_description",
+ * // "dueDate": {},
+ * // "dueTime": {},
+ * // "id": "my_id",
+ * // "individualStudentsOptions": {},
+ * // "materials": [],
+ * // "maxPoints": {},
+ * // "multipleChoiceQuestion": {},
+ * // "scheduledTime": "my_scheduledTime",
+ * // "state": "my_state",
+ * // "submissionModificationMode": "my_submissionModificationMode",
+ * // "title": "my_title",
+ * // "topicId": "my_topicId",
+ * // "updateTime": "my_updateTime",
+ * // "workType": "my_workType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.courseWork.create
* @memberOf! ()
*
@@ -2713,6 +3791,49 @@ export namespace classroom_v1 {
/**
* classroom.courses.courseWork.delete
* @desc Deletes a course work. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the requesting user is not permitted to delete the requested course or for access errors. * `FAILED_PRECONDITION` if the requested course work has already been deleted. * `NOT_FOUND` if no course exists with the requested ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.coursework.students'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.courseWork.delete({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the course work to delete.
+ * // This identifier is a Classroom-assigned identifier.
+ * id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.courseWork.delete
* @memberOf! ()
*
@@ -2786,6 +3907,76 @@ export namespace classroom_v1 {
/**
* classroom.courses.courseWork.get
* @desc Returns course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.coursework.me',
+ * 'https://www.googleapis.com/auth/classroom.coursework.me.readonly',
+ * 'https://www.googleapis.com/auth/classroom.coursework.students',
+ * 'https://www.googleapis.com/auth/classroom.coursework.students.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.courseWork.get({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the course work.
+ * id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "assigneeMode": "my_assigneeMode",
+ * // "assignment": {},
+ * // "associatedWithDeveloper": false,
+ * // "courseId": "my_courseId",
+ * // "creationTime": "my_creationTime",
+ * // "creatorUserId": "my_creatorUserId",
+ * // "description": "my_description",
+ * // "dueDate": {},
+ * // "dueTime": {},
+ * // "id": "my_id",
+ * // "individualStudentsOptions": {},
+ * // "materials": [],
+ * // "maxPoints": {},
+ * // "multipleChoiceQuestion": {},
+ * // "scheduledTime": "my_scheduledTime",
+ * // "state": "my_state",
+ * // "submissionModificationMode": "my_submissionModificationMode",
+ * // "title": "my_title",
+ * // "topicId": "my_topicId",
+ * // "updateTime": "my_updateTime",
+ * // "workType": "my_workType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.courseWork.get
* @memberOf! ()
*
@@ -2861,6 +4052,77 @@ export namespace classroom_v1 {
/**
* classroom.courses.courseWork.list
* @desc Returns a list of course work that the requester is permitted to view. Course students may only view `PUBLISHED` course work. Course teachers and domain administrators may view all course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.coursework.me',
+ * 'https://www.googleapis.com/auth/classroom.coursework.me.readonly',
+ * 'https://www.googleapis.com/auth/classroom.coursework.students',
+ * 'https://www.googleapis.com/auth/classroom.coursework.students.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.courseWork.list({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Restriction on the work status to return. Only courseWork that matches
+ * // is returned. If unspecified, items with a work status of `PUBLISHED`
+ * // is returned.
+ * courseWorkStates: 'placeholder-value',
+ * // Optional sort ordering for results. A comma-separated list of fields with
+ * // an optional sort direction keyword. Supported fields are `updateTime`
+ * // and `dueDate`. Supported direction keywords are `asc` and `desc`.
+ * // If not specified, `updateTime desc` is the default behavior.
+ * // Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc`
+ * orderBy: 'placeholder-value',
+ * // Maximum number of items to return. Zero or unspecified indicates that the
+ * // server may assign a maximum.
+ * //
+ * // The server may return fewer than the specified number of results.
+ * pageSize: 'placeholder-value',
+ * // nextPageToken
+ * // value returned from a previous
+ * // list call,
+ * // indicating that the subsequent page of results should be returned.
+ * //
+ * // The list request
+ * // must be otherwise identical to the one that resulted in this token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "courseWork": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.courseWork.list
* @memberOf! ()
*
@@ -2941,6 +4203,80 @@ export namespace classroom_v1 {
/**
* classroom.courses.courseWork.modifyAssignees
* @desc Modifies assignee mode and options of a coursework. Only a teacher of the course that contains the coursework may call this method. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.coursework.students'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.courseWork.modifyAssignees({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the coursework.
+ * id: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "assigneeMode": "my_assigneeMode",
+ * // "modifyIndividualStudentsOptions": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "assigneeMode": "my_assigneeMode",
+ * // "assignment": {},
+ * // "associatedWithDeveloper": false,
+ * // "courseId": "my_courseId",
+ * // "creationTime": "my_creationTime",
+ * // "creatorUserId": "my_creatorUserId",
+ * // "description": "my_description",
+ * // "dueDate": {},
+ * // "dueTime": {},
+ * // "id": "my_id",
+ * // "individualStudentsOptions": {},
+ * // "materials": [],
+ * // "maxPoints": {},
+ * // "multipleChoiceQuestion": {},
+ * // "scheduledTime": "my_scheduledTime",
+ * // "state": "my_state",
+ * // "submissionModificationMode": "my_submissionModificationMode",
+ * // "title": "my_title",
+ * // "topicId": "my_topicId",
+ * // "updateTime": "my_updateTime",
+ * // "workType": "my_workType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.courseWork.modifyAssignees
* @memberOf! ()
*
@@ -3016,6 +4352,120 @@ export namespace classroom_v1 {
/**
* classroom.courses.courseWork.patch
* @desc Updates one or more fields of a course work. See google.classroom.v1.CourseWork for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested course work has already been deleted. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.coursework.students'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.courseWork.patch({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the course work.
+ * id: 'placeholder-value',
+ * // Mask that identifies which fields on the course work to update.
+ * // This field is required to do an update. The update fails if invalid
+ * // fields are specified. If a field supports empty values, it can be cleared
+ * // by specifying it in the update mask and not in the CourseWork object. If a
+ * // field that does not support empty values is included in the update mask and
+ * // not set in the CourseWork object, an `INVALID_ARGUMENT` error is
+ * // returned.
+ * //
+ * // The following fields may be specified by teachers:
+ * //
+ * // * `title`
+ * // * `description`
+ * // * `state`
+ * // * `due_date`
+ * // * `due_time`
+ * // * `max_points`
+ * // * `scheduled_time`
+ * // * `submission_modification_mode`
+ * // * `topic_id`
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "assigneeMode": "my_assigneeMode",
+ * // "assignment": {},
+ * // "associatedWithDeveloper": false,
+ * // "courseId": "my_courseId",
+ * // "creationTime": "my_creationTime",
+ * // "creatorUserId": "my_creatorUserId",
+ * // "description": "my_description",
+ * // "dueDate": {},
+ * // "dueTime": {},
+ * // "id": "my_id",
+ * // "individualStudentsOptions": {},
+ * // "materials": [],
+ * // "maxPoints": {},
+ * // "multipleChoiceQuestion": {},
+ * // "scheduledTime": "my_scheduledTime",
+ * // "state": "my_state",
+ * // "submissionModificationMode": "my_submissionModificationMode",
+ * // "title": "my_title",
+ * // "topicId": "my_topicId",
+ * // "updateTime": "my_updateTime",
+ * // "workType": "my_workType"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "assigneeMode": "my_assigneeMode",
+ * // "assignment": {},
+ * // "associatedWithDeveloper": false,
+ * // "courseId": "my_courseId",
+ * // "creationTime": "my_creationTime",
+ * // "creatorUserId": "my_creatorUserId",
+ * // "description": "my_description",
+ * // "dueDate": {},
+ * // "dueTime": {},
+ * // "id": "my_id",
+ * // "individualStudentsOptions": {},
+ * // "materials": [],
+ * // "maxPoints": {},
+ * // "multipleChoiceQuestion": {},
+ * // "scheduledTime": "my_scheduledTime",
+ * // "state": "my_state",
+ * // "submissionModificationMode": "my_submissionModificationMode",
+ * // "title": "my_title",
+ * // "topicId": "my_topicId",
+ * // "updateTime": "my_updateTime",
+ * // "workType": "my_workType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.courseWork.patch
* @memberOf! ()
*
@@ -3224,6 +4674,75 @@ export namespace classroom_v1 {
/**
* classroom.courses.courseWork.studentSubmissions.get
* @desc Returns a student submission. * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, course work, or student submission or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.coursework.me',
+ * 'https://www.googleapis.com/auth/classroom.coursework.me.readonly',
+ * 'https://www.googleapis.com/auth/classroom.coursework.students',
+ * 'https://www.googleapis.com/auth/classroom.coursework.students.readonly',
+ * 'https://www.googleapis.com/auth/classroom.student-submissions.me.readonly',
+ * 'https://www.googleapis.com/auth/classroom.student-submissions.students.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.courseWork.studentSubmissions.get({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the course work.
+ * courseWorkId: 'placeholder-value',
+ * // Identifier of the student submission.
+ * id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "assignedGrade": {},
+ * // "assignmentSubmission": {},
+ * // "associatedWithDeveloper": false,
+ * // "courseId": "my_courseId",
+ * // "courseWorkId": "my_courseWorkId",
+ * // "courseWorkType": "my_courseWorkType",
+ * // "creationTime": "my_creationTime",
+ * // "draftGrade": {},
+ * // "id": "my_id",
+ * // "late": false,
+ * // "multipleChoiceSubmission": {},
+ * // "shortAnswerSubmission": {},
+ * // "state": "my_state",
+ * // "submissionHistory": [],
+ * // "updateTime": "my_updateTime",
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.courseWork.studentSubmissions.get
* @memberOf! ()
*
@@ -3300,6 +4819,88 @@ export namespace classroom_v1 {
/**
* classroom.courses.courseWork.studentSubmissions.list
* @desc Returns a list of student submissions that the requester is permitted to view, factoring in the OAuth scopes of the request. `-` may be specified as the `course_work_id` to include student submissions for multiple course work items. Course students may only view their own work. Course teachers and domain administrators may view all student submissions. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.coursework.me',
+ * 'https://www.googleapis.com/auth/classroom.coursework.me.readonly',
+ * 'https://www.googleapis.com/auth/classroom.coursework.students',
+ * 'https://www.googleapis.com/auth/classroom.coursework.students.readonly',
+ * 'https://www.googleapis.com/auth/classroom.student-submissions.me.readonly',
+ * 'https://www.googleapis.com/auth/classroom.student-submissions.students.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.courseWork.studentSubmissions.list({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the student work to request.
+ * // This may be set to the string literal `"-"` to request student work for
+ * // all course work in the specified course.
+ * courseWorkId: 'placeholder-value',
+ * // Requested lateness value. If specified, returned student submissions are
+ * // restricted by the requested value.
+ * // If unspecified, submissions are returned regardless of `late` value.
+ * late: 'placeholder-value',
+ * // Maximum number of items to return. Zero or unspecified indicates that the
+ * // server may assign a maximum.
+ * //
+ * // The server may return fewer than the specified number of results.
+ * pageSize: 'placeholder-value',
+ * // nextPageToken
+ * // value returned from a previous
+ * // list call,
+ * // indicating that the subsequent page of results should be returned.
+ * //
+ * // The list request
+ * // must be otherwise identical to the one that resulted in this token.
+ * pageToken: 'placeholder-value',
+ * // Requested submission states. If specified, returned student submissions
+ * // match one of the specified submission states.
+ * states: 'placeholder-value',
+ * // Optional argument to restrict returned student work to those owned by the
+ * // student with the specified identifier. The identifier can be one of the
+ * // following:
+ * //
+ * // * the numeric identifier for the user
+ * // * the email address of the user
+ * // * the string literal `"me"`, indicating the requesting user
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "studentSubmissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.courseWork.studentSubmissions.list
* @memberOf! ()
*
@@ -3389,6 +4990,81 @@ export namespace classroom_v1 {
/**
* classroom.courses.courseWork.studentSubmissions.modifyAttachments
* @desc Modifies attachments of student submission. Attachments may only be added to student submissions belonging to course work objects with a `workType` of `ASSIGNMENT`. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, if the user is not permitted to modify attachments on the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.coursework.me',
+ * 'https://www.googleapis.com/auth/classroom.coursework.students',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.courseWork.studentSubmissions.modifyAttachments(
+ * {
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the course work.
+ * courseWorkId: 'placeholder-value',
+ * // Identifier of the student submission.
+ * id: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "addAttachments": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "assignedGrade": {},
+ * // "assignmentSubmission": {},
+ * // "associatedWithDeveloper": false,
+ * // "courseId": "my_courseId",
+ * // "courseWorkId": "my_courseWorkId",
+ * // "courseWorkType": "my_courseWorkType",
+ * // "creationTime": "my_creationTime",
+ * // "draftGrade": {},
+ * // "id": "my_id",
+ * // "late": false,
+ * // "multipleChoiceSubmission": {},
+ * // "shortAnswerSubmission": {},
+ * // "state": "my_state",
+ * // "submissionHistory": [],
+ * // "updateTime": "my_updateTime",
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.courseWork.studentSubmissions.modifyAttachments
* @memberOf! ()
*
@@ -3468,6 +5144,104 @@ export namespace classroom_v1 {
/**
* classroom.courses.courseWork.studentSubmissions.patch
* @desc Updates one or more fields of a student submission. See google.classroom.v1.StudentSubmission for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.coursework.me',
+ * 'https://www.googleapis.com/auth/classroom.coursework.students',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.courseWork.studentSubmissions.patch({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the course work.
+ * courseWorkId: 'placeholder-value',
+ * // Identifier of the student submission.
+ * id: 'placeholder-value',
+ * // Mask that identifies which fields on the student submission to update.
+ * // This field is required to do an update. The update fails if invalid
+ * // fields are specified.
+ * //
+ * // The following fields may be specified by teachers:
+ * //
+ * // * `draft_grade`
+ * // * `assigned_grade`
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "assignedGrade": {},
+ * // "assignmentSubmission": {},
+ * // "associatedWithDeveloper": false,
+ * // "courseId": "my_courseId",
+ * // "courseWorkId": "my_courseWorkId",
+ * // "courseWorkType": "my_courseWorkType",
+ * // "creationTime": "my_creationTime",
+ * // "draftGrade": {},
+ * // "id": "my_id",
+ * // "late": false,
+ * // "multipleChoiceSubmission": {},
+ * // "shortAnswerSubmission": {},
+ * // "state": "my_state",
+ * // "submissionHistory": [],
+ * // "updateTime": "my_updateTime",
+ * // "userId": "my_userId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "alternateLink": "my_alternateLink",
+ * // "assignedGrade": {},
+ * // "assignmentSubmission": {},
+ * // "associatedWithDeveloper": false,
+ * // "courseId": "my_courseId",
+ * // "courseWorkId": "my_courseWorkId",
+ * // "courseWorkType": "my_courseWorkType",
+ * // "creationTime": "my_creationTime",
+ * // "draftGrade": {},
+ * // "id": "my_id",
+ * // "late": false,
+ * // "multipleChoiceSubmission": {},
+ * // "shortAnswerSubmission": {},
+ * // "state": "my_state",
+ * // "submissionHistory": [],
+ * // "updateTime": "my_updateTime",
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.courseWork.studentSubmissions.patch
* @memberOf! ()
*
@@ -3546,6 +5320,56 @@ export namespace classroom_v1 {
/**
* classroom.courses.courseWork.studentSubmissions.reclaim
* @desc Reclaims a student submission on behalf of the student that owns it. Reclaiming a student submission transfers ownership of attached Drive files to the student and updates the submission state. Only the student that owns the requested student submission may call this method, and only for a student submission that has been turned in. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, unsubmit the requested student submission, or for access errors. * `FAILED_PRECONDITION` if the student submission has not been turned in. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.coursework.me'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.courseWork.studentSubmissions.reclaim({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the course work.
+ * courseWorkId: 'placeholder-value',
+ * // Identifier of the student submission.
+ * id: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.courseWork.studentSubmissions.reclaim
* @memberOf! ()
*
@@ -3621,6 +5445,56 @@ export namespace classroom_v1 {
/**
* classroom.courses.courseWork.studentSubmissions.return
* @desc Returns a student submission. Returning a student submission transfers ownership of attached Drive files to the student and may also update the submission state. Unlike the Classroom application, returning a student submission does not set assignedGrade to the draftGrade value. Only a teacher of the course that contains the requested student submission may call this method. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, return the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.coursework.students'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.courseWork.studentSubmissions.return({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the course work.
+ * courseWorkId: 'placeholder-value',
+ * // Identifier of the student submission.
+ * id: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.courseWork.studentSubmissions.return
* @memberOf! ()
*
@@ -3696,6 +5570,56 @@ export namespace classroom_v1 {
/**
* classroom.courses.courseWork.studentSubmissions.turnIn
* @desc Turns in a student submission. Turning in a student submission transfers ownership of attached Drive files to the teacher and may also update the submission state. This may only be called by the student that owns the specified student submission. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, turn in the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.coursework.me'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.courseWork.studentSubmissions.turnIn({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the course work.
+ * courseWorkId: 'placeholder-value',
+ * // Identifier of the student submission.
+ * id: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.courseWork.studentSubmissions.turnIn
* @memberOf! ()
*
@@ -3964,6 +5888,71 @@ export namespace classroom_v1 {
/**
* classroom.courses.students.create
* @desc Adds a user as a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create students in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a student or teacher in the course.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.profile.emails',
+ * 'https://www.googleapis.com/auth/classroom.profile.photos',
+ * 'https://www.googleapis.com/auth/classroom.rosters',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.students.create({
+ * // Identifier of the course to create the student in.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Enrollment code of the course to create the student in.
+ * // This code is required if userId
+ * // corresponds to the requesting user; it may be omitted if the requesting
+ * // user has administrative permissions to create students for any user.
+ * enrollmentCode: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "courseId": "my_courseId",
+ * // "profile": {},
+ * // "studentWorkFolder": {},
+ * // "userId": "my_userId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "courseId": "my_courseId",
+ * // "profile": {},
+ * // "studentWorkFolder": {},
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.students.create
* @memberOf! ()
*
@@ -4038,6 +6027,53 @@ export namespace classroom_v1 {
/**
* classroom.courses.students.delete
* @desc Deletes a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete students of this course or for access errors. * `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.rosters'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.students.delete({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the student to delete. The identifier can be one of the
+ * // following:
+ * //
+ * // * the numeric identifier for the user
+ * // * the email address of the user
+ * // * the string literal `"me"`, indicating the requesting user
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.students.delete
* @memberOf! ()
*
@@ -4111,6 +6147,63 @@ export namespace classroom_v1 {
/**
* classroom.courses.students.get
* @desc Returns a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view students of this course or for access errors. * `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.profile.emails',
+ * 'https://www.googleapis.com/auth/classroom.profile.photos',
+ * 'https://www.googleapis.com/auth/classroom.rosters',
+ * 'https://www.googleapis.com/auth/classroom.rosters.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.students.get({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the student to return. The identifier can be one of the
+ * // following:
+ * //
+ * // * the numeric identifier for the user
+ * // * the email address of the user
+ * // * the string literal `"me"`, indicating the requesting user
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "courseId": "my_courseId",
+ * // "profile": {},
+ * // "studentWorkFolder": {},
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.students.get
* @memberOf! ()
*
@@ -4184,6 +6277,66 @@ export namespace classroom_v1 {
/**
* classroom.courses.students.list
* @desc Returns a list of students of this course that the requester is permitted to view. This method returns the following error codes: * `NOT_FOUND` if the course does not exist. * `PERMISSION_DENIED` for access errors.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.profile.emails',
+ * 'https://www.googleapis.com/auth/classroom.profile.photos',
+ * 'https://www.googleapis.com/auth/classroom.rosters',
+ * 'https://www.googleapis.com/auth/classroom.rosters.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.students.list({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Maximum number of items to return. Zero means no maximum.
+ * //
+ * // The server may return fewer than the specified number of results.
+ * pageSize: 'placeholder-value',
+ * // nextPageToken
+ * // value returned from a previous
+ * // list call, indicating that
+ * // the subsequent page of results should be returned.
+ * //
+ * // The list request must be
+ * // otherwise identical to the one that resulted in this token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "students": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.students.list
* @memberOf! ()
*
@@ -4343,6 +6496,64 @@ export namespace classroom_v1 {
/**
* classroom.courses.teachers.create
* @desc Creates a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a teacher or student in the course.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.profile.emails',
+ * 'https://www.googleapis.com/auth/classroom.profile.photos',
+ * 'https://www.googleapis.com/auth/classroom.rosters',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.teachers.create({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "courseId": "my_courseId",
+ * // "profile": {},
+ * // "userId": "my_userId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "courseId": "my_courseId",
+ * // "profile": {},
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.teachers.create
* @memberOf! ()
*
@@ -4416,6 +6627,53 @@ export namespace classroom_v1 {
/**
* classroom.courses.teachers.delete
* @desc Deletes a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete teachers of this course or for access errors. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist. * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher of this course.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.rosters'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.teachers.delete({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the teacher to delete. The identifier can be one of the
+ * // following:
+ * //
+ * // * the numeric identifier for the user
+ * // * the email address of the user
+ * // * the string literal `"me"`, indicating the requesting user
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.teachers.delete
* @memberOf! ()
*
@@ -4489,6 +6747,62 @@ export namespace classroom_v1 {
/**
* classroom.courses.teachers.get
* @desc Returns a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view teachers of this course or for access errors. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.profile.emails',
+ * 'https://www.googleapis.com/auth/classroom.profile.photos',
+ * 'https://www.googleapis.com/auth/classroom.rosters',
+ * 'https://www.googleapis.com/auth/classroom.rosters.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.teachers.get({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the teacher to return. The identifier can be one of the
+ * // following:
+ * //
+ * // * the numeric identifier for the user
+ * // * the email address of the user
+ * // * the string literal `"me"`, indicating the requesting user
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "courseId": "my_courseId",
+ * // "profile": {},
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.teachers.get
* @memberOf! ()
*
@@ -4562,6 +6876,66 @@ export namespace classroom_v1 {
/**
* classroom.courses.teachers.list
* @desc Returns a list of teachers of this course that the requester is permitted to view. This method returns the following error codes: * `NOT_FOUND` if the course does not exist. * `PERMISSION_DENIED` for access errors.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.profile.emails',
+ * 'https://www.googleapis.com/auth/classroom.profile.photos',
+ * 'https://www.googleapis.com/auth/classroom.rosters',
+ * 'https://www.googleapis.com/auth/classroom.rosters.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.teachers.list({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Maximum number of items to return. Zero means no maximum.
+ * //
+ * // The server may return fewer than the specified number of results.
+ * pageSize: 'placeholder-value',
+ * // nextPageToken
+ * // value returned from a previous
+ * // list call, indicating that
+ * // the subsequent page of results should be returned.
+ * //
+ * // The list request must be
+ * // otherwise identical to the one that resulted in this token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "teachers": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.teachers.list
* @memberOf! ()
*
@@ -4717,6 +7091,62 @@ export namespace classroom_v1 {
/**
* classroom.courses.topics.create
* @desc Creates a topic. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create a topic in the requested course, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.topics'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.topics.create({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "courseId": "my_courseId",
+ * // "name": "my_name",
+ * // "topicId": "my_topicId",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "courseId": "my_courseId",
+ * // "name": "my_name",
+ * // "topicId": "my_topicId",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.topics.create
* @memberOf! ()
*
@@ -4790,6 +7220,48 @@ export namespace classroom_v1 {
/**
* classroom.courses.topics.delete
* @desc Deletes a topic. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not allowed to delete the requested topic or for access errors. * `FAILED_PRECONDITION` if the requested topic has already been deleted. * `NOT_FOUND` if no course or topic exists with the requested ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.topics'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.topics.delete({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the topic to delete.
+ * id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.topics.delete
* @memberOf! ()
*
@@ -4863,6 +7335,54 @@ export namespace classroom_v1 {
/**
* classroom.courses.topics.get
* @desc Returns a topic. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or topic, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or topic does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.topics',
+ * 'https://www.googleapis.com/auth/classroom.topics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.topics.get({
+ * // Identifier of the course.
+ * courseId: 'placeholder-value',
+ * // Identifier of the topic.
+ * id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "courseId": "my_courseId",
+ * // "name": "my_name",
+ * // "topicId": "my_topicId",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.topics.get
* @memberOf! ()
*
@@ -4936,6 +7456,65 @@ export namespace classroom_v1 {
/**
* classroom.courses.topics.list
* @desc Returns the list of topics that the requester is permitted to view. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.topics',
+ * 'https://www.googleapis.com/auth/classroom.topics.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.topics.list({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Maximum number of items to return. Zero or unspecified indicates that the
+ * // server may assign a maximum.
+ * //
+ * // The server may return fewer than the specified number of results.
+ * pageSize: 'placeholder-value',
+ * // nextPageToken
+ * // value returned from a previous
+ * // list call,
+ * // indicating that the subsequent page of results should be returned.
+ * //
+ * // The list request
+ * // must be otherwise identical to the one that resulted in this token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "topic": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.topics.list
* @memberOf! ()
*
@@ -5012,6 +7591,76 @@ export namespace classroom_v1 {
/**
* classroom.courses.topics.patch
* @desc Updates one or more fields of a topic. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding topic or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or topic does not exist
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.topics'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.courses.topics.patch({
+ * // Identifier of the course.
+ * // This identifier can be either the Classroom-assigned identifier or an
+ * // alias.
+ * courseId: 'placeholder-value',
+ * // Identifier of the topic.
+ * id: 'placeholder-value',
+ * // Mask that identifies which fields on the topic to update.
+ * // This field is required to do an update. The update fails if invalid
+ * // fields are specified. If a field supports empty values, it can be cleared
+ * // by specifying it in the update mask and not in the Topic object. If a
+ * // field that does not support empty values is included in the update mask and
+ * // not set in the Topic object, an `INVALID_ARGUMENT` error is
+ * // returned.
+ * //
+ * // The following fields may be specified:
+ * //
+ * // * `name`
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "courseId": "my_courseId",
+ * // "name": "my_name",
+ * // "topicId": "my_topicId",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "courseId": "my_courseId",
+ * // "name": "my_name",
+ * // "topicId": "my_topicId",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.courses.topics.patch
* @memberOf! ()
*
@@ -5189,6 +7838,44 @@ export namespace classroom_v1 {
/**
* classroom.invitations.accept
* @desc Accepts an invitation, removing it and adding the invited user to the teachers or students (as appropriate) of the specified course. Only the invited user may accept an invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to accept the requested invitation or for access errors. * `FAILED_PRECONDITION` for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `NOT_FOUND` if no invitation exists with the requested ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.rosters'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.invitations.accept({
+ * // Identifier of the invitation to accept.
+ * id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.invitations.accept
* @memberOf! ()
*
@@ -5261,6 +7948,57 @@ export namespace classroom_v1 {
/**
* classroom.invitations.create
* @desc Creates an invitation. Only one invitation for a user and course may exist at a time. Delete and re-create an invitation to make changes. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create invitations for this course or for access errors. * `NOT_FOUND` if the course or the user does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled or if the user already has this role or a role with greater permissions. * `ALREADY_EXISTS` if an invitation for the specified user and course already exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.rosters'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.invitations.create({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "courseId": "my_courseId",
+ * // "id": "my_id",
+ * // "role": "my_role",
+ * // "userId": "my_userId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "courseId": "my_courseId",
+ * // "id": "my_id",
+ * // "role": "my_role",
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.invitations.create
* @memberOf! ()
*
@@ -5332,6 +8070,44 @@ export namespace classroom_v1 {
/**
* classroom.invitations.delete
* @desc Deletes an invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested invitation or for access errors. * `NOT_FOUND` if no invitation exists with the requested ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.rosters'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.invitations.delete({
+ * // Identifier of the invitation to delete.
+ * id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.invitations.delete
* @memberOf! ()
*
@@ -5404,6 +8180,52 @@ export namespace classroom_v1 {
/**
* classroom.invitations.get
* @desc Returns an invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view the requested invitation or for access errors. * `NOT_FOUND` if no invitation exists with the requested ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.rosters',
+ * 'https://www.googleapis.com/auth/classroom.rosters.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.invitations.get({
+ * // Identifier of the invitation to return.
+ * id: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "courseId": "my_courseId",
+ * // "id": "my_id",
+ * // "role": "my_role",
+ * // "userId": "my_userId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.invitations.get
* @memberOf! ()
*
@@ -5477,6 +8299,70 @@ export namespace classroom_v1 {
/**
* classroom.invitations.list
* @desc Returns a list of invitations that the requesting user is permitted to view, restricted to those that match the list request. *Note:* At least one of `user_id` or `course_id` must be supplied. Both fields can be supplied. This method returns the following error codes: * `PERMISSION_DENIED` for access errors.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.rosters',
+ * 'https://www.googleapis.com/auth/classroom.rosters.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.invitations.list({
+ * // Restricts returned invitations to those for a course with the specified
+ * // identifier.
+ * courseId: 'placeholder-value',
+ * // Maximum number of items to return. Zero means no maximum.
+ * //
+ * // The server may return fewer than the specified number of results.
+ * pageSize: 'placeholder-value',
+ * // nextPageToken
+ * // value returned from a previous
+ * // list call, indicating
+ * // that the subsequent page of results should be returned.
+ * //
+ * // The list request must be
+ * // otherwise identical to the one that resulted in this token.
+ * pageToken: 'placeholder-value',
+ * // Restricts returned invitations to those for a specific user. The identifier
+ * // can be one of the following:
+ * //
+ * // * the numeric identifier for the user
+ * // * the email address of the user
+ * // * the string literal `"me"`, indicating the requesting user
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "invitations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.invitations.list
* @memberOf! ()
*
@@ -5630,6 +8516,57 @@ export namespace classroom_v1 {
/**
* classroom.registrations.create
* @desc Creates a `Registration`, causing Classroom to start sending notifications from the provided `feed` to the destination provided in `cloudPubSubTopic`. Returns the created `Registration`. Currently, this will be the same as the argument, but with server-assigned fields such as `expiry_time` and `id` filled in. Note that any value specified for the `expiry_time` or `id` fields will be ignored. While Classroom may validate the `cloudPubSubTopic` and return errors on a best effort basis, it is the caller's responsibility to ensure that it exists and that Classroom has permission to publish to it. This method may return the following error codes: * `PERMISSION_DENIED` if: * the authenticated user does not have permission to receive notifications from the requested field; or * the credential provided does not include the appropriate scope for the requested feed. * another access error is encountered. * `INVALID_ARGUMENT` if: * no `cloudPubsubTopic` is specified, or the specified `cloudPubsubTopic` is not valid; or * no `feed` is specified, or the specified `feed` is not valid. * `NOT_FOUND` if: * the specified `feed` cannot be located, or the requesting user does not have permission to determine whether or not it exists; or * the specified `cloudPubsubTopic` cannot be located, or Classroom has not been granted permission to publish to it.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.push-notifications'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.registrations.create({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "cloudPubsubTopic": {},
+ * // "expiryTime": "my_expiryTime",
+ * // "feed": {},
+ * // "registrationId": "my_registrationId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cloudPubsubTopic": {},
+ * // "expiryTime": "my_expiryTime",
+ * // "feed": {},
+ * // "registrationId": "my_registrationId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.registrations.create
* @memberOf! ()
*
@@ -5701,6 +8638,44 @@ export namespace classroom_v1 {
/**
* classroom.registrations.delete
* @desc Deletes a `Registration`, causing Classroom to stop sending notifications for that `Registration`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/classroom.push-notifications'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.registrations.delete({
+ * // The `registration_id` of the `Registration` to be deleted.
+ * registrationId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.registrations.delete
* @memberOf! ()
*
@@ -5811,6 +8786,61 @@ export namespace classroom_v1 {
/**
* classroom.userProfiles.get
* @desc Returns a user profile. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access this user profile, if no profile exists with the requested ID, or for access errors.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.profile.emails',
+ * 'https://www.googleapis.com/auth/classroom.profile.photos',
+ * 'https://www.googleapis.com/auth/classroom.rosters',
+ * 'https://www.googleapis.com/auth/classroom.rosters.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.userProfiles.get({
+ * // Identifier of the profile to return. The identifier can be one of the
+ * // following:
+ * //
+ * // * the numeric identifier for the user
+ * // * the email address of the user
+ * // * the string literal `"me"`, indicating the requesting user
+ * userId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "emailAddress": "my_emailAddress",
+ * // "id": "my_id",
+ * // "name": {},
+ * // "permissions": [],
+ * // "photoUrl": "my_photoUrl",
+ * // "verifiedTeacher": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.userProfiles.get
* @memberOf! ()
*
@@ -5903,6 +8933,64 @@ export namespace classroom_v1 {
/**
* classroom.userProfiles.guardianInvitations.create
* @desc Creates a guardian invitation, and sends an email to the guardian asking them to confirm that they are the student's guardian. Once the guardian accepts the invitation, their `state` will change to `COMPLETED` and they will start receiving guardian notifications. A `Guardian` resource will also be created to represent the active guardian. The request object must have the `student_id` and `invited_email_address` fields set. Failing to set these fields, or setting any other fields in the request, will result in an error. This method returns the following error codes: * `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if the guardian in question has already rejected too many requests for that student, if guardians are not enabled for the domain in question, or for other access errors. * `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian link limit. * `INVALID_ARGUMENT` if the guardian email address is not valid (for example, if it is too long), or if the format of the student ID provided cannot be recognized (it is not an email address, nor a `user_id` from this API). This error will also be returned if read-only fields are set, or if the `state` field is set to to a value other than `PENDING`. * `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student. * `ALREADY_EXISTS` if there is already a pending guardian invitation for the student and `invited_email_address` provided, or if the provided `invited_email_address` matches the Google account of an existing `Guardian` for this user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.guardianlinks.students',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.userProfiles.guardianInvitations.create({
+ * // ID of the student (in standard format)
+ * studentId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "invitationId": "my_invitationId",
+ * // "invitedEmailAddress": "my_invitedEmailAddress",
+ * // "state": "my_state",
+ * // "studentId": "my_studentId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "invitationId": "my_invitationId",
+ * // "invitedEmailAddress": "my_invitedEmailAddress",
+ * // "state": "my_state",
+ * // "studentId": "my_studentId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.userProfiles.guardianInvitations.create
* @memberOf! ()
*
@@ -5977,6 +9065,55 @@ export namespace classroom_v1 {
/**
* classroom.userProfiles.guardianInvitations.get
* @desc Returns a specific guardian invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view guardian invitations for the student identified by the `student_id`, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). * `NOT_FOUND` if Classroom cannot find any record of the given student or `invitation_id`. May also be returned if the student exists, but the requesting user does not have access to see that student.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.guardianlinks.students',
+ * 'https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.userProfiles.guardianInvitations.get({
+ * // The `id` field of the `GuardianInvitation` being requested.
+ * invitationId: 'placeholder-value',
+ * // The ID of the student whose guardian invitation is being requested.
+ * studentId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "invitationId": "my_invitationId",
+ * // "invitedEmailAddress": "my_invitedEmailAddress",
+ * // "state": "my_state",
+ * // "studentId": "my_studentId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.userProfiles.guardianInvitations.get
* @memberOf! ()
*
@@ -6052,6 +9189,77 @@ export namespace classroom_v1 {
/**
* classroom.userProfiles.guardianInvitations.list
* @desc Returns a list of guardian invitations that the requesting user is permitted to view, filtered by the parameters provided. This method returns the following error codes: * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting user is not permitted to view guardian invitations for that student, if `"-"` is specified as the `student_id` and the user is not a domain administrator, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). May also be returned if an invalid `page_token` or `state` is provided. * `NOT_FOUND` if a `student_id` is specified, and its format can be recognized, but Classroom has no record of that student.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.guardianlinks.students',
+ * 'https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.userProfiles.guardianInvitations.list({
+ * // If specified, only results with the specified `invited_email_address`
+ * // are returned.
+ * invitedEmailAddress: 'placeholder-value',
+ * // Maximum number of items to return. Zero or unspecified indicates that the
+ * // server may assign a maximum.
+ * //
+ * // The server may return fewer than the specified number of results.
+ * pageSize: 'placeholder-value',
+ * // nextPageToken
+ * // value returned from a previous
+ * // list
+ * // call, indicating that the subsequent page of results should be returned.
+ * //
+ * // The list
+ * // request must be otherwise identical to the one that resulted in this token.
+ * pageToken: 'placeholder-value',
+ * // If specified, only results with the specified `state` values are
+ * // returned. Otherwise, results with a `state` of `PENDING` are returned.
+ * states: 'placeholder-value',
+ * // The ID of the student whose guardian invitations are to be returned.
+ * // The identifier can be one of the following:
+ * //
+ * // * the numeric identifier for the user
+ * // * the email address of the user
+ * // * the string literal `"me"`, indicating the requesting user
+ * // * the string literal `"-"`, indicating that results should be returned for
+ * // all students that the requesting user is permitted to view guardian
+ * // invitations.
+ * studentId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "guardianInvitations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.userProfiles.guardianInvitations.list
* @memberOf! ()
*
@@ -6138,6 +9346,76 @@ export namespace classroom_v1 {
/**
* classroom.userProfiles.guardianInvitations.patch
* @desc Modifies a guardian invitation. Currently, the only valid modification is to change the `state` from `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if guardians are not enabled for the domain in question or for other access errors. * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state. * `INVALID_ARGUMENT` if the format of the student ID provided cannot be recognized (it is not an email address, nor a `user_id` from this API), or if the passed `GuardianInvitation` has a `state` other than `COMPLETE`, or if it modifies fields other than `state`. * `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student, or if the `id` field does not refer to a guardian invitation known to Classroom.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.guardianlinks.students',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.userProfiles.guardianInvitations.patch({
+ * // The `id` field of the `GuardianInvitation` to be modified.
+ * invitationId: 'placeholder-value',
+ * // The ID of the student whose guardian invitation is to be modified.
+ * studentId: 'placeholder-value',
+ * // Mask that identifies which fields on the course to update.
+ * // This field is required to do an update. The update fails if invalid
+ * // fields are specified. The following fields are valid:
+ * //
+ * // * `state`
+ * //
+ * // When set in a query parameter, this field should be specified as
+ * //
+ * // `updateMask=,,...`
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "invitationId": "my_invitationId",
+ * // "invitedEmailAddress": "my_invitedEmailAddress",
+ * // "state": "my_state",
+ * // "studentId": "my_studentId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "invitationId": "my_invitationId",
+ * // "invitedEmailAddress": "my_invitedEmailAddress",
+ * // "state": "my_state",
+ * // "studentId": "my_studentId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.userProfiles.guardianInvitations.patch
* @memberOf! ()
*
@@ -6309,6 +9587,52 @@ export namespace classroom_v1 {
/**
* classroom.userProfiles.guardians.delete
* @desc Deletes a guardian. The guardian will no longer receive guardian notifications and the guardian will no longer be accessible via the API. This method returns the following error codes: * `PERMISSION_DENIED` if no user that matches the provided `student_id` is visible to the requesting user, if the requesting user is not permitted to manage guardians for the student identified by the `student_id`, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API). * `NOT_FOUND` if the requesting user is permitted to modify guardians for the requested `student_id`, but no `Guardian` record exists for that student with the provided `guardian_id`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.guardianlinks.students',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.userProfiles.guardians.delete({
+ * // The `id` field from a `Guardian`.
+ * guardianId: 'placeholder-value',
+ * // The student whose guardian is to be deleted. One of the following:
+ * //
+ * // * the numeric identifier for the user
+ * // * the email address of the user
+ * // * the string literal `"me"`, indicating the requesting user
+ * studentId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.userProfiles.guardians.delete
* @memberOf! ()
*
@@ -6381,6 +9705,59 @@ export namespace classroom_v1 {
/**
* classroom.userProfiles.guardians.get
* @desc Returns a specific guardian. This method returns the following error codes: * `PERMISSION_DENIED` if no user that matches the provided `student_id` is visible to the requesting user, if the requesting user is not permitted to view guardian information for the student identified by the `student_id`, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). * `NOT_FOUND` if the requesting user is permitted to view guardians for the requested `student_id`, but no `Guardian` record exists for that student that matches the provided `guardian_id`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly',
+ * 'https://www.googleapis.com/auth/classroom.guardianlinks.students',
+ * 'https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.userProfiles.guardians.get({
+ * // The `id` field from a `Guardian`.
+ * guardianId: 'placeholder-value',
+ * // The student whose guardian is being requested. One of the following:
+ * //
+ * // * the numeric identifier for the user
+ * // * the email address of the user
+ * // * the string literal `"me"`, indicating the requesting user
+ * studentId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "guardianId": "my_guardianId",
+ * // "guardianProfile": {},
+ * // "invitedEmailAddress": "my_invitedEmailAddress",
+ * // "studentId": "my_studentId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.userProfiles.guardians.get
* @memberOf! ()
*
@@ -6453,6 +9830,75 @@ export namespace classroom_v1 {
/**
* classroom.userProfiles.guardians.list
* @desc Returns a list of guardians that the requesting user is permitted to view, restricted to those that match the request. To list guardians for any student that the requesting user may view guardians for, use the literal character `-` for the student ID. This method returns the following error codes: * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting user is not permitted to view guardian information for that student, if `"-"` is specified as the `student_id` and the user is not a domain administrator, if guardians are not enabled for the domain in question, if the `invited_email_address` filter is set by a user who is not a domain administrator, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). May also be returned if an invalid `page_token` is provided. * `NOT_FOUND` if a `student_id` is specified, and its format can be recognized, but Classroom has no record of that student.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/classroom.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const classroom = google.classroom('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly',
+ * 'https://www.googleapis.com/auth/classroom.guardianlinks.students',
+ * 'https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await classroom.userProfiles.guardians.list({
+ * // Filter results by the email address that the original invitation was sent
+ * // to, resulting in this guardian link.
+ * // This filter can only be used by domain administrators.
+ * invitedEmailAddress: 'placeholder-value',
+ * // Maximum number of items to return. Zero or unspecified indicates that the
+ * // server may assign a maximum.
+ * //
+ * // The server may return fewer than the specified number of results.
+ * pageSize: 'placeholder-value',
+ * // nextPageToken
+ * // value returned from a previous
+ * // list call,
+ * // indicating that the subsequent page of results should be returned.
+ * //
+ * // The list request
+ * // must be otherwise identical to the one that resulted in this token.
+ * pageToken: 'placeholder-value',
+ * // Filter results by the student who the guardian is linked to.
+ * // The identifier can be one of the following:
+ * //
+ * // * the numeric identifier for the user
+ * // * the email address of the user
+ * // * the string literal `"me"`, indicating the requesting user
+ * // * the string literal `"-"`, indicating that results should be returned for
+ * // all students that the requesting user has access to view.
+ * studentId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "guardians": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias classroom.userProfiles.guardians.list
* @memberOf! ()
*
diff --git a/src/apis/cloudasset/v1.ts b/src/apis/cloudasset/v1.ts
index 728c9a7a8f4..12103135950 100644
--- a/src/apis/cloudasset/v1.ts
+++ b/src/apis/cloudasset/v1.ts
@@ -778,6 +778,63 @@ export namespace cloudasset_v1 {
/**
* cloudasset.feeds.create
* @desc Creates a feed in a parent project/folder/organization to listen to its asset updates.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.feeds.create({
+ * // Required. The name of the project/folder/organization where this feed
+ * // should be created in. It can only be an organization number (such as
+ * // "organizations/123"), a folder number (such as "folders/123"), a project ID
+ * // (such as "projects/my-project-id")", or a project number (such as
+ * // "projects/12345").
+ * parent: '[^/]+/[^/]+',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "feed": {},
+ * // "feedId": "my_feedId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assetNames": [],
+ * // "assetTypes": [],
+ * // "contentType": "my_contentType",
+ * // "feedOutputConfig": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.feeds.create
* @memberOf! ()
*
@@ -850,6 +907,47 @@ export namespace cloudasset_v1 {
/**
* cloudasset.feeds.delete
* @desc Deletes an asset feed.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.feeds.delete({
+ * // Required. The name of the feed and it must be in the format of:
+ * // projects/project_number/feeds/feed_id
+ * // folders/folder_number/feeds/feed_id
+ * // organizations/organization_number/feeds/feed_id
+ * name: '[^/]+/[^/]+/feeds/my-feed',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.feeds.delete
* @memberOf! ()
*
@@ -918,6 +1016,53 @@ export namespace cloudasset_v1 {
/**
* cloudasset.feeds.get
* @desc Gets details about an asset feed.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.feeds.get({
+ * // Required. The name of the Feed and it must be in the format of:
+ * // projects/project_number/feeds/feed_id
+ * // folders/folder_number/feeds/feed_id
+ * // organizations/organization_number/feeds/feed_id
+ * name: '[^/]+/[^/]+/feeds/my-feed',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assetNames": [],
+ * // "assetTypes": [],
+ * // "contentType": "my_contentType",
+ * // "feedOutputConfig": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.feeds.get
* @memberOf! ()
*
@@ -986,6 +1131,48 @@ export namespace cloudasset_v1 {
/**
* cloudasset.feeds.list
* @desc Lists all asset feeds in a parent project/folder/organization.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.feeds.list({
+ * // Required. The parent project/folder/organization whose feeds are to be
+ * // listed. It can only be using project/folder/organization number (such as
+ * // "folders/12345")", or a project ID (such as "projects/my-project-id").
+ * parent: '[^/]+/[^/]+',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "feeds": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.feeds.list
* @memberOf! ()
*
@@ -1059,6 +1246,65 @@ export namespace cloudasset_v1 {
/**
* cloudasset.feeds.patch
* @desc Updates an asset feed configuration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.feeds.patch({
+ * // Required. The format will be
+ * // projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+ * // folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+ * // organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+ * //
+ * // The client-assigned feed identifier must be unique within the parent
+ * // project/folder/organization.
+ * name: '[^/]+/[^/]+/feeds/my-feed',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "feed": {},
+ * // "updateMask": "my_updateMask"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assetNames": [],
+ * // "assetTypes": [],
+ * // "contentType": "my_contentType",
+ * // "feedOutputConfig": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.feeds.patch
* @memberOf! ()
*
@@ -1201,6 +1447,50 @@ export namespace cloudasset_v1 {
/**
* cloudasset.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.operations.get({
+ * // The name of the operation resource.
+ * name: '[^/]+/[^/]+/operations/my-operation/.*',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.operations.get
* @memberOf! ()
*
@@ -1290,6 +1580,66 @@ export namespace cloudasset_v1 {
/**
* cloudasset.batchGetAssetsHistory
* @desc Batch gets the update history of assets that overlap a time window. For RESOURCE content, this API outputs history with asset in both non-delete or deleted status. For IAM_POLICY content, this API outputs history when the asset and its attached IAM POLICY both exist. This can create gaps in the output history. If a specified asset does not exist, this API returns an INVALID_ARGUMENT error.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.batchGetAssetsHistory({
+ * // A list of the full names of the assets. For example:
+ * // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+ * // See [Resource
+ * // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+ * // and [Resource Name
+ * // Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+ * // for more info.
+ * //
+ * // The request becomes a no-op if the asset name list is empty, and the max
+ * // size of the asset name list is 100 in one request.
+ * assetNames: 'placeholder-value',
+ * // Optional. The content type.
+ * contentType: 'placeholder-value',
+ * // Required. The relative name of the root asset. It can only be an
+ * // organization number (such as "organizations/123"), a project ID (such as
+ * // "projects/my-project-id")", or a project number (such as "projects/12345").
+ * parent: '[^/]+/[^/]+',
+ * // End time of the time window (inclusive). If not specified, the current
+ * // timestamp is used instead.
+ * 'readTimeWindow.endTime': 'placeholder-value',
+ * // Start time of the time window (exclusive).
+ * 'readTimeWindow.startTime': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assets": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.batchGetAssetsHistory
* @memberOf! ()
*
@@ -1377,6 +1727,64 @@ export namespace cloudasset_v1 {
/**
* cloudasset.exportAssets
* @desc Exports assets with time and resource types to a given Cloud Storage location. The output format is newline-delimited JSON. This API implements the google.longrunning.Operation API allowing you to keep track of the export.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.exportAssets({
+ * // Required. The relative name of the root asset. This can only be an
+ * // organization number (such as "organizations/123"), a project ID (such as
+ * // "projects/my-project-id"), or a project number (such as "projects/12345"),
+ * // or a folder number (such as "folders/123").
+ * parent: '[^/]+/[^/]+',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "assetTypes": [],
+ * // "contentType": "my_contentType",
+ * // "outputConfig": {},
+ * // "readTime": "my_readTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.exportAssets
* @memberOf! ()
*
diff --git a/src/apis/cloudasset/v1beta1.ts b/src/apis/cloudasset/v1beta1.ts
index 34b37051487..4316d89009c 100644
--- a/src/apis/cloudasset/v1beta1.ts
+++ b/src/apis/cloudasset/v1beta1.ts
@@ -388,6 +388,64 @@ export namespace cloudasset_v1beta1 {
/**
* cloudasset.folders.exportAssets
* @desc Exports assets with time and resource types to a given Cloud Storage location. The output format is newline-delimited JSON. This API implements the google.longrunning.Operation API allowing you to keep track of the export.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.folders.exportAssets({
+ * // Required. The relative name of the root asset. This can only be an
+ * // organization number (such as "organizations/123"), a project ID (such as
+ * // "projects/my-project-id"), a project number (such as "projects/12345"), or
+ * // a folder number (such as "folders/123").
+ * parent: 'folders/my-folder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "assetTypes": [],
+ * // "contentType": "my_contentType",
+ * // "outputConfig": {},
+ * // "readTime": "my_readTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.folders.exportAssets
* @memberOf! ()
*
@@ -488,6 +546,50 @@ export namespace cloudasset_v1beta1 {
/**
* cloudasset.folders.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.folders.operations.get({
+ * // The name of the operation resource.
+ * name: 'folders/my-folder/operations/my-operation/.*',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.folders.operations.get
* @memberOf! ()
*
@@ -581,6 +683,64 @@ export namespace cloudasset_v1beta1 {
/**
* cloudasset.organizations.batchGetAssetsHistory
* @desc Batch gets the update history of assets that overlap a time window. For RESOURCE content, this API outputs history with asset in both non-delete or deleted status. For IAM_POLICY content, this API outputs history when the asset and its attached IAM POLICY both exist. This can create gaps in the output history. If a specified asset does not exist, this API returns an INVALID_ARGUMENT error.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.organizations.batchGetAssetsHistory({
+ * // A list of the full names of the assets. For example:
+ * // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+ * // See [Resource
+ * // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+ * // for more info.
+ * //
+ * // The request becomes a no-op if the asset name list is empty, and the max
+ * // size of the asset name list is 100 in one request.
+ * assetNames: 'placeholder-value',
+ * // Optional. The content type.
+ * contentType: 'placeholder-value',
+ * // Required. The relative name of the root asset. It can only be an
+ * // organization number (such as "organizations/123"), a project ID (such as
+ * // "projects/my-project-id")", or a project number (such as "projects/12345").
+ * parent: 'organizations/my-organization',
+ * // End time of the time window (inclusive).
+ * // Current timestamp if not specified.
+ * 'readTimeWindow.endTime': 'placeholder-value',
+ * // Start time of the time window (exclusive).
+ * 'readTimeWindow.startTime': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assets": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.organizations.batchGetAssetsHistory
* @memberOf! ()
*
@@ -668,6 +828,64 @@ export namespace cloudasset_v1beta1 {
/**
* cloudasset.organizations.exportAssets
* @desc Exports assets with time and resource types to a given Cloud Storage location. The output format is newline-delimited JSON. This API implements the google.longrunning.Operation API allowing you to keep track of the export.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.organizations.exportAssets({
+ * // Required. The relative name of the root asset. This can only be an
+ * // organization number (such as "organizations/123"), a project ID (such as
+ * // "projects/my-project-id"), a project number (such as "projects/12345"), or
+ * // a folder number (such as "folders/123").
+ * parent: 'organizations/my-organization',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "assetTypes": [],
+ * // "contentType": "my_contentType",
+ * // "outputConfig": {},
+ * // "readTime": "my_readTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.organizations.exportAssets
* @memberOf! ()
*
@@ -796,6 +1014,50 @@ export namespace cloudasset_v1beta1 {
/**
* cloudasset.organizations.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.organizations.operations.get({
+ * // The name of the operation resource.
+ * name: 'organizations/my-organization/operations/my-operation/.*',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.organizations.operations.get
* @memberOf! ()
*
@@ -889,6 +1151,64 @@ export namespace cloudasset_v1beta1 {
/**
* cloudasset.projects.batchGetAssetsHistory
* @desc Batch gets the update history of assets that overlap a time window. For RESOURCE content, this API outputs history with asset in both non-delete or deleted status. For IAM_POLICY content, this API outputs history when the asset and its attached IAM POLICY both exist. This can create gaps in the output history. If a specified asset does not exist, this API returns an INVALID_ARGUMENT error.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.projects.batchGetAssetsHistory({
+ * // A list of the full names of the assets. For example:
+ * // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+ * // See [Resource
+ * // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+ * // for more info.
+ * //
+ * // The request becomes a no-op if the asset name list is empty, and the max
+ * // size of the asset name list is 100 in one request.
+ * assetNames: 'placeholder-value',
+ * // Optional. The content type.
+ * contentType: 'placeholder-value',
+ * // Required. The relative name of the root asset. It can only be an
+ * // organization number (such as "organizations/123"), a project ID (such as
+ * // "projects/my-project-id")", or a project number (such as "projects/12345").
+ * parent: 'projects/my-project',
+ * // End time of the time window (inclusive).
+ * // Current timestamp if not specified.
+ * 'readTimeWindow.endTime': 'placeholder-value',
+ * // Start time of the time window (exclusive).
+ * 'readTimeWindow.startTime': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assets": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.projects.batchGetAssetsHistory
* @memberOf! ()
*
@@ -976,6 +1296,64 @@ export namespace cloudasset_v1beta1 {
/**
* cloudasset.projects.exportAssets
* @desc Exports assets with time and resource types to a given Cloud Storage location. The output format is newline-delimited JSON. This API implements the google.longrunning.Operation API allowing you to keep track of the export.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.projects.exportAssets({
+ * // Required. The relative name of the root asset. This can only be an
+ * // organization number (such as "organizations/123"), a project ID (such as
+ * // "projects/my-project-id"), a project number (such as "projects/12345"), or
+ * // a folder number (such as "folders/123").
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "assetTypes": [],
+ * // "contentType": "my_contentType",
+ * // "outputConfig": {},
+ * // "readTime": "my_readTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.projects.exportAssets
* @memberOf! ()
*
@@ -1104,6 +1482,50 @@ export namespace cloudasset_v1beta1 {
/**
* cloudasset.projects.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.projects.operations.get({
+ * // The name of the operation resource.
+ * name: 'projects/my-project/operations/my-operation/.*',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.projects.operations.get
* @memberOf! ()
*
diff --git a/src/apis/cloudasset/v1p1beta1.ts b/src/apis/cloudasset/v1p1beta1.ts
index a3f85619d61..14023677339 100644
--- a/src/apis/cloudasset/v1p1beta1.ts
+++ b/src/apis/cloudasset/v1p1beta1.ts
@@ -308,6 +308,67 @@ export namespace cloudasset_v1p1beta1 {
/**
* cloudasset.iamPolicies.searchAll
* @desc Searches all the IAM policies under a given accessible CRM scope (project/folder/organization). This RPC gives callers especially admins the ability to search all the IAM policies under a scope, even if they don't have .getIamPolicy permission of all the IAM policies. Callers should have cloud.assets.SearchAllIamPolicies permission on the requested scope, otherwise it will be rejected.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1p1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.iamPolicies.searchAll({
+ * // Optional. The page size for search result pagination. Page size is capped at 500 even
+ * // if a larger value is given. If set to zero, server will pick an appropriate
+ * // default. Returned results may be fewer than requested. When this happens,
+ * // there could be more results as long as `next_page_token` is returned.
+ * pageSize: 'placeholder-value',
+ * // Optional. If present, retrieve the next batch of results from the preceding call to
+ * // this method. `page_token` must be the value of `next_page_token` from the
+ * // previous response. The values of all other method parameters must be
+ * // identical to those in the previous call.
+ * pageToken: 'placeholder-value',
+ * // Optional. The query statement.
+ * // Examples:
+ * // * "policy:myuser@mydomain.com"
+ * // * "policy:(myuser@mydomain.com viewer)"
+ * query: 'placeholder-value',
+ * // Required. The relative name of an asset. The search is limited to the resources
+ * // within the `scope`. The allowed value must be:
+ * // * Organization number (such as "organizations/123")
+ * // * Folder number(such as "folders/1234")
+ * // * Project number (such as "projects/12345")
+ * // * Project id (such as "projects/abc")
+ * scope: '[^/]+/[^/]+',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "results": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.iamPolicies.searchAll
* @memberOf! ()
*
@@ -425,6 +486,72 @@ export namespace cloudasset_v1p1beta1 {
/**
* cloudasset.resources.searchAll
* @desc Searches all the resources under a given accessible CRM scope (project/folder/organization). This RPC gives callers especially admins the ability to search all the resources under a scope, even if they don't have .get permission of all the resources. Callers should have cloud.assets.SearchAllResources permission on the requested scope, otherwise it will be rejected.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1p1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.resources.searchAll({
+ * // Optional. A list of asset types that this request searches for. If empty, it will
+ * // search all the supported asset types.
+ * assetTypes: 'placeholder-value',
+ * // Optional. A comma separated list of fields specifying the sorting order of the
+ * // results. The default order is ascending. Add " desc" after the field name
+ * // to indicate descending order. Redundant space characters are ignored. For
+ * // example, " foo , bar desc ".
+ * orderBy: 'placeholder-value',
+ * // Optional. The page size for search result pagination. Page size is capped at 500 even
+ * // if a larger value is given. If set to zero, server will pick an appropriate
+ * // default. Returned results may be fewer than requested. When this happens,
+ * // there could be more results as long as `next_page_token` is returned.
+ * pageSize: 'placeholder-value',
+ * // Optional. If present, then retrieve the next batch of results from the preceding call
+ * // to this method. `page_token` must be the value of `next_page_token` from
+ * // the previous response. The values of all other method parameters, must be
+ * // identical to those in the previous call.
+ * pageToken: 'placeholder-value',
+ * // Optional. The query statement.
+ * query: 'placeholder-value',
+ * // Required. The relative name of an asset. The search is limited to the resources
+ * // within the `scope`. The allowed value must be:
+ * // * Organization number (such as "organizations/123")
+ * // * Folder number(such as "folders/1234")
+ * // * Project number (such as "projects/12345")
+ * // * Project id (such as "projects/abc")
+ * scope: '[^/]+/[^/]+',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "results": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.resources.searchAll
* @memberOf! ()
*
diff --git a/src/apis/cloudasset/v1p4beta1.ts b/src/apis/cloudasset/v1p4beta1.ts
index e746f1c4116..545229a5093 100644
--- a/src/apis/cloudasset/v1p4beta1.ts
+++ b/src/apis/cloudasset/v1p4beta1.ts
@@ -478,6 +478,134 @@ export namespace cloudasset_v1p4beta1 {
/**
* cloudasset.analyzeIamPolicy
* @desc Analyzes IAM policies based on the specified request. Returns a list of IamPolicyAnalysisResult matching the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1p4beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.analyzeIamPolicy({
+ * // Optional. The permissions to appear in result.
+ * 'analysisQuery.accessSelector.permissions': 'placeholder-value',
+ * // Optional. The roles to appear in result.
+ * 'analysisQuery.accessSelector.roles': 'placeholder-value',
+ * // Required. The identity appear in the form of members in
+ * // [IAM policy
+ * // binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+ * 'analysisQuery.identitySelector.identity': 'placeholder-value',
+ * // Required. The [full resource
+ * // name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+ * // .
+ * 'analysisQuery.resourceSelector.fullResourceName': 'placeholder-value',
+ * // Optional. If true, the response will include access analysis from identities to
+ * // resources via service account impersonation. This is a very expensive
+ * // operation, because many derived queries will be executed. We highly
+ * // recommend you use ExportIamPolicyAnalysis rpc instead.
+ * //
+ * // For example, if the request analyzes for which resources user A has
+ * // permission P, and there's an IAM policy states user A has
+ * // iam.serviceAccounts.getAccessToken permission to a service account SA,
+ * // and there's another IAM policy states service account SA has permission P
+ * // to a GCP folder F, then user A potentially has access to the GCP folder
+ * // F. And those advanced analysis results will be included in
+ * // AnalyzeIamPolicyResponse.service_account_impersonation_analysis.
+ * //
+ * // Another example, if the request analyzes for who has
+ * // permission P to a GCP folder F, and there's an IAM policy states user A
+ * // has iam.serviceAccounts.actAs permission to a service account SA, and
+ * // there's another IAM policy states service account SA has permission P to
+ * // the GCP folder F, then user A potentially has access to the GCP folder
+ * // F. And those advanced analysis results will be included in
+ * // AnalyzeIamPolicyResponse.service_account_impersonation_analysis.
+ * //
+ * // Default is false.
+ * 'options.analyzeServiceAccountImpersonation': 'placeholder-value',
+ * // Optional. Amount of time executable has to complete. See JSON representation of
+ * // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+ * //
+ * // If this field is set with a value less than the RPC deadline, and the
+ * // execution of your query hasn't finished in the specified
+ * // execution timeout, you will get a response with partial result.
+ * // Otherwise, your query's execution will continue until the RPC deadline.
+ * // If it's not finished until then, you will get a DEADLINE_EXCEEDED error.
+ * //
+ * // Default is empty.
+ * 'options.executionTimeout': 'placeholder-value',
+ * // Optional. If true, the identities section of the result will expand any
+ * // Google groups appearing in an IAM policy binding.
+ * //
+ * // If identity_selector is specified, the identity in the result will
+ * // be determined by the selector, and this flag will have no effect.
+ * //
+ * // Default is false.
+ * 'options.expandGroups': 'placeholder-value',
+ * // Optional. If true, the resource section of the result will expand any
+ * // resource attached to an IAM policy to include resources lower in the
+ * // resource hierarchy.
+ * //
+ * // For example, if the request analyzes for which resources user A has
+ * // permission P, and the results include an IAM policy with P on a GCP
+ * // folder, the results will also include resources in that folder with
+ * // permission P.
+ * //
+ * // If resource_selector is specified, the resource section of the result
+ * // will be determined by the selector, and this flag will have no effect.
+ * // Default is false.
+ * 'options.expandResources': 'placeholder-value',
+ * // Optional. If true, the access section of result will expand any roles
+ * // appearing in IAM policy bindings to include their permissions.
+ * //
+ * // If access_selector is specified, the access section of the result
+ * // will be determined by the selector, and this flag will have no effect.
+ * //
+ * // Default is false.
+ * 'options.expandRoles': 'placeholder-value',
+ * // Optional. If true, the result will output group identity edges, starting
+ * // from the binding's group members, to any expanded identities.
+ * // Default is false.
+ * 'options.outputGroupEdges': 'placeholder-value',
+ * // Optional. If true, the result will output resource edges, starting
+ * // from the policy attached resource, to any expanded resources.
+ * // Default is false.
+ * 'options.outputResourceEdges': 'placeholder-value',
+ * // Required. The relative name of the root asset. Only resources and IAM policies within
+ * // the parent will be analyzed. This can only be an organization number (such
+ * // as "organizations/123") or a folder number (such as "folders/123").
+ * parent: '[^/]+/[^/]+',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "fullyExplored": false,
+ * // "mainAnalysis": {},
+ * // "nonCriticalErrors": [],
+ * // "serviceAccountImpersonationAnalysis": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.analyzeIamPolicy
* @memberOf! ()
*
@@ -567,6 +695,62 @@ export namespace cloudasset_v1p4beta1 {
/**
* cloudasset.exportIamPolicyAnalysis
* @desc Exports IAM policy analysis based on the specified request. This API implements the google.longrunning.Operation API allowing you to keep track of the export. The metadata contains the request to help callers to map responses to requests.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudasset = google.cloudasset('v1p4beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudasset.exportIamPolicyAnalysis({
+ * // Required. The relative name of the root asset. Only resources and IAM policies within
+ * // the parent will be analyzed. This can only be an organization number (such
+ * // as "organizations/123") or a folder number (such as "folders/123").
+ * parent: '[^/]+/[^/]+',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "analysisQuery": {},
+ * // "options": {},
+ * // "outputConfig": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudasset.exportIamPolicyAnalysis
* @memberOf! ()
*
diff --git a/src/apis/cloudbilling/v1.ts b/src/apis/cloudbilling/v1.ts
index 2549f6a02da..4c3923990d3 100644
--- a/src/apis/cloudbilling/v1.ts
+++ b/src/apis/cloudbilling/v1.ts
@@ -514,52 +514,56 @@ export namespace cloudbilling_v1 {
* cloudbilling.billingAccounts.create
* @desc Creates a billing account. This method can only be used to create [billing subaccounts](https://cloud.google.com/billing/docs/concepts) by GCP resellers. When creating a subaccount, the current authenticated user must have the `billing.accounts.update` IAM permission on the master account, which is typically given to billing account [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). This method will return an error if the master account has not been provisioned as a reseller account.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Billing API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudbilling
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbilling.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudbilling = google.cloudbilling('v1');
+ * const cloudbilling = google.cloudbilling('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
- *
- * cloudbilling.billingAccounts.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
- * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbilling.billingAccounts.create({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "displayName": "my_displayName",
+ * // "masterBillingAccount": "my_masterBillingAccount",
+ * // "name": "my_name",
+ * // "open": false
+ * // }
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "masterBillingAccount": "my_masterBillingAccount",
+ * // "name": "my_name",
+ * // "open": false
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbilling.billingAccounts.create
* @memberOf! ()
*
@@ -635,52 +639,49 @@ export namespace cloudbilling_v1 {
* cloudbilling.billingAccounts.get
* @desc Gets information about a billing account. The current authenticated user must be a [viewer of the billing account](https://cloud.google.com/billing/docs/how-to/billing-access).
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Billing API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudbilling
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbilling.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudbilling = google.cloudbilling('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The resource name of the billing account to retrieve. For example,
- * // `billingAccounts/012345-567890-ABCDEF`.
- * name: 'billingAccounts/my-billing-account', // TODO: Update placeholder value.
+ * const cloudbilling = google.cloudbilling('v1');
*
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudbilling.billingAccounts.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudbilling.billingAccounts.get({
+ * // Required. The resource name of the billing account to retrieve. For example,
+ * // `billingAccounts/012345-567890-ABCDEF`.
+ * name: 'billingAccounts/my-billingAccount',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "masterBillingAccount": "my_masterBillingAccount",
+ * // "name": "my_name",
+ * // "open": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudbilling.billingAccounts.get
* @memberOf! ()
*
@@ -753,52 +754,62 @@ export namespace cloudbilling_v1 {
* cloudbilling.billingAccounts.getIamPolicy
* @desc Gets the access control policy for a billing account. The caller must have the `billing.accounts.getIamPolicy` permission on the account, which is often given to billing account [viewers](https://cloud.google.com/billing/docs/how-to/billing-access).
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Billing API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudbilling
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbilling.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudbilling = google.cloudbilling('v1');
+ * const cloudbilling = google.cloudbilling('v1');
*
- * authorize(function(authClient) {
- * var request = {
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbilling.billingAccounts.getIamPolicy({
+ * // Optional. The policy format version to be returned.
+ * //
+ * // Valid values are 0, 1, and 3. Requests specifying an invalid value will be
+ * // rejected.
+ * //
+ * // Requests for policies with any conditional bindings must specify version 3.
+ * // Policies without any conditional bindings may specify any valid value or
+ * // leave the field unset.
+ * //
+ * // To learn which resources support conditions in their IAM policies, see the
+ * // [IAM
+ * // documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ * 'options.requestedPolicyVersion': 'placeholder-value',
* // REQUIRED: The resource for which the policy is being requested.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'billingAccounts/my-billing-account', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * cloudbilling.billingAccounts.getIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * resource: 'billingAccounts/my-billingAccount',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudbilling.billingAccounts.getIamPolicy
* @memberOf! ()
*
@@ -873,61 +884,58 @@ export namespace cloudbilling_v1 {
* cloudbilling.billingAccounts.list
* @desc Lists the billing accounts that the current authenticated user has permission to [view](https://cloud.google.com/billing/docs/how-to/billing-access).
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Billing API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudbilling
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbilling.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudbilling = google.cloudbilling('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var billingAccountsPage = response['billingAccounts'];
- * if (!billingAccountsPage) {
- * return;
- * }
- * for (var i = 0; i < billingAccountsPage.length; i++) {
- * // TODO: Change code below to process each resource in `billingAccountsPage`:
- * console.log(JSON.stringify(billingAccountsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudbilling.billingAccounts.list(request, handlePage);
- * }
- * };
- *
- * cloudbilling.billingAccounts.list(request, handlePage);
- * });
+ * const cloudbilling = google.cloudbilling('v1');
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbilling.billingAccounts.list({
+ * // Options for how to filter the returned billing accounts.
+ * // Currently this only supports filtering for
+ * // [subaccounts](https://cloud.google.com/billing/docs/concepts) under a
+ * // single provided reseller billing account.
+ * // (e.g. "master_billing_account=billingAccounts/012345-678901-ABCDEF").
+ * // Boolean algebra and other fields are not currently supported.
+ * filter: 'placeholder-value',
+ * // Requested page size. The maximum page size is 100; this is also the
+ * // default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results to return. This should be a
+ * // `next_page_token` value returned from a previous `ListBillingAccounts`
+ * // call. If unspecified, the first page of results is returned.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billingAccounts": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbilling.billingAccounts.list
* @memberOf! ()
*
@@ -1012,56 +1020,62 @@ export namespace cloudbilling_v1 {
* cloudbilling.billingAccounts.patch
* @desc Updates a billing account's fields. Currently the only field that can be edited is `display_name`. The current authenticated user must have the `billing.accounts.update` IAM permission, which is typically given to the [administrator](https://cloud.google.com/billing/docs/how-to/billing-access) of the billing account.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Billing API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudbilling
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbilling.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudbilling = google.cloudbilling('v1');
+ * const cloudbilling = google.cloudbilling('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The name of the billing account resource to be updated.
- * name: 'billingAccounts/my-billing-account', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbilling.billingAccounts.patch({
+ * // Required. The name of the billing account resource to be updated.
+ * name: 'billingAccounts/my-billingAccount',
+ * // The update mask applied to the resource.
+ * // Only "display_name" is currently supported.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "displayName": "my_displayName",
+ * // "masterBillingAccount": "my_masterBillingAccount",
+ * // "name": "my_name",
+ * // "open": false
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudbilling.billingAccounts.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "masterBillingAccount": "my_masterBillingAccount",
+ * // "name": "my_name",
+ * // "open": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudbilling.billingAccounts.patch
* @memberOf! ()
*
@@ -1136,56 +1150,58 @@ export namespace cloudbilling_v1 {
* cloudbilling.billingAccounts.setIamPolicy
* @desc Sets the access control policy for a billing account. Replaces any existing policy. The caller must have the `billing.accounts.setIamPolicy` permission on the account, which is often given to billing account [administrators](https://cloud.google.com/billing/docs/how-to/billing-access).
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Billing API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudbilling
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbilling.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudbilling = google.cloudbilling('v1');
+ * const cloudbilling = google.cloudbilling('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudbilling.billingAccounts.setIamPolicy({
* // REQUIRED: The resource for which the policy is being specified.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'billingAccounts/my-billing-account', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'billingAccounts/my-billingAccount',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {},
+ * // "updateMask": "my_updateMask"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudbilling.billingAccounts.setIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudbilling.billingAccounts.setIamPolicy
* @memberOf! ()
*
@@ -1260,56 +1276,54 @@ export namespace cloudbilling_v1 {
* cloudbilling.billingAccounts.testIamPermissions
* @desc Tests the access control policy for a billing account. This method takes the resource and a set of permissions as input and returns the subset of the input permissions that the caller is allowed for that resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Billing API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudbilling
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbilling.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudbilling = google.cloudbilling('v1');
+ * const cloudbilling = google.cloudbilling('v1');
*
- * authorize(function(authClient) {
- * var request = {
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbilling.billingAccounts.testIamPermissions({
* // REQUIRED: The resource for which the policy detail is being requested.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'billingAccounts/my-billing-account', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'billingAccounts/my-billingAccount',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * cloudbilling.billingAccounts.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudbilling.billingAccounts.testIamPermissions
* @memberOf! ()
*
@@ -1516,65 +1530,54 @@ export namespace cloudbilling_v1 {
* cloudbilling.billingAccounts.projects.list
* @desc Lists the projects associated with a billing account. The current authenticated user must have the `billing.resourceAssociations.list` IAM permission, which is often given to billing account [viewers](https://cloud.google.com/billing/docs/how-to/billing-access).
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Billing API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudbilling
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbilling.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudbilling = google.cloudbilling('v1');
+ * const cloudbilling = google.cloudbilling('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The resource name of the billing account associated with the projects that
- * // you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
- * name: 'billingAccounts/my-billing-account', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var projectBillingInfoPage = response['projectBillingInfo'];
- * if (!projectBillingInfoPage) {
- * return;
- * }
- * for (var i = 0; i < projectBillingInfoPage.length; i++) {
- * // TODO: Change code below to process each resource in `projectBillingInfoPage`:
- * console.log(JSON.stringify(projectBillingInfoPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudbilling.billingAccounts.projects.list(request, handlePage);
- * }
- * };
- *
- * cloudbilling.billingAccounts.projects.list(request, handlePage);
- * });
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Do the magic
+ * const res = await cloudbilling.billingAccounts.projects.list({
+ * // Required. The resource name of the billing account associated with the projects that
+ * // you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
+ * name: 'billingAccounts/my-billingAccount',
+ * // Requested page size. The maximum page size is 100; this is also the
+ * // default.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results to be returned. This should be a
+ * // `next_page_token` value returned from a previous `ListProjectBillingInfo`
+ * // call. If unspecified, the first page of results is returned.
+ * pageToken: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "projectBillingInfo": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbilling.billingAccounts.projects.list
* @memberOf! ()
*
@@ -1689,52 +1692,49 @@ export namespace cloudbilling_v1 {
* cloudbilling.projects.getBillingInfo
* @desc Gets the billing information for a project. The current authenticated user must have [permission to view the project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ).
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Billing API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudbilling
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbilling.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudbilling = google.cloudbilling('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The resource name of the project for which billing information is
- * // retrieved. For example, `projects/tokyo-rain-123`.
- * name: 'projects/my-project', // TODO: Update placeholder value.
+ * const cloudbilling = google.cloudbilling('v1');
*
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudbilling.projects.getBillingInfo(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudbilling.projects.getBillingInfo({
+ * // Required. The resource name of the project for which billing information is
+ * // retrieved. For example, `projects/tokyo-rain-123`.
+ * name: 'projects/my-project',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billingAccountName": "my_billingAccountName",
+ * // "billingEnabled": false,
+ * // "name": "my_name",
+ * // "projectId": "my_projectId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudbilling.projects.getBillingInfo
* @memberOf! ()
*
@@ -1812,57 +1812,60 @@ export namespace cloudbilling_v1 {
* cloudbilling.projects.updateBillingInfo
* @desc Sets or updates the billing account associated with a project. You specify the new billing account by setting the `billing_account_name` in the `ProjectBillingInfo` resource to the resource name of a billing account. Associating a project with an open billing account enables billing on the project and allows charges for resource usage. If the project already had a billing account, this method changes the billing account used for resource usage charges. *Note:* Incurred charges that have not yet been reported in the transaction history of the GCP Console might be billed to the new billing account, even if the charge occurred before the new billing account was assigned to the project. The current authenticated user must have ownership privileges for both the [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ) and the [billing account](https://cloud.google.com/billing/docs/how-to/billing-access). You can disable billing on the project by setting the `billing_account_name` field to empty. This action disassociates the current billing account from the project. Any billable activity of your in-use services will stop, and your application could stop functioning as expected. Any unbilled charges to date will be billed to the previously associated account. The current authenticated user must be either an owner of the project or an owner of the billing account for the project. Note that associating a project with a *closed* billing account will have much the same effect as disabling billing on the project: any paid resources used by the project will be shut down. Thus, unless you wish to disable billing, you should always call this method with the name of an *open* billing account.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Billing API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudbilling
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbilling.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudbilling = google.cloudbilling('v1');
+ * const cloudbilling = google.cloudbilling('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The resource name of the project associated with the billing information
- * // that you want to update. For example, `projects/tokyo-rain-123`.
- * name: 'projects/my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
- * },
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudbilling.projects.updateBillingInfo(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudbilling.projects.updateBillingInfo({
+ * // Required. The resource name of the project associated with the billing information
+ * // that you want to update. For example, `projects/tokyo-rain-123`.
+ * name: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "billingAccountName": "my_billingAccountName",
+ * // "billingEnabled": false,
+ * // "name": "my_name",
+ * // "projectId": "my_projectId"
+ * // }
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "billingAccountName": "my_billingAccountName",
+ * // "billingEnabled": false,
+ * // "name": "my_name",
+ * // "projectId": "my_projectId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudbilling.projects.updateBillingInfo
* @memberOf! ()
*
@@ -1980,61 +1983,50 @@ export namespace cloudbilling_v1 {
* cloudbilling.services.list
* @desc Lists all public cloud services.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Billing API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudbilling
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbilling.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudbilling = google.cloudbilling('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var servicesPage = response['services'];
- * if (!servicesPage) {
- * return;
- * }
- * for (var i = 0; i < servicesPage.length; i++) {
- * // TODO: Change code below to process each resource in `servicesPage`:
- * console.log(JSON.stringify(servicesPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudbilling.services.list(request, handlePage);
- * }
- * };
- *
- * cloudbilling.services.list(request, handlePage);
- * });
+ * const cloudbilling = google.cloudbilling('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbilling.services.list({
+ * // Requested page size. Defaults to 5000.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results to return. This should be a
+ * // `next_page_token` value returned from a previous `ListServices`
+ * // call. If unspecified, the first page of results is returned.
+ * pageToken: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "services": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbilling.services.list
* @memberOf! ()
*
@@ -2132,65 +2124,71 @@ export namespace cloudbilling_v1 {
* cloudbilling.services.skus.list
* @desc Lists all publicly available SKUs for a given cloud service.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Billing API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudbilling
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbilling.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudbilling = google.cloudbilling('v1');
+ * const cloudbilling = google.cloudbilling('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The name of the service.
- * // Example: "services/DA34-426B-A397"
- * parent: 'services/my-service', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var skusPage = response['skus'];
- * if (!skusPage) {
- * return;
- * }
- * for (var i = 0; i < skusPage.length; i++) {
- * // TODO: Change code below to process each resource in `skusPage`:
- * console.log(JSON.stringify(skusPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudbilling.services.skus.list(request, handlePage);
- * }
- * };
- *
- * cloudbilling.services.skus.list(request, handlePage);
- * });
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbilling.services.skus.list({
+ * // The ISO 4217 currency code for the pricing info in the response proto.
+ * // Will use the conversion rate as of start_time.
+ * // Optional. If not specified USD will be used.
+ * currencyCode: 'placeholder-value',
+ * // Optional exclusive end time of the time range for which the pricing
+ * // versions will be returned. Timestamps in the future are not allowed.
+ * // The time range has to be within a single calendar month in
+ * // America/Los_Angeles timezone. Time range as a whole is optional. If not
+ * // specified, the latest pricing will be returned (up to 12 hours old at
+ * // most).
+ * endTime: 'placeholder-value',
+ * // Requested page size. Defaults to 5000.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results to return. This should be a
+ * // `next_page_token` value returned from a previous `ListSkus`
+ * // call. If unspecified, the first page of results is returned.
+ * pageToken: 'placeholder-value',
+ * // Required. The name of the service.
+ * // Example: "services/DA34-426B-A397"
+ * parent: 'services/my-service',
+ * // Optional inclusive start time of the time range for which the pricing
+ * // versions will be returned. Timestamps in the future are not allowed.
+ * // The time range has to be within a single calendar month in
+ * // America/Los_Angeles timezone. Time range as a whole is optional. If not
+ * // specified, the latest pricing will be returned (up to 12 hours old at
+ * // most).
+ * startTime: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "skus": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbilling.services.skus.list
* @memberOf! ()
*
diff --git a/src/apis/cloudbuild/v1.ts b/src/apis/cloudbuild/v1.ts
index c85a11eaa9c..d4e5cd51055 100644
--- a/src/apis/cloudbuild/v1.ts
+++ b/src/apis/cloudbuild/v1.ts
@@ -784,6 +784,50 @@ export namespace cloudbuild_v1 {
/**
* cloudbuild.operations.cancel
* @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.operations.cancel({
+ * // The name of the operation resource to be cancelled.
+ * name: 'operations/.*',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.operations.cancel
* @memberOf! ()
*
@@ -854,6 +898,50 @@ export namespace cloudbuild_v1 {
/**
* cloudbuild.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.operations.get({
+ * // The name of the operation resource.
+ * name: 'operations/.*',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.operations.get
* @memberOf! ()
*
@@ -924,6 +1012,53 @@ export namespace cloudbuild_v1 {
/**
* cloudbuild.operations.list
* @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.operations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The name of the operation's parent resource.
+ * name: 'operations',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.operations.list
* @memberOf! ()
*
@@ -1069,6 +1204,76 @@ export namespace cloudbuild_v1 {
/**
* cloudbuild.projects.builds.cancel
* @desc Cancels a build in progress.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.builds.cancel({
+ * // Required. ID of the build.
+ * id: 'placeholder-value',
+ * // Required. ID of the project.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "artifacts": {},
+ * // "buildTriggerId": "my_buildTriggerId",
+ * // "createTime": "my_createTime",
+ * // "finishTime": "my_finishTime",
+ * // "id": "my_id",
+ * // "images": [],
+ * // "logUrl": "my_logUrl",
+ * // "logsBucket": "my_logsBucket",
+ * // "options": {},
+ * // "projectId": "my_projectId",
+ * // "queueTtl": "my_queueTtl",
+ * // "results": {},
+ * // "secrets": [],
+ * // "source": {},
+ * // "sourceProvenance": {},
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusDetail": "my_statusDetail",
+ * // "steps": [],
+ * // "substitutions": {},
+ * // "tags": [],
+ * // "timeout": "my_timeout",
+ * // "timing": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.builds.cancel
* @memberOf! ()
*
@@ -1142,6 +1347,80 @@ export namespace cloudbuild_v1 {
/**
* cloudbuild.projects.builds.create
* @desc Starts a build with the specified configuration. This method returns a long-running `Operation`, which includes the build ID. Pass the build ID to `GetBuild` to determine the build status (such as `SUCCESS` or `FAILURE`).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.builds.create({
+ * // Required. ID of the project.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "artifacts": {},
+ * // "buildTriggerId": "my_buildTriggerId",
+ * // "createTime": "my_createTime",
+ * // "finishTime": "my_finishTime",
+ * // "id": "my_id",
+ * // "images": [],
+ * // "logUrl": "my_logUrl",
+ * // "logsBucket": "my_logsBucket",
+ * // "options": {},
+ * // "projectId": "my_projectId",
+ * // "queueTtl": "my_queueTtl",
+ * // "results": {},
+ * // "secrets": [],
+ * // "source": {},
+ * // "sourceProvenance": {},
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusDetail": "my_statusDetail",
+ * // "steps": [],
+ * // "substitutions": {},
+ * // "tags": [],
+ * // "timeout": "my_timeout",
+ * // "timing": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.builds.create
* @memberOf! ()
*
@@ -1217,6 +1496,70 @@ export namespace cloudbuild_v1 {
/**
* cloudbuild.projects.builds.get
* @desc Returns information about a previously requested build. The `Build` that is returned includes its status (such as `SUCCESS`, `FAILURE`, or `WORKING`), and timing information.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.builds.get({
+ * // Required. ID of the build.
+ * id: 'placeholder-value',
+ * // Required. ID of the project.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "artifacts": {},
+ * // "buildTriggerId": "my_buildTriggerId",
+ * // "createTime": "my_createTime",
+ * // "finishTime": "my_finishTime",
+ * // "id": "my_id",
+ * // "images": [],
+ * // "logUrl": "my_logUrl",
+ * // "logsBucket": "my_logsBucket",
+ * // "options": {},
+ * // "projectId": "my_projectId",
+ * // "queueTtl": "my_queueTtl",
+ * // "results": {},
+ * // "secrets": [],
+ * // "source": {},
+ * // "sourceProvenance": {},
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusDetail": "my_statusDetail",
+ * // "steps": [],
+ * // "substitutions": {},
+ * // "tags": [],
+ * // "timeout": "my_timeout",
+ * // "timing": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.builds.get
* @memberOf! ()
*
@@ -1290,6 +1633,53 @@ export namespace cloudbuild_v1 {
/**
* cloudbuild.projects.builds.list
* @desc Lists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.builds.list({
+ * // The raw filter text to constrain the results.
+ * filter: 'placeholder-value',
+ * // Number of results to return in the list.
+ * pageSize: 'placeholder-value',
+ * // Token to provide to skip to a particular spot in the list.
+ * pageToken: 'placeholder-value',
+ * // Required. ID of the project.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "builds": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.builds.list
* @memberOf! ()
*
@@ -1367,6 +1757,58 @@ export namespace cloudbuild_v1 {
/**
* cloudbuild.projects.builds.retry
* @desc Creates a new build based on the specified build. This method creates a new build using the original build request, which may or may not result in an identical build. For triggered builds: * Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision. For non-triggered builds that specify `RepoSource`: * If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build. * If the original build specified a commit sha or revision ID, the retried build will use the identical source. For builds that specify `StorageSource`: * If the original build pulled source from Google Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source. * If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.builds.retry({
+ * // Required. Build ID of the original build.
+ * id: 'placeholder-value',
+ * // Required. ID of the project.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.builds.retry
* @memberOf! ()
*
@@ -1549,6 +1991,78 @@ export namespace cloudbuild_v1 {
/**
* cloudbuild.projects.triggers.create
* @desc Creates a new `BuildTrigger`. This API is experimental.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.triggers.create({
+ * // Required. ID of the project for which to configure automatic builds.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "build": {},
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "disabled": false,
+ * // "filename": "my_filename",
+ * // "github": {},
+ * // "id": "my_id",
+ * // "ignoredFiles": [],
+ * // "includedFiles": [],
+ * // "name": "my_name",
+ * // "substitutions": {},
+ * // "tags": [],
+ * // "triggerTemplate": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "build": {},
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "disabled": false,
+ * // "filename": "my_filename",
+ * // "github": {},
+ * // "id": "my_id",
+ * // "ignoredFiles": [],
+ * // "includedFiles": [],
+ * // "name": "my_name",
+ * // "substitutions": {},
+ * // "tags": [],
+ * // "triggerTemplate": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.triggers.create
* @memberOf! ()
*
@@ -1624,6 +2138,46 @@ export namespace cloudbuild_v1 {
/**
* cloudbuild.projects.triggers.delete
* @desc Deletes a `BuildTrigger` by its project ID and trigger ID. This API is experimental.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.triggers.delete({
+ * // Required. ID of the project that owns the trigger.
+ * projectId: 'placeholder-value',
+ * // Required. ID of the `BuildTrigger` to delete.
+ * triggerId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.triggers.delete
* @memberOf! ()
*
@@ -1696,6 +2250,60 @@ export namespace cloudbuild_v1 {
/**
* cloudbuild.projects.triggers.get
* @desc Returns information about a `BuildTrigger`. This API is experimental.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.triggers.get({
+ * // Required. ID of the project that owns the trigger.
+ * projectId: 'placeholder-value',
+ * // Required. Identifier (`id` or `name`) of the `BuildTrigger` to get.
+ * triggerId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "build": {},
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "disabled": false,
+ * // "filename": "my_filename",
+ * // "github": {},
+ * // "id": "my_id",
+ * // "ignoredFiles": [],
+ * // "includedFiles": [],
+ * // "name": "my_name",
+ * // "substitutions": {},
+ * // "tags": [],
+ * // "triggerTemplate": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.triggers.get
* @memberOf! ()
*
@@ -1770,6 +2378,51 @@ export namespace cloudbuild_v1 {
/**
* cloudbuild.projects.triggers.list
* @desc Lists existing `BuildTrigger`s. This API is experimental.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.triggers.list({
+ * // Number of results to return in the list.
+ * pageSize: 'placeholder-value',
+ * // Token to provide to skip to a particular spot in the list.
+ * pageToken: 'placeholder-value',
+ * // Required. ID of the project for which to list BuildTriggers.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "triggers": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.triggers.list
* @memberOf! ()
*
@@ -1853,6 +2506,80 @@ export namespace cloudbuild_v1 {
/**
* cloudbuild.projects.triggers.patch
* @desc Updates a `BuildTrigger` by its project ID and trigger ID. This API is experimental.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.triggers.patch({
+ * // Required. ID of the project that owns the trigger.
+ * projectId: 'placeholder-value',
+ * // Required. ID of the `BuildTrigger` to update.
+ * triggerId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "build": {},
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "disabled": false,
+ * // "filename": "my_filename",
+ * // "github": {},
+ * // "id": "my_id",
+ * // "ignoredFiles": [],
+ * // "includedFiles": [],
+ * // "name": "my_name",
+ * // "substitutions": {},
+ * // "tags": [],
+ * // "triggerTemplate": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "build": {},
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "disabled": false,
+ * // "filename": "my_filename",
+ * // "github": {},
+ * // "id": "my_id",
+ * // "ignoredFiles": [],
+ * // "includedFiles": [],
+ * // "name": "my_name",
+ * // "substitutions": {},
+ * // "tags": [],
+ * // "triggerTemplate": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.triggers.patch
* @memberOf! ()
*
@@ -1928,6 +2655,67 @@ export namespace cloudbuild_v1 {
/**
* cloudbuild.projects.triggers.run
* @desc Runs a `BuildTrigger` at a particular source revision.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.triggers.run({
+ * // Required. ID of the project.
+ * projectId: 'placeholder-value',
+ * // Required. ID of the trigger.
+ * triggerId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "branchName": "my_branchName",
+ * // "commitSha": "my_commitSha",
+ * // "dir": "my_dir",
+ * // "invertRegex": false,
+ * // "projectId": "my_projectId",
+ * // "repoName": "my_repoName",
+ * // "substitutions": {},
+ * // "tagName": "my_tagName"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.triggers.run
* @memberOf! ()
*
diff --git a/src/apis/cloudbuild/v1alpha1.ts b/src/apis/cloudbuild/v1alpha1.ts
index 307c1cb3d9b..4d6e987001f 100644
--- a/src/apis/cloudbuild/v1alpha1.ts
+++ b/src/apis/cloudbuild/v1alpha1.ts
@@ -674,6 +674,72 @@ export namespace cloudbuild_v1alpha1 {
/**
* cloudbuild.projects.workerPools.create
* @desc Creates a `WorkerPool` to run the builds, and returns the new worker pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.workerPools.create({
+ * // ID of the parent project.
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "deleteTime": "my_deleteTime",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "regions": [],
+ * // "serviceAccountEmail": "my_serviceAccountEmail",
+ * // "status": "my_status",
+ * // "updateTime": "my_updateTime",
+ * // "workerConfig": {},
+ * // "workerCount": "my_workerCount"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "deleteTime": "my_deleteTime",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "regions": [],
+ * // "serviceAccountEmail": "my_serviceAccountEmail",
+ * // "status": "my_status",
+ * // "updateTime": "my_updateTime",
+ * // "workerConfig": {},
+ * // "workerCount": "my_workerCount"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.workerPools.create
* @memberOf! ()
*
@@ -749,6 +815,45 @@ export namespace cloudbuild_v1alpha1 {
/**
* cloudbuild.projects.workerPools.delete
* @desc Deletes a `WorkerPool` by its project ID and WorkerPool name.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.workerPools.delete({
+ * // The field will contain name of the resource requested, for example:
+ * // "projects/project-1/workerPools/workerpool-name"
+ * name: 'projects/my-project/workerPools/my-workerPool',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.workerPools.delete
* @memberOf! ()
*
@@ -818,6 +923,56 @@ export namespace cloudbuild_v1alpha1 {
/**
* cloudbuild.projects.workerPools.get
* @desc Returns information about a `WorkerPool`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.workerPools.get({
+ * // The field will contain name of the resource requested, for example:
+ * // "projects/project-1/workerPools/workerpool-name"
+ * name: 'projects/my-project/workerPools/my-workerPool',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "deleteTime": "my_deleteTime",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "regions": [],
+ * // "serviceAccountEmail": "my_serviceAccountEmail",
+ * // "status": "my_status",
+ * // "updateTime": "my_updateTime",
+ * // "workerConfig": {},
+ * // "workerCount": "my_workerCount"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.workerPools.get
* @memberOf! ()
*
@@ -889,6 +1044,46 @@ export namespace cloudbuild_v1alpha1 {
/**
* cloudbuild.projects.workerPools.list
* @desc List project's `WorkerPool`s.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.workerPools.list({
+ * // ID of the parent project.
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "workerPools": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.workerPools.list
* @memberOf! ()
*
@@ -965,6 +1160,73 @@ export namespace cloudbuild_v1alpha1 {
/**
* cloudbuild.projects.workerPools.patch
* @desc Update a `WorkerPool`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.workerPools.patch({
+ * // The field will contain name of the resource requested, for example:
+ * // "projects/project-1/workerPools/workerpool-name"
+ * name: 'projects/my-project/workerPools/my-workerPool',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "deleteTime": "my_deleteTime",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "regions": [],
+ * // "serviceAccountEmail": "my_serviceAccountEmail",
+ * // "status": "my_status",
+ * // "updateTime": "my_updateTime",
+ * // "workerConfig": {},
+ * // "workerCount": "my_workerCount"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "deleteTime": "my_deleteTime",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "regions": [],
+ * // "serviceAccountEmail": "my_serviceAccountEmail",
+ * // "status": "my_status",
+ * // "updateTime": "my_updateTime",
+ * // "workerConfig": {},
+ * // "workerCount": "my_workerCount"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.workerPools.patch
* @memberOf! ()
*
diff --git a/src/apis/cloudbuild/v1alpha2.ts b/src/apis/cloudbuild/v1alpha2.ts
index 5276a1fb1fa..567104d445a 100644
--- a/src/apis/cloudbuild/v1alpha2.ts
+++ b/src/apis/cloudbuild/v1alpha2.ts
@@ -650,6 +650,75 @@ export namespace cloudbuild_v1alpha2 {
/**
* cloudbuild.projects.workerPools.create
* @desc Creates a `WorkerPool` to run the builds, and returns the new worker pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.workerPools.create({
+ * // Required. The parent resource where this book will be created.
+ * // Format: projects/{project}
+ * parent: 'projects/my-project',
+ * // Required. Immutable. The ID to use for the `WorkerPool`, which will become the final component
+ * // of the resource name.
+ * //
+ * // This value should be 1-63 characters, and valid characters
+ * // are /a-z-/.
+ * workerPoolId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "deleteTime": "my_deleteTime",
+ * // "name": "my_name",
+ * // "networkConfig": {},
+ * // "region": "my_region",
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "workerConfig": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "deleteTime": "my_deleteTime",
+ * // "name": "my_name",
+ * // "networkConfig": {},
+ * // "region": "my_region",
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "workerConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.workerPools.create
* @memberOf! ()
*
@@ -726,6 +795,45 @@ export namespace cloudbuild_v1alpha2 {
/**
* cloudbuild.projects.workerPools.delete
* @desc Deletes a `WorkerPool`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.workerPools.delete({
+ * // Required. The name of the `WorkerPool` to delete.
+ * // Format: projects/{project}/workerPools/{workerPool}
+ * name: 'projects/my-project/workerPools/my-workerPool',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.workerPools.delete
* @memberOf! ()
*
@@ -795,6 +903,54 @@ export namespace cloudbuild_v1alpha2 {
/**
* cloudbuild.projects.workerPools.get
* @desc Returns details of a `WorkerPool`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.workerPools.get({
+ * // Required. The name of the `WorkerPool` to retrieve.
+ * // Format: projects/{project}/workerPools/{workerPool}
+ * name: 'projects/my-project/workerPools/my-workerPool',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "deleteTime": "my_deleteTime",
+ * // "name": "my_name",
+ * // "networkConfig": {},
+ * // "region": "my_region",
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "workerConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.workerPools.get
* @memberOf! ()
*
@@ -866,6 +1022,47 @@ export namespace cloudbuild_v1alpha2 {
/**
* cloudbuild.projects.workerPools.list
* @desc Lists `WorkerPool`s by project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.workerPools.list({
+ * // Required. The parent, which owns this collection of `WorkerPools`.
+ * // Format: projects/{project}
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "workerPools": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.workerPools.list
* @memberOf! ()
*
@@ -942,6 +1139,73 @@ export namespace cloudbuild_v1alpha2 {
/**
* cloudbuild.projects.workerPools.patch
* @desc Updates a `WorkerPool`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudbuild = google.cloudbuild('v1alpha2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudbuild.projects.workerPools.patch({
+ * // Output only. The resource name of the `WorkerPool`.
+ * // Format of the name is `projects/{project_id}/workerPools/{worker_pool_id}`,
+ * // where the value of {worker_pool_id} is provided in the CreateWorkerPool
+ * // request.
+ * name: 'projects/my-project/workerPools/my-workerPool',
+ * // A mask specifying which fields in `WorkerPool` should be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "deleteTime": "my_deleteTime",
+ * // "name": "my_name",
+ * // "networkConfig": {},
+ * // "region": "my_region",
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "workerConfig": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "deleteTime": "my_deleteTime",
+ * // "name": "my_name",
+ * // "networkConfig": {},
+ * // "region": "my_region",
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "workerConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudbuild.projects.workerPools.patch
* @memberOf! ()
*
diff --git a/src/apis/clouddebugger/v2.ts b/src/apis/clouddebugger/v2.ts
index ea98fc22af1..540f910ecaf 100644
--- a/src/apis/clouddebugger/v2.ts
+++ b/src/apis/clouddebugger/v2.ts
@@ -620,52 +620,54 @@ export namespace clouddebugger_v2 {
* clouddebugger.controller.debuggees.register
* @desc Registers the debuggee with the controller service. All agents attached to the same application must call this method with exactly the same request content to get back the same stable `debuggee_id`. Agents should call this method again whenever `google.rpc.Code.NOT_FOUND` is returned from any controller method. This protocol allows the controller service to disable debuggees, recover from data loss, or change the `debuggee_id` format. Agents must handle `debuggee_id` value changing upon re-registration.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Stackdriver Debugger API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/clouddebugger
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/clouddebugger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudDebugger = google.clouddebugger('v2');
+ * const clouddebugger = google.clouddebugger('v2');
*
- * authorize(function(authClient) {
- * var request = {
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud_debugger',
+ * ],
+ * });
*
- * cloudDebugger.controller.debuggees.register(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await clouddebugger.controller.debuggees.register({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "debuggee": {}
+ * // }
+ * },
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {
+ * // "agentId": "my_agentId",
+ * // "debuggee": {}
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias clouddebugger.controller.debuggees.register
* @memberOf! ()
*
@@ -766,51 +768,65 @@ export namespace clouddebugger_v2 {
* clouddebugger.controller.debuggees.breakpoints.list
* @desc Returns the list of all active breakpoints for the debuggee. The breakpoint specification (`location`, `condition`, and `expressions` fields) is semantically immutable, although the field values may change. For example, an agent may update the location line number to reflect the actual line where the breakpoint was set, but this doesn't change the breakpoint semantics. This means that an agent does not need to check if a breakpoint has changed when it encounters the same breakpoint on a successive call. Moreover, an agent should remember the breakpoints that are completed until the controller removes them from the active list to avoid setting those breakpoints again.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Stackdriver Debugger API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/clouddebugger
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/clouddebugger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudDebugger = google.clouddebugger('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Identifies the debuggee.
- * debuggeeId: 'my-debuggee-id', // TODO: Update placeholder value.
+ * const clouddebugger = google.clouddebugger('v2');
*
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud_debugger',
+ * ],
+ * });
*
- * cloudDebugger.controller.debuggees.breakpoints.list(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await clouddebugger.controller.debuggees.breakpoints.list({
+ * // Identifies the agent.
+ * // This is the ID returned in the RegisterDebuggee response.
+ * agentId: 'placeholder-value',
+ * // Required. Identifies the debuggee.
+ * debuggeeId: 'placeholder-value',
+ * // If set to `true` (recommended), returns `google.rpc.Code.OK` status and
+ * // sets the `wait_expired` response field to `true` when the server-selected
+ * // timeout has expired.
+ * //
+ * // If set to `false` (deprecated), returns `google.rpc.Code.ABORTED` status
+ * // when the server-selected timeout has expired.
+ * successOnTimeout: 'placeholder-value',
+ * // A token that, if specified, blocks the method call until the list
+ * // of active breakpoints has changed, or a server-selected timeout has
+ * // expired. The value should be set from the `next_wait_token` field in
+ * // the last response. The initial value should be set to `"init"`.
+ * waitToken: 'placeholder-value',
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {
+ * // "breakpoints": [],
+ * // "nextWaitToken": "my_nextWaitToken",
+ * // "waitExpired": false
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias clouddebugger.controller.debuggees.breakpoints.list
* @memberOf! ()
*
@@ -898,59 +914,56 @@ export namespace clouddebugger_v2 {
* clouddebugger.controller.debuggees.breakpoints.update
* @desc Updates the breakpoint state or mutable fields. The entire Breakpoint message must be sent back to the controller service. Updates to active breakpoint fields are only allowed if the new value does not change the breakpoint specification. Updates to the `location`, `condition` and `expressions` fields should not alter the breakpoint semantics. These may only make changes such as canonicalizing a value or snapping the location to the correct line of code.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Stackdriver Debugger API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/clouddebugger
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/clouddebugger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudDebugger = google.clouddebugger('v2');
+ * const clouddebugger = google.clouddebugger('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud_debugger',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Identifies the debuggee being debugged.
- * debuggeeId: 'my-debuggee-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await clouddebugger.controller.debuggees.breakpoints.update({
+ * // Required. Identifies the debuggee being debugged.
+ * debuggeeId: 'placeholder-value',
* // Breakpoint identifier, unique in the scope of the debuggee.
- * id: 'my-id', // TODO: Update placeholder value.
+ * id: 'placeholder-value',
*
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "breakpoint": {}
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * cloudDebugger.controller.debuggees.breakpoints.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {}
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias clouddebugger.controller.debuggees.breakpoints.update
* @memberOf! ()
*
@@ -1103,48 +1116,54 @@ export namespace clouddebugger_v2 {
* clouddebugger.debugger.debuggees.list
* @desc Lists all the debuggees that the user has access to.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Stackdriver Debugger API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/clouddebugger
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/clouddebugger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudDebugger = google.clouddebugger('v2');
+ * const clouddebugger = google.clouddebugger('v2');
*
- * authorize(function(authClient) {
- * var request = {
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud_debugger',
+ * ],
+ * });
*
- * cloudDebugger.debugger.debuggees.list(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await clouddebugger.debugger.debuggees.list({
+ * // Required. The client version making the call.
+ * // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
+ * clientVersion: 'placeholder-value',
+ * // When set to `true`, the result includes all debuggees. Otherwise, the
+ * // result includes only debuggees that are active.
+ * includeInactive: 'placeholder-value',
+ * // Required. Project number of a Google Cloud project whose debuggees to list.
+ * project: 'placeholder-value',
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {
+ * // "debuggees": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias clouddebugger.debugger.debuggees.list
* @memberOf! ()
*
@@ -1253,51 +1272,51 @@ export namespace clouddebugger_v2 {
* clouddebugger.debugger.debuggees.breakpoints.delete
* @desc Deletes the breakpoint from the debuggee.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Stackdriver Debugger API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/clouddebugger
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/clouddebugger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudDebugger = google.clouddebugger('v2');
+ * const clouddebugger = google.clouddebugger('v2');
*
- * authorize(function(authClient) {
- * var request = {
- * // ID of the debuggee whose breakpoint to delete.
- * debuggeeId: 'my-debuggee-id', // TODO: Update placeholder value.
- *
- * // ID of the breakpoint to delete.
- * breakpointId: 'my-breakpoint-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud_debugger',
+ * ],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudDebugger.debugger.debuggees.breakpoints.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await clouddebugger.debugger.debuggees.breakpoints.delete({
+ * // Required. ID of the breakpoint to delete.
+ * breakpointId: 'placeholder-value',
+ * // Required. The client version making the call.
+ * // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
+ * clientVersion: 'placeholder-value',
+ * // Required. ID of the debuggee whose breakpoint to delete.
+ * debuggeeId: 'placeholder-value',
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {}
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias clouddebugger.debugger.debuggees.breakpoints.delete
* @memberOf! ()
*
@@ -1374,54 +1393,53 @@ export namespace clouddebugger_v2 {
* clouddebugger.debugger.debuggees.breakpoints.get
* @desc Gets breakpoint information.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Stackdriver Debugger API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/clouddebugger
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/clouddebugger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudDebugger = google.clouddebugger('v2');
+ * const clouddebugger = google.clouddebugger('v2');
*
- * authorize(function(authClient) {
- * var request = {
- * // ID of the debuggee whose breakpoint to get.
- * debuggeeId: 'my-debuggee-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud_debugger',
+ * ],
+ * });
*
- * // ID of the breakpoint to get.
- * breakpointId: 'my-breakpoint-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * auth: authClient,
- * };
+ * // Do the magic
+ * const res = await clouddebugger.debugger.debuggees.breakpoints.get({
+ * // Required. ID of the breakpoint to get.
+ * breakpointId: 'placeholder-value',
+ * // Required. The client version making the call.
+ * // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
+ * clientVersion: 'placeholder-value',
+ * // Required. ID of the debuggee whose breakpoint to get.
+ * debuggeeId: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * cloudDebugger.debugger.debuggees.breakpoints.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "breakpoint": {}
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias clouddebugger.debugger.debuggees.breakpoints.get
* @memberOf! ()
*
@@ -1502,51 +1520,69 @@ export namespace clouddebugger_v2 {
* clouddebugger.debugger.debuggees.breakpoints.list
* @desc Lists all breakpoints for the debuggee.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Stackdriver Debugger API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/clouddebugger
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/clouddebugger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudDebugger = google.clouddebugger('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // ID of the debuggee whose breakpoints to list.
- * debuggeeId: 'my-debuggee-id', // TODO: Update placeholder value.
+ * const clouddebugger = google.clouddebugger('v2');
*
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud_debugger',
+ * ],
+ * });
*
- * cloudDebugger.debugger.debuggees.breakpoints.list(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await clouddebugger.debugger.debuggees.breakpoints.list({
+ * // Only breakpoints with the specified action will pass the filter.
+ * 'action.value': 'placeholder-value',
+ * // Required. The client version making the call.
+ * // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
+ * clientVersion: 'placeholder-value',
+ * // Required. ID of the debuggee whose breakpoints to list.
+ * debuggeeId: 'placeholder-value',
+ * // When set to `true`, the response includes the list of breakpoints set by
+ * // any user. Otherwise, it includes only breakpoints set by the caller.
+ * includeAllUsers: 'placeholder-value',
+ * // When set to `true`, the response includes active and inactive
+ * // breakpoints. Otherwise, it includes only active breakpoints.
+ * includeInactive: 'placeholder-value',
+ * // This field is deprecated. The following fields are always stripped out of
+ * // the result: `stack_frames`, `evaluated_expressions` and `variable_table`.
+ * stripResults: 'placeholder-value',
+ * // A wait token that, if specified, blocks the call until the breakpoints
+ * // list has changed, or a server selected timeout has expired. The value
+ * // should be set from the last response. The error code
+ * // `google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which
+ * // should be called again with the same `wait_token`.
+ * waitToken: 'placeholder-value',
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {
+ * // "breakpoints": [],
+ * // "nextWaitToken": "my_nextWaitToken"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias clouddebugger.debugger.debuggees.breakpoints.list
* @memberOf! ()
*
@@ -1630,55 +1666,78 @@ export namespace clouddebugger_v2 {
* clouddebugger.debugger.debuggees.breakpoints.set
* @desc Sets the breakpoint to the debuggee.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Stackdriver Debugger API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/clouddebugger
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/clouddebugger.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudDebugger = google.clouddebugger('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // ID of the debuggee where the breakpoint is to be set.
- * debuggeeId: 'my-debuggee-id', // TODO: Update placeholder value.
+ * const clouddebugger = google.clouddebugger('v2');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud_debugger',
+ * ],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudDebugger.debugger.debuggees.breakpoints.set(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await clouddebugger.debugger.debuggees.breakpoints.set({
+ * // The canary option set by the user upon setting breakpoint.
+ * canaryOption: 'placeholder-value',
+ * // Required. The client version making the call.
+ * // Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
+ * clientVersion: 'placeholder-value',
+ * // Required. ID of the debuggee where the breakpoint is to be set.
+ * debuggeeId: 'placeholder-value',
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "canaryExpireTime": "my_canaryExpireTime",
+ * // "condition": "my_condition",
+ * // "createTime": "my_createTime",
+ * // "evaluatedExpressions": [],
+ * // "expressions": [],
+ * // "finalTime": "my_finalTime",
+ * // "id": "my_id",
+ * // "isFinalState": false,
+ * // "labels": {},
+ * // "location": {},
+ * // "logLevel": "my_logLevel",
+ * // "logMessageFormat": "my_logMessageFormat",
+ * // "stackFrames": [],
+ * // "state": "my_state",
+ * // "status": {},
+ * // "userEmail": "my_userEmail",
+ * // "variableTable": []
+ * // }
+ * },
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {
+ * // "breakpoint": {}
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias clouddebugger.debugger.debuggees.breakpoints.set
* @memberOf! ()
*
diff --git a/src/apis/clouderrorreporting/v1beta1.ts b/src/apis/clouderrorreporting/v1beta1.ts
index 28972f0d3b7..75ff130b9b5 100644
--- a/src/apis/clouderrorreporting/v1beta1.ts
+++ b/src/apis/clouderrorreporting/v1beta1.ts
@@ -394,6 +394,49 @@ export namespace clouderrorreporting_v1beta1 {
/**
* clouderrorreporting.projects.deleteEvents
* @desc Deletes all error events of a given project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/clouderrorreporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const clouderrorreporting = google.clouderrorreporting('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await clouderrorreporting.projects.deleteEvents({
+ * // Required. The resource name of the Google Cloud Platform project. Written
+ * // as `projects/{projectID}`, where `{projectID}` is the
+ * // [Google Cloud Platform project
+ * // ID](https://support.google.com/cloud/answer/6158840).
+ * //
+ * // Example: `projects/my-project-123`.
+ * projectName: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias clouderrorreporting.projects.deleteEvents
* @memberOf! ()
*
@@ -493,6 +536,70 @@ export namespace clouderrorreporting_v1beta1 {
/**
* clouderrorreporting.projects.events.list
* @desc Lists the specified events.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/clouderrorreporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const clouderrorreporting = google.clouderrorreporting('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await clouderrorreporting.projects.events.list({
+ * // Required. The group for which events shall be returned.
+ * groupId: 'placeholder-value',
+ * // Optional. The maximum number of results to return per response.
+ * pageSize: 'placeholder-value',
+ * // Optional. A `next_page_token` provided by a previous response.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name of the Google Cloud Platform project. Written
+ * // as `projects/{projectID}`, where `{projectID}` is the
+ * // [Google Cloud Platform project
+ * // ID](https://support.google.com/cloud/answer/6158840).
+ * //
+ * // Example: `projects/my-project-123`.
+ * projectName: 'projects/my-project',
+ * // Optional. The exact value to match against
+ * // [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).
+ * 'serviceFilter.resourceType': 'placeholder-value',
+ * // Optional. The exact value to match against
+ * // [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).
+ * 'serviceFilter.service': 'placeholder-value',
+ * // Optional. The exact value to match against
+ * // [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).
+ * 'serviceFilter.version': 'placeholder-value',
+ * // Restricts the query to the specified time range.
+ * 'timeRange.period': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "errorEvents": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "timeRangeBegin": "my_timeRangeBegin"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias clouderrorreporting.projects.events.list
* @memberOf! ()
*
@@ -575,6 +682,60 @@ export namespace clouderrorreporting_v1beta1 {
/**
* clouderrorreporting.projects.events.report
* @desc Report an individual error event. This endpoint accepts **either** an OAuth token, **or** an [API key](https://support.google.com/cloud/answer/6158862) for authentication. To use an API key, append it to the URL as the value of a `key` parameter. For example: `POST https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456`
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/clouderrorreporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const clouderrorreporting = google.clouderrorreporting('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await clouderrorreporting.projects.events.report({
+ * // Required. The resource name of the Google Cloud Platform project. Written
+ * // as `projects/{projectId}`, where `{projectId}` is the
+ * // [Google Cloud Platform project
+ * // ID](https://support.google.com/cloud/answer/6158840).
+ * //
+ * // Example: // `projects/my-project-123`.
+ * projectName: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "context": {},
+ * // "eventTime": "my_eventTime",
+ * // "message": "my_message",
+ * // "serviceContext": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias clouderrorreporting.projects.events.report
* @memberOf! ()
*
@@ -720,6 +881,55 @@ export namespace clouderrorreporting_v1beta1 {
/**
* clouderrorreporting.projects.groups.get
* @desc Get the specified group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/clouderrorreporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const clouderrorreporting = google.clouderrorreporting('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await clouderrorreporting.projects.groups.get({
+ * // Required. The group resource name. Written as
+ * // projects/projectID/groups/group_name
.
+ * // Call
+ * //
+ * // groupStats.list
to return a list of groups belonging to
+ * // this project.
+ * //
+ * // Example: projects/my-project-123/groups/my-group
+ * groupName: 'projects/my-project/groups/my-group',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "groupId": "my_groupId",
+ * // "name": "my_name",
+ * // "trackingIssues": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias clouderrorreporting.projects.groups.get
* @memberOf! ()
*
@@ -795,6 +1005,59 @@ export namespace clouderrorreporting_v1beta1 {
/**
* clouderrorreporting.projects.groups.update
* @desc Replace the data for the specified group. Fails if the group does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/clouderrorreporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const clouderrorreporting = google.clouderrorreporting('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await clouderrorreporting.projects.groups.update({
+ * // The group resource name.
+ * // Example: projects/my-project-123/groups/CNSgkpnppqKCUw
+ * name: 'projects/my-project/groups/my-group',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "groupId": "my_groupId",
+ * // "name": "my_name",
+ * // "trackingIssues": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "groupId": "my_groupId",
+ * // "name": "my_name",
+ * // "trackingIssues": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias clouderrorreporting.projects.groups.update
* @memberOf! ()
*
@@ -905,6 +1168,85 @@ export namespace clouderrorreporting_v1beta1 {
/**
* clouderrorreporting.projects.groupStats.list
* @desc Lists the specified groups.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/clouderrorreporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const clouderrorreporting = google.clouderrorreporting('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await clouderrorreporting.projects.groupStats.list({
+ * // Optional. The alignment of the timed counts to be returned.
+ * // Default is `ALIGNMENT_EQUAL_AT_END`.
+ * alignment: 'placeholder-value',
+ * // Optional. Time where the timed counts shall be aligned if rounded
+ * // alignment is chosen. Default is 00:00 UTC.
+ * alignmentTime: 'placeholder-value',
+ * // Optional. List all ErrorGroupStats
with these IDs.
+ * groupId: 'placeholder-value',
+ * // Optional. The sort order in which the results are returned.
+ * // Default is `COUNT_DESC`.
+ * order: 'placeholder-value',
+ * // Optional. The maximum number of results to return per response.
+ * // Default is 20.
+ * pageSize: 'placeholder-value',
+ * // Optional. A `next_page_token` provided by a previous response. To view
+ * // additional results, pass this token along with the identical query
+ * // parameters as the first request.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name of the Google Cloud Platform project. Written
+ * // as `projects/{projectID}`, where `{projectID}` is the
+ * // [Google Cloud Platform project
+ * // ID](https://support.google.com/cloud/answer/6158840).
+ * //
+ * // Example: `projects/my-project-123`.
+ * projectName: 'projects/my-project',
+ * // Optional. The exact value to match against
+ * // [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).
+ * 'serviceFilter.resourceType': 'placeholder-value',
+ * // Optional. The exact value to match against
+ * // [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).
+ * 'serviceFilter.service': 'placeholder-value',
+ * // Optional. The exact value to match against
+ * // [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).
+ * 'serviceFilter.version': 'placeholder-value',
+ * // Optional. The preferred duration for a single returned `TimedCount`.
+ * // If not set, no timed counts are returned.
+ * timedCountDuration: 'placeholder-value',
+ * // Restricts the query to the specified time range.
+ * 'timeRange.period': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "errorGroupStats": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "timeRangeBegin": "my_timeRangeBegin"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias clouderrorreporting.projects.groupStats.list
* @memberOf! ()
*
diff --git a/src/apis/cloudfunctions/v1.ts b/src/apis/cloudfunctions/v1.ts
index fd26fabe06f..7f768c5320e 100644
--- a/src/apis/cloudfunctions/v1.ts
+++ b/src/apis/cloudfunctions/v1.ts
@@ -607,6 +607,50 @@ export namespace cloudfunctions_v1 {
/**
* cloudfunctions.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.operations.get({
+ * // The name of the operation resource.
+ * name: 'operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.operations.get
* @memberOf! ()
*
@@ -678,6 +722,53 @@ export namespace cloudfunctions_v1 {
/**
* cloudfunctions.operations.list
* @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.operations.list({
+ * // Required. A filter for matching the requested operations.
The supported formats of filter are:
To query for a specific function: project:*,location:*,function:*
To query for all of the latest operations for a project: project:*,latest:true
+ * filter: 'placeholder-value',
+ * // Must not be set.
+ * name: 'placeholder-value',
+ * // The maximum number of records that should be returned.
Requested page size cannot exceed 100. If not set, the default page size is 100.
Pagination is only supported when querying for a specific function.
+ * pageSize: 'placeholder-value',
+ * // Token identifying which result to start with, which is returned by a previous list call.
Pagination is only supported when querying for a specific function.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.operations.list
* @memberOf! ()
*
@@ -807,6 +898,53 @@ export namespace cloudfunctions_v1 {
/**
* cloudfunctions.projects.locations.list
* @desc Lists information about the supported locations for this service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The resource that owns the locations collection, if applicable.
+ * name: 'projects/my-project',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "locations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.list
* @memberOf! ()
*
@@ -919,6 +1057,56 @@ export namespace cloudfunctions_v1 {
/**
* cloudfunctions.projects.locations.functions.call
* @desc Synchronously invokes a deployed Cloud Function. To be used for testing purposes as very limited traffic is allowed. For more information on the actual limits, refer to [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.call({
+ * // Required. The name of the function to be called.
+ * name: 'projects/my-project/locations/my-location/functions/my-function',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "data": "my_data"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "error": "my_error",
+ * // "executionId": "my_executionId",
+ * // "result": "my_result"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.call
* @memberOf! ()
*
@@ -994,6 +1182,80 @@ export namespace cloudfunctions_v1 {
/**
* cloudfunctions.projects.locations.functions.create
* @desc Creates a new function. If a function with the given name already exists in the specified project, the long running operation will return `ALREADY_EXISTS` error.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.create({
+ * // Required. The project and location in which the function should be created, specified
+ * // in the format `projects/x/locations/x`
+ * location: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "availableMemoryMb": 0,
+ * // "description": "my_description",
+ * // "entryPoint": "my_entryPoint",
+ * // "environmentVariables": {},
+ * // "eventTrigger": {},
+ * // "httpsTrigger": {},
+ * // "ingressSettings": "my_ingressSettings",
+ * // "labels": {},
+ * // "maxInstances": 0,
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "runtime": "my_runtime",
+ * // "serviceAccountEmail": "my_serviceAccountEmail",
+ * // "sourceArchiveUrl": "my_sourceArchiveUrl",
+ * // "sourceRepository": {},
+ * // "sourceUploadUrl": "my_sourceUploadUrl",
+ * // "status": "my_status",
+ * // "timeout": "my_timeout",
+ * // "updateTime": "my_updateTime",
+ * // "versionId": "my_versionId",
+ * // "vpcConnector": "my_vpcConnector",
+ * // "vpcConnectorEgressSettings": "my_vpcConnectorEgressSettings"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.create
* @memberOf! ()
*
@@ -1070,6 +1332,50 @@ export namespace cloudfunctions_v1 {
/**
* cloudfunctions.projects.locations.functions.delete
* @desc Deletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.delete({
+ * // Required. The name of the function which should be deleted.
+ * name: 'projects/my-project/locations/my-location/functions/my-function',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.delete
* @memberOf! ()
*
@@ -1142,6 +1448,57 @@ export namespace cloudfunctions_v1 {
/**
* cloudfunctions.projects.locations.functions.generateDownloadUrl
* @desc Returns a signed URL for downloading deployed function source code. The URL is only valid for a limited period and should be used within minutes after generation. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.generateDownloadUrl(
+ * {
+ * // The name of function for which source code Google Cloud Storage signed
+ * // URL should be generated.
+ * name: 'projects/my-project/locations/my-location/functions/my-function',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "versionId": "my_versionId"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "downloadUrl": "my_downloadUrl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.generateDownloadUrl
* @memberOf! ()
*
@@ -1225,6 +1582,55 @@ export namespace cloudfunctions_v1 {
/**
* cloudfunctions.projects.locations.functions.generateUploadUrl
* @desc Returns a signed URL for uploading a function source code. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls. Once the function source code upload is complete, the used signed URL should be provided in CreateFunction or UpdateFunction request as a reference to the function source code. When uploading source code to the generated signed URL, please follow these restrictions: * Source file type should be a zip file. * Source file size should not exceed 100MB limit. * No credentials should be attached - the signed URLs provide access to the target bucket using internal service identity; if credentials were attached, the identity from the credentials would be used, but that identity does not have permissions to upload files to the URL. When making a HTTP PUT request, these two headers need to be specified: * `content-type: application/zip` * `x-goog-content-length-range: 0,104857600` And this header SHOULD NOT be specified: * `Authorization: Bearer YOUR_TOKEN`
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.generateUploadUrl(
+ * {
+ * // The project and location in which the Google Cloud Storage signed URL
+ * // should be generated, specified in the format `projects/x/locations/x`.
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "uploadUrl": "my_uploadUrl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.generateUploadUrl
* @memberOf! ()
*
@@ -1307,6 +1713,67 @@ export namespace cloudfunctions_v1 {
/**
* cloudfunctions.projects.locations.functions.get
* @desc Returns a function with the given name from the requested project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.get({
+ * // Required. The name of the function which details should be obtained.
+ * name: 'projects/my-project/locations/my-location/functions/my-function',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "availableMemoryMb": 0,
+ * // "description": "my_description",
+ * // "entryPoint": "my_entryPoint",
+ * // "environmentVariables": {},
+ * // "eventTrigger": {},
+ * // "httpsTrigger": {},
+ * // "ingressSettings": "my_ingressSettings",
+ * // "labels": {},
+ * // "maxInstances": 0,
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "runtime": "my_runtime",
+ * // "serviceAccountEmail": "my_serviceAccountEmail",
+ * // "sourceArchiveUrl": "my_sourceArchiveUrl",
+ * // "sourceRepository": {},
+ * // "sourceUploadUrl": "my_sourceUploadUrl",
+ * // "status": "my_status",
+ * // "timeout": "my_timeout",
+ * // "updateTime": "my_updateTime",
+ * // "versionId": "my_versionId",
+ * // "vpcConnector": "my_vpcConnector",
+ * // "vpcConnectorEgressSettings": "my_vpcConnectorEgressSettings"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.get
* @memberOf! ()
*
@@ -1379,6 +1846,59 @@ export namespace cloudfunctions_v1 {
/**
* cloudfunctions.projects.locations.functions.getIamPolicy
* @desc Gets the IAM access control policy for a function. Returns an empty policy if the function exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.getIamPolicy({
+ * // Optional. The policy format version to be returned.
+ * //
+ * // Valid values are 0, 1, and 3. Requests specifying an invalid value will be
+ * // rejected.
+ * //
+ * // Requests for policies with any conditional bindings must specify version 3.
+ * // Policies without any conditional bindings may specify any valid value or
+ * // leave the field unset.
+ * 'options.requestedPolicyVersion': 'placeholder-value',
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/locations/my-location/functions/my-function',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.getIamPolicy
* @memberOf! ()
*
@@ -1453,6 +1973,60 @@ export namespace cloudfunctions_v1 {
/**
* cloudfunctions.projects.locations.functions.list
* @desc Returns a list of functions that belong to the requested project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.list({
+ * // Maximum number of functions to return per call.
+ * pageSize: 'placeholder-value',
+ * // The value returned by the last
+ * // `ListFunctionsResponse`; indicates that
+ * // this is a continuation of a prior `ListFunctions` call, and that the
+ * // system should return the next page of data.
+ * pageToken: 'placeholder-value',
+ * // The project and location from which the function should be listed,
+ * // specified in the format `projects/x/locations/x`
+ * // If you want to list functions in all locations, use "-" in place of a
+ * // location. When listing functions in all locations, if one or more
+ * // location(s) are unreachable, the response will contain functions from all
+ * // reachable locations along with the names of any unreachable locations.
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "functions": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "unreachable": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.list
* @memberOf! ()
*
@@ -1532,6 +2106,82 @@ export namespace cloudfunctions_v1 {
/**
* cloudfunctions.projects.locations.functions.patch
* @desc Updates existing function.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.patch({
+ * // A user-defined name of the function. Function names must be unique
+ * // globally and match pattern `projects/x/locations/x/functions/x`
+ * name: 'projects/my-project/locations/my-location/functions/my-function',
+ * // Required list of fields to be updated in this request.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "availableMemoryMb": 0,
+ * // "description": "my_description",
+ * // "entryPoint": "my_entryPoint",
+ * // "environmentVariables": {},
+ * // "eventTrigger": {},
+ * // "httpsTrigger": {},
+ * // "ingressSettings": "my_ingressSettings",
+ * // "labels": {},
+ * // "maxInstances": 0,
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "runtime": "my_runtime",
+ * // "serviceAccountEmail": "my_serviceAccountEmail",
+ * // "sourceArchiveUrl": "my_sourceArchiveUrl",
+ * // "sourceRepository": {},
+ * // "sourceUploadUrl": "my_sourceUploadUrl",
+ * // "status": "my_status",
+ * // "timeout": "my_timeout",
+ * // "updateTime": "my_updateTime",
+ * // "versionId": "my_versionId",
+ * // "vpcConnector": "my_vpcConnector",
+ * // "vpcConnectorEgressSettings": "my_vpcConnectorEgressSettings"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.patch
* @memberOf! ()
*
@@ -1606,6 +2256,59 @@ export namespace cloudfunctions_v1 {
/**
* cloudfunctions.projects.locations.functions.setIamPolicy
* @desc Sets the IAM access control policy on the specified function. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/locations/my-location/functions/my-function',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {},
+ * // "updateMask": "my_updateMask"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.setIamPolicy
* @memberOf! ()
*
@@ -1680,6 +2383,58 @@ export namespace cloudfunctions_v1 {
/**
* cloudfunctions.projects.locations.functions.testIamPermissions
* @desc Tests the specified permissions against the IAM access control policy for a function. If the function does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/functions/my-function',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.testIamPermissions
* @memberOf! ()
*
diff --git a/src/apis/cloudfunctions/v1beta2.ts b/src/apis/cloudfunctions/v1beta2.ts
index 10176139680..b6ed5acfd18 100644
--- a/src/apis/cloudfunctions/v1beta2.ts
+++ b/src/apis/cloudfunctions/v1beta2.ts
@@ -503,6 +503,50 @@ export namespace cloudfunctions_v1beta2 {
/**
* cloudfunctions.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.operations.get({
+ * // The name of the operation resource.
+ * name: 'operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.operations.get
* @memberOf! ()
*
@@ -574,6 +618,53 @@ export namespace cloudfunctions_v1beta2 {
/**
* cloudfunctions.operations.list
* @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.operations.list({
+ * // Required. A filter for matching the requested operations.
The supported formats of filter are:
To query for a specific function: project:*,location:*,function:*
To query for all of the latest operations for a project: project:*,latest:true
+ * filter: 'placeholder-value',
+ * // Must not be set.
+ * name: 'placeholder-value',
+ * // The maximum number of records that should be returned.
Requested page size cannot exceed 100. If not set, the default page size is 100.
Pagination is only supported when querying for a specific function.
+ * pageSize: 'placeholder-value',
+ * // Token identifying which result to start with, which is returned by a previous list call.
Pagination is only supported when querying for a specific function.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.operations.list
* @memberOf! ()
*
@@ -706,6 +797,53 @@ export namespace cloudfunctions_v1beta2 {
/**
* cloudfunctions.projects.locations.list
* @desc Lists information about the supported locations for this service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The resource that owns the locations collection, if applicable.
+ * name: 'projects/my-project',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "locations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.list
* @memberOf! ()
*
@@ -818,6 +956,56 @@ export namespace cloudfunctions_v1beta2 {
/**
* cloudfunctions.projects.locations.functions.call
* @desc Synchronously invokes a deployed Cloud Function. To be used for testing purposes as very limited traffic is allowed. For more information on the actual limits refer to [API Calls]( https://cloud.google.com/functions/quotas#rate_limits).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.call({
+ * // Required. The name of the function to be called.
+ * name: 'projects/my-project/locations/my-location/functions/my-function',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "data": "my_data"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "error": "my_error",
+ * // "executionId": "my_executionId",
+ * // "result": "my_result"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.call
* @memberOf! ()
*
@@ -896,6 +1084,79 @@ export namespace cloudfunctions_v1beta2 {
/**
* cloudfunctions.projects.locations.functions.create
* @desc Creates a new function. If a function with the given name already exists in the specified project, the long running operation will return `ALREADY_EXISTS` error.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.create({
+ * // Required. The project and location in which the function should be created, specified
+ * // in the format `projects/x/locations/x`
+ * location: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "availableMemoryMb": 0,
+ * // "entryPoint": "my_entryPoint",
+ * // "environmentVariables": {},
+ * // "eventTrigger": {},
+ * // "httpsTrigger": {},
+ * // "labels": {},
+ * // "latestOperation": "my_latestOperation",
+ * // "maxInstances": 0,
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "runtime": "my_runtime",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "sourceArchiveUrl": "my_sourceArchiveUrl",
+ * // "sourceRepository": {},
+ * // "sourceRepositoryUrl": "my_sourceRepositoryUrl",
+ * // "sourceUploadUrl": "my_sourceUploadUrl",
+ * // "status": "my_status",
+ * // "timeout": "my_timeout",
+ * // "updateTime": "my_updateTime",
+ * // "versionId": "my_versionId",
+ * // "vpcConnector": "my_vpcConnector"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.create
* @memberOf! ()
*
@@ -972,6 +1233,50 @@ export namespace cloudfunctions_v1beta2 {
/**
* cloudfunctions.projects.locations.functions.delete
* @desc Deletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.delete({
+ * // Required. The name of the function which should be deleted.
+ * name: 'projects/my-project/locations/my-location/functions/my-function',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.delete
* @memberOf! ()
*
@@ -1044,6 +1349,57 @@ export namespace cloudfunctions_v1beta2 {
/**
* cloudfunctions.projects.locations.functions.generateDownloadUrl
* @desc Returns a signed URL for downloading deployed function source code. The URL is only valid for a limited period and should be used within minutes after generation. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.generateDownloadUrl(
+ * {
+ * // The name of function for which source code Google Cloud Storage signed
+ * // URL should be generated.
+ * name: 'projects/my-project/locations/my-location/functions/my-function',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "versionId": "my_versionId"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "downloadUrl": "my_downloadUrl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.generateDownloadUrl
* @memberOf! ()
*
@@ -1127,6 +1483,55 @@ export namespace cloudfunctions_v1beta2 {
/**
* cloudfunctions.projects.locations.functions.generateUploadUrl
* @desc Returns a signed URL for uploading a function source code. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls Once the function source code upload is complete, the used signed URL should be provided in CreateFunction or UpdateFunction request as a reference to the function source code. When uploading source code to the generated signed URL, please follow these restrictions: * Source file type should be a zip file. * Source file size should not exceed 100MB limit. * No credentials should be attached - the signed URLs provide access to the target bucket using internal service identity; if credentials were attached, the identity from the credentials would be used, but that identity does not have permissions to upload files to the URL. When making a HTTP PUT request, these two headers need to be specified: * `content-type: application/zip` * `x-goog-content-length-range: 0,104857600` And this header SHOULD NOT be specified: * `Authorization: Bearer YOUR_TOKEN`
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.generateUploadUrl(
+ * {
+ * // The project and location in which the Google Cloud Storage signed URL
+ * // should be generated, specified in the format `projects/x/locations/x`.
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "uploadUrl": "my_uploadUrl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.generateUploadUrl
* @memberOf! ()
*
@@ -1209,6 +1614,66 @@ export namespace cloudfunctions_v1beta2 {
/**
* cloudfunctions.projects.locations.functions.get
* @desc Returns a function with the given name from the requested project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.get({
+ * // Required. The name of the function which details should be obtained.
+ * name: 'projects/my-project/locations/my-location/functions/my-function',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "availableMemoryMb": 0,
+ * // "entryPoint": "my_entryPoint",
+ * // "environmentVariables": {},
+ * // "eventTrigger": {},
+ * // "httpsTrigger": {},
+ * // "labels": {},
+ * // "latestOperation": "my_latestOperation",
+ * // "maxInstances": 0,
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "runtime": "my_runtime",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "sourceArchiveUrl": "my_sourceArchiveUrl",
+ * // "sourceRepository": {},
+ * // "sourceRepositoryUrl": "my_sourceRepositoryUrl",
+ * // "sourceUploadUrl": "my_sourceUploadUrl",
+ * // "status": "my_status",
+ * // "timeout": "my_timeout",
+ * // "updateTime": "my_updateTime",
+ * // "versionId": "my_versionId",
+ * // "vpcConnector": "my_vpcConnector"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.get
* @memberOf! ()
*
@@ -1281,6 +1746,60 @@ export namespace cloudfunctions_v1beta2 {
/**
* cloudfunctions.projects.locations.functions.list
* @desc Returns a list of functions that belong to the requested project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.list({
+ * // Required. The project and location from which the function should be listed,
+ * // specified in the format `projects/x/locations/x`
+ * // If you want to list functions in all locations, use "-" in place of a
+ * // location. When listing functions in all locations, if one or more
+ * // location(s) are unreachable, the response will contain functions from all
+ * // reachable locations along with the names of any unreachable locations.
+ * location: 'projects/my-project/locations/my-location',
+ * // Maximum number of functions to return per call.
+ * pageSize: 'placeholder-value',
+ * // The value returned by the last
+ * // `ListFunctionsResponse`; indicates that
+ * // this is a continuation of a prior `ListFunctions` call, and that the
+ * // system should return the next page of data.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "functions": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "unreachable": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.list
* @memberOf! ()
*
@@ -1360,6 +1879,78 @@ export namespace cloudfunctions_v1beta2 {
/**
* cloudfunctions.projects.locations.functions.update
* @desc Updates existing function.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudfunctions.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudfunctions = google.cloudfunctions('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudfunctions.projects.locations.functions.update({
+ * // Required. The name of the function to be updated.
+ * name: 'projects/my-project/locations/my-location/functions/my-function',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "availableMemoryMb": 0,
+ * // "entryPoint": "my_entryPoint",
+ * // "environmentVariables": {},
+ * // "eventTrigger": {},
+ * // "httpsTrigger": {},
+ * // "labels": {},
+ * // "latestOperation": "my_latestOperation",
+ * // "maxInstances": 0,
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "runtime": "my_runtime",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "sourceArchiveUrl": "my_sourceArchiveUrl",
+ * // "sourceRepository": {},
+ * // "sourceRepositoryUrl": "my_sourceRepositoryUrl",
+ * // "sourceUploadUrl": "my_sourceUploadUrl",
+ * // "status": "my_status",
+ * // "timeout": "my_timeout",
+ * // "updateTime": "my_updateTime",
+ * // "versionId": "my_versionId",
+ * // "vpcConnector": "my_vpcConnector"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudfunctions.projects.locations.functions.update
* @memberOf! ()
*
diff --git a/src/apis/cloudidentity/v1.ts b/src/apis/cloudidentity/v1.ts
index ae821f468ee..46bea859ef7 100644
--- a/src/apis/cloudidentity/v1.ts
+++ b/src/apis/cloudidentity/v1.ts
@@ -296,6 +296,65 @@ export namespace cloudidentity_v1 {
/**
* cloudidentity.groups.create
* @desc Creates a Group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.create({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "groupKey": {},
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.create
* @memberOf! ()
*
@@ -367,6 +426,55 @@ export namespace cloudidentity_v1 {
/**
* cloudidentity.groups.delete
* @desc Deletes a Group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.delete({
+ * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the
+ * // Group in the format: `groups/{group_id}`, where `group_id` is the unique ID
+ * // assigned to the Group.
+ * name: 'groups/my-group',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.delete
* @memberOf! ()
*
@@ -438,6 +546,59 @@ export namespace cloudidentity_v1 {
/**
* cloudidentity.groups.get
* @desc Retrieves a Group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-identity.groups.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.get({
+ * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the
+ * // Group in the format: `groups/{group_id}`, where `group_id` is the unique ID
+ * // assigned to the Group.
+ * name: 'groups/my-group',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "groupKey": {},
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.get
* @memberOf! ()
*
@@ -507,6 +668,58 @@ export namespace cloudidentity_v1 {
/**
* cloudidentity.groups.list
* @desc Lists groups within a customer or a domain.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-identity.groups.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.list({
+ * // The default page size is 200 (max 1000) for the BASIC view, and 50
+ * // (max 500) for the FULL view.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous list request, if any.
+ * pageToken: 'placeholder-value',
+ * // Required. Customer ID to list all groups from.
+ * parent: 'placeholder-value',
+ * // Group resource view to be returned. Defaults to [View.BASIC]().
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "groups": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.list
* @memberOf! ()
*
@@ -581,6 +794,58 @@ export namespace cloudidentity_v1 {
/**
* cloudidentity.groups.lookup
* @desc Looks up [resource name](https://cloud.google.com/apis/design/resource_names) of a Group by its EntityKey.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-identity.groups.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.lookup({
+ * // The ID of the entity within the given namespace. The ID must be unique
+ * // within its namespace.
+ * 'groupKey.id': 'placeholder-value',
+ * // Namespaces provide isolation for IDs, so an ID only needs to be unique
+ * // within its namespace.
+ * //
+ * // Namespaces are currently only created as part of IdentitySource creation
+ * // from Admin Console. A namespace `"identitysources/{identity_source_id}"` is
+ * // created corresponding to every Identity Source `identity_source_id`.
+ * 'groupKey.namespace': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.lookup
* @memberOf! ()
*
@@ -657,6 +922,74 @@ export namespace cloudidentity_v1 {
/**
* cloudidentity.groups.patch
* @desc Updates a Group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.patch({
+ * // Output only. [Resource name](https://cloud.google.com/apis/design/resource_names) of the
+ * // Group in the format: `groups/{group_id}`, where group_id is the unique ID
+ * // assigned to the Group.
+ * //
+ * // Must be left blank while creating a Group.
+ * name: 'groups/my-group',
+ * // Required. Editable fields: `display_name`, `description`
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "groupKey": {},
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.patch
* @memberOf! ()
*
@@ -730,6 +1063,61 @@ export namespace cloudidentity_v1 {
/**
* cloudidentity.groups.search
* @desc Searches for Groups.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-identity.groups.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.search({
+ * // The default page size is 200 (max 1000) for the BASIC view, and 50
+ * // (max 500) for the FULL view.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous search request, if any.
+ * pageToken: 'placeholder-value',
+ * // Required. `Required`. Query string for performing search on groups. Users can search
+ * // on parent and label attributes of groups.
+ * // EXACT match ('==') is supported on parent, and CONTAINS match ('in') is
+ * // supported on labels.
+ * query: 'placeholder-value',
+ * // Group resource view to be returned. Defaults to [View.BASIC]().
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "groups": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.search
* @memberOf! ()
*
@@ -928,6 +1316,67 @@ export namespace cloudidentity_v1 {
/**
* cloudidentity.groups.memberships.create
* @desc Creates a Membership.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.memberships.create({
+ * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the
+ * // Group to create Membership within. Format: `groups/{group_id}`, where
+ * // `group_id` is the unique ID assigned to the Group.
+ * parent: 'groups/my-group',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "name": "my_name",
+ * // "preferredMemberKey": {},
+ * // "roles": [],
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.memberships.create
* @memberOf! ()
*
@@ -1004,6 +1453,58 @@ export namespace cloudidentity_v1 {
/**
* cloudidentity.groups.memberships.delete
* @desc Deletes a Membership.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.memberships.delete({
+ * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the
+ * // Membership to be deleted.
+ * //
+ * // Format: `groups/{group_id}/memberships/{member_id}`, where `group_id` is
+ * // the unique ID assigned to the Group to which Membership belongs to, and
+ * // member_id is the unique ID assigned to the member.
+ * name: 'groups/my-group/memberships/my-membership',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.memberships.delete
* @memberOf! ()
*
@@ -1076,6 +1577,59 @@ export namespace cloudidentity_v1 {
/**
* cloudidentity.groups.memberships.get
* @desc Retrieves a Membership.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-identity.groups.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.memberships.get({
+ * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the
+ * // Membership to be retrieved.
+ * //
+ * // Format: `groups/{group_id}/memberships/{member_id}`, where `group_id` is
+ * // the unique id assigned to the Group to which Membership belongs to, and
+ * // `member_id` is the unique ID assigned to the member.
+ * name: 'groups/my-group/memberships/my-membership',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "name": "my_name",
+ * // "preferredMemberKey": {},
+ * // "roles": [],
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.memberships.get
* @memberOf! ()
*
@@ -1148,6 +1702,62 @@ export namespace cloudidentity_v1 {
/**
* cloudidentity.groups.memberships.list
* @desc Lists Memberships within a Group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-identity.groups.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.memberships.list({
+ * // The default page size is 200 (max 1000) for the BASIC view, and 50
+ * // (max 500) for the FULL view.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous list request, if any.
+ * pageToken: 'placeholder-value',
+ * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the
+ * // Group to list Memberships within.
+ * //
+ * // Format: `groups/{group_id}`, where `group_id` is the unique ID assigned to
+ * // the Group.
+ * parent: 'groups/my-group',
+ * // Membership resource view to be returned. Defaults to View.BASIC.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "memberships": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.memberships.list
* @memberOf! ()
*
@@ -1228,6 +1838,64 @@ export namespace cloudidentity_v1 {
/**
* cloudidentity.groups.memberships.lookup
* @desc Looks up [resource name](https://cloud.google.com/apis/design/resource_names) of a Membership within a Group by member's EntityKey.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-identity.groups.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.memberships.lookup({
+ * // The ID of the entity within the given namespace. The ID must be unique
+ * // within its namespace.
+ * 'memberKey.id': 'placeholder-value',
+ * // Namespaces provide isolation for IDs, so an ID only needs to be unique
+ * // within its namespace.
+ * //
+ * // Namespaces are currently only created as part of IdentitySource creation
+ * // from Admin Console. A namespace `"identitysources/{identity_source_id}"` is
+ * // created corresponding to every Identity Source `identity_source_id`.
+ * 'memberKey.namespace': 'placeholder-value',
+ * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the
+ * // Group to lookup Membership within.
+ * //
+ * // Format: `groups/{group_id}`, where `group_id` is the unique ID assigned to
+ * // the Group.
+ * parent: 'groups/my-group',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.memberships.lookup
* @memberOf! ()
*
diff --git a/src/apis/cloudidentity/v1beta1.ts b/src/apis/cloudidentity/v1beta1.ts
index 8925806a903..afacfc58126 100644
--- a/src/apis/cloudidentity/v1beta1.ts
+++ b/src/apis/cloudidentity/v1beta1.ts
@@ -769,6 +769,69 @@ export namespace cloudidentity_v1beta1 {
/**
* cloudidentity.groups.create
* @desc Creates a `Group`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.create({
+ * // Required. The initial configuration option for the `Group`.
+ * initialGroupConfig: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "additionalGroupKeys": [],
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "groupKey": {},
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.create
* @memberOf! ()
*
@@ -841,6 +904,56 @@ export namespace cloudidentity_v1beta1 {
/**
* cloudidentity.groups.delete
* @desc Deletes a `Group`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.delete({
+ * // Required. The [resource name](https://cloud.google.com/apis/design/resource_names) of
+ * // the `Group` to retrieve.
+ * //
+ * // Must be of the form `groups/{group_id}`.
+ * name: 'groups/my-group',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.delete
* @memberOf! ()
*
@@ -912,6 +1025,61 @@ export namespace cloudidentity_v1beta1 {
/**
* cloudidentity.groups.get
* @desc Retrieves a `Group`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-identity.groups.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.get({
+ * // Required. The [resource name](https://cloud.google.com/apis/design/resource_names) of
+ * // the `Group` to retrieve.
+ * //
+ * // Must be of the form `groups/{group_id}`.
+ * name: 'groups/my-group',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "additionalGroupKeys": [],
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "groupKey": {},
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.get
* @memberOf! ()
*
@@ -981,6 +1149,71 @@ export namespace cloudidentity_v1beta1 {
/**
* cloudidentity.groups.list
* @desc Lists the `Group`s under a customer or namespace.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-identity.groups.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.list({
+ * // The maximum number of results to return.
+ * //
+ * // Note that the number of results returned may be less than this value even
+ * // if there are more available results. To fetch all results, clients must
+ * // continue calling this method repeatedly until the response no longer
+ * // contains a `next_page_token`.
+ * //
+ * // If unspecified, defaults to 200 for `View.BASIC` and to 50 for `View.FULL`.
+ * //
+ * // Must not be greater than 1000 for `View.BASIC` or 500 for `View.FULL`.
+ * pageSize: 'placeholder-value',
+ * // The `next_page_token` value returned from a previous list request, if any.
+ * pageToken: 'placeholder-value',
+ * // Required. The parent resource under which to list all `Group`s.
+ * //
+ * // Must be of the form `identitysources/{identity_source_id}` for external-
+ * // identity-mapped groups or `customers/{customer_id}` for Google Groups.
+ * parent: 'placeholder-value',
+ * // The level of detail to be returned.
+ * //
+ * // If unspecified, defaults to `View.BASIC`.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "groups": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.list
* @memberOf! ()
*
@@ -1055,6 +1288,67 @@ export namespace cloudidentity_v1beta1 {
/**
* cloudidentity.groups.lookup
* @desc Looks up the [resource name](https://cloud.google.com/apis/design/resource_names) of a `Group` by its `EntityKey`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-identity.groups.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.lookup({
+ * // The ID of the entity.
+ * //
+ * // For Google-managed entities, the `id` must be the email address of an
+ * // existing group or user.
+ * //
+ * // For external-identity-mapped entities, the `id` must be a string conforming
+ * // to the Identity Source's requirements.
+ * //
+ * // Must be unique within a `namespace`.
+ * 'groupKey.id': 'placeholder-value',
+ * // The namespace in which the entity exists.
+ * //
+ * // If not specified, the `EntityKey` represents a Google-managed entity such
+ * // as a Google user or a Google Group.
+ * //
+ * // If specified, the `EntityKey` represents an external-identity-mapped group.
+ * // The namespace must correspond to an identity source created in Admin
+ * // Console and must be in the form of `identitysources/{identity_source_id}.
+ * 'groupKey.namespace': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.lookup
* @memberOf! ()
*
@@ -1134,6 +1428,76 @@ export namespace cloudidentity_v1beta1 {
/**
* cloudidentity.groups.patch
* @desc Updates a `Group`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.patch({
+ * // Output only. The [resource name](https://cloud.google.com/apis/design/resource_names) of
+ * // the `Group`.
+ * //
+ * // Shall be of the form `groups/{group_id}`.
+ * name: 'groups/my-group',
+ * // Required. The fully-qualified names of fields to update.
+ * //
+ * // May only contain the following fields: `display_name`, `description`.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "additionalGroupKeys": [],
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "groupKey": {},
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.patch
* @memberOf! ()
*
@@ -1207,6 +1571,77 @@ export namespace cloudidentity_v1beta1 {
/**
* cloudidentity.groups.search
* @desc Searches for `Group`s matching a specified query.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-identity.groups.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.search({
+ * // The maximum number of results to return.
+ * //
+ * // Note that the number of results returned may be less than this value even
+ * // if there are more available results. To fetch all results, clients must
+ * // continue calling this method repeatedly until the response no longer
+ * // contains a `next_page_token`.
+ * //
+ * // If unspecified, defaults to 200 for `GroupView.BASIC` and to 50 for
+ * // `GroupView.FULL`.
+ * //
+ * // Must not be greater than 1000 for `GroupView.BASIC` or 500 for
+ * // `GroupView.FULL`.
+ * pageSize: 'placeholder-value',
+ * // The `next_page_token` value returned from a previous search request, if
+ * // any.
+ * pageToken: 'placeholder-value',
+ * // Required. The search query.
+ * //
+ * // Must be specified in [Common Expression
+ * // Language](https://opensource.google/projects/cel). May only contain
+ * // equality operators on the parent and inclusion operators on labels (e.g.,
+ * // `parent == 'customers/{customer_id}' &&
+ * // 'cloudidentity.googleapis.com/groups.discussion_forum' in labels`).
+ * query: 'placeholder-value',
+ * // The level of detail to be returned.
+ * //
+ * // If unspecified, defaults to `View.BASIC`.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "groups": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.search
* @memberOf! ()
*
@@ -1413,6 +1848,68 @@ export namespace cloudidentity_v1beta1 {
/**
* cloudidentity.groups.memberships.create
* @desc Creates a `Membership`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.memberships.create({
+ * // Required. The parent `Group` resource under which to create the `Membership`.
+ * //
+ * // Must be of the form `groups/{group_id}`.
+ * parent: 'groups/my-group',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "memberKey": {},
+ * // "name": "my_name",
+ * // "preferredMemberKey": {},
+ * // "roles": [],
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.memberships.create
* @memberOf! ()
*
@@ -1489,6 +1986,56 @@ export namespace cloudidentity_v1beta1 {
/**
* cloudidentity.groups.memberships.delete
* @desc Deletes a `Membership`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.memberships.delete({
+ * // Required. The [resource name](https://cloud.google.com/apis/design/resource_names) of
+ * // the `Membership` to delete.
+ * //
+ * // Must be of the form `groups/{group_id}/memberships/{membership_id}`.
+ * name: 'groups/my-group/memberships/my-membership',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.memberships.delete
* @memberOf! ()
*
@@ -1561,6 +2108,58 @@ export namespace cloudidentity_v1beta1 {
/**
* cloudidentity.groups.memberships.get
* @desc Retrieves a `Membership`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-identity.groups.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.memberships.get({
+ * // Required. The [resource name](https://cloud.google.com/apis/design/resource_names) of
+ * // the `Membership` to retrieve.
+ * //
+ * // Must be of the form `groups/{group_id}/memberships/{membership_id}`.
+ * name: 'groups/my-group/memberships/my-membership',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "memberKey": {},
+ * // "name": "my_name",
+ * // "preferredMemberKey": {},
+ * // "roles": [],
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.memberships.get
* @memberOf! ()
*
@@ -1633,6 +2232,73 @@ export namespace cloudidentity_v1beta1 {
/**
* cloudidentity.groups.memberships.list
* @desc Lists the `Membership`s within a `Group`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-identity.groups.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.memberships.list({
+ * // The maximum number of results to return.
+ * //
+ * // Note that the number of results returned may be less than this value even
+ * // if there are more available results. To fetch all results, clients must
+ * // continue calling this method repeatedly until the response no longer
+ * // contains a `next_page_token`.
+ * //
+ * // If unspecified, defaults to 200 for `GroupView.BASIC` and to 50 for
+ * // `GroupView.FULL`.
+ * //
+ * // Must not be greater than 1000 for `GroupView.BASIC` or 500 for
+ * // `GroupView.FULL`.
+ * pageSize: 'placeholder-value',
+ * // The `next_page_token` value returned from a previous search request, if
+ * // any.
+ * pageToken: 'placeholder-value',
+ * // Required. The parent `Group` resource under which to lookup the `Membership` name.
+ * //
+ * // Must be of the form `groups/{group_id}`.
+ * parent: 'groups/my-group',
+ * // The level of detail to be returned.
+ * //
+ * // If unspecified, defaults to `MembershipView.BASIC`.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "memberships": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.memberships.list
* @memberOf! ()
*
@@ -1713,6 +2379,71 @@ export namespace cloudidentity_v1beta1 {
/**
* cloudidentity.groups.memberships.lookup
* @desc Looks up the [resource name](https://cloud.google.com/apis/design/resource_names) of a `Membership` by its `EntityKey`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-identity.groups.readonly',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.memberships.lookup({
+ * // The ID of the entity.
+ * //
+ * // For Google-managed entities, the `id` must be the email address of an
+ * // existing group or user.
+ * //
+ * // For external-identity-mapped entities, the `id` must be a string conforming
+ * // to the Identity Source's requirements.
+ * //
+ * // Must be unique within a `namespace`.
+ * 'memberKey.id': 'placeholder-value',
+ * // The namespace in which the entity exists.
+ * //
+ * // If not specified, the `EntityKey` represents a Google-managed entity such
+ * // as a Google user or a Google Group.
+ * //
+ * // If specified, the `EntityKey` represents an external-identity-mapped group.
+ * // The namespace must correspond to an identity source created in Admin
+ * // Console and must be in the form of `identitysources/{identity_source_id}.
+ * 'memberKey.namespace': 'placeholder-value',
+ * // Required. The parent `Group` resource under which to lookup the `Membership` name.
+ * //
+ * // Must be of the form `groups/{group_id}`.
+ * parent: 'groups/my-group',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.memberships.lookup
* @memberOf! ()
*
@@ -1799,6 +2530,62 @@ export namespace cloudidentity_v1beta1 {
/**
* cloudidentity.groups.memberships.modifyMembershipRoles
* @desc Modifies the `MembershipRole`s of a `Membership`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudidentity = google.cloudidentity('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-identity.groups',
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudidentity.groups.memberships.modifyMembershipRoles({
+ * // Required. The [resource name](https://cloud.google.com/apis/design/resource_names) of
+ * // the `Membership` whose roles are to be modified.
+ * //
+ * // Must be of the form `groups/{group_id}/memberships/{membership_id}`.
+ * name: 'groups/my-group/memberships/my-membership',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "addRoles": [],
+ * // "removeRoles": [],
+ * // "updateRolesParams": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "membership": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudidentity.groups.memberships.modifyMembershipRoles
* @memberOf! ()
*
diff --git a/src/apis/cloudiot/v1.ts b/src/apis/cloudiot/v1.ts
index f1cfb588be1..1965b1c8102 100644
--- a/src/apis/cloudiot/v1.ts
+++ b/src/apis/cloudiot/v1.ts
@@ -666,6 +666,57 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.bindDeviceToGateway
* @desc Associates the device with the gateway.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.bindDeviceToGateway({
+ * // Required. The name of the registry. For example,
+ * // `projects/example-project/locations/us-central1/registries/my-registry`.
+ * parent: 'projects/my-project/locations/my-location/registries/my-registrie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deviceId": "my_deviceId",
+ * // "gatewayId": "my_gatewayId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.bindDeviceToGateway
* @memberOf! ()
*
@@ -748,6 +799,72 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.create
* @desc Creates a device registry that contains devices.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.create({
+ * // Required. The project and cloud region where this device registry must be created.
+ * // For example, `projects/example-project/locations/us-central1`.
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "credentials": [],
+ * // "eventNotificationConfigs": [],
+ * // "httpConfig": {},
+ * // "id": "my_id",
+ * // "logLevel": "my_logLevel",
+ * // "mqttConfig": {},
+ * // "name": "my_name",
+ * // "stateNotificationConfig": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "credentials": [],
+ * // "eventNotificationConfigs": [],
+ * // "httpConfig": {},
+ * // "id": "my_id",
+ * // "logLevel": "my_logLevel",
+ * // "mqttConfig": {},
+ * // "name": "my_name",
+ * // "stateNotificationConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.create
* @memberOf! ()
*
@@ -823,6 +940,48 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.delete
* @desc Deletes a device registry configuration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.delete({
+ * // Required. The name of the device registry. For example,
+ * // `projects/example-project/locations/us-central1/registries/my-registry`.
+ * name: 'projects/my-project/locations/my-location/registries/my-registrie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.delete
* @memberOf! ()
*
@@ -892,6 +1051,57 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.get
* @desc Gets a device registry configuration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.get({
+ * // Required. The name of the device registry. For example,
+ * // `projects/example-project/locations/us-central1/registries/my-registry`.
+ * name: 'projects/my-project/locations/my-location/registries/my-registrie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "credentials": [],
+ * // "eventNotificationConfigs": [],
+ * // "httpConfig": {},
+ * // "id": "my_id",
+ * // "logLevel": "my_logLevel",
+ * // "mqttConfig": {},
+ * // "name": "my_name",
+ * // "stateNotificationConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.get
* @memberOf! ()
*
@@ -963,6 +1173,61 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/registries/my-registrie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.getIamPolicy
* @memberOf! ()
*
@@ -1036,6 +1301,60 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.list
* @desc Lists device registries.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.list({
+ * // The maximum number of registries to return in the response. If this value
+ * // is zero, the service will select a default size. A call may return fewer
+ * // objects than requested. A non-empty `next_page_token` in the response
+ * // indicates that more data is available.
+ * pageSize: 'placeholder-value',
+ * // The value returned by the last `ListDeviceRegistriesResponse`; indicates
+ * // that this is a continuation of a prior `ListDeviceRegistries` call and
+ * // the system should return the next page of data.
+ * pageToken: 'placeholder-value',
+ * // Required. The project and cloud region path. For example,
+ * // `projects/example-project/locations/us-central1`.
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deviceRegistries": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.list
* @memberOf! ()
*
@@ -1121,6 +1440,78 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.patch
* @desc Updates a device registry configuration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.patch({
+ * // The resource path name. For example,
+ * // `projects/example-project/locations/us-central1/registries/my-registry`.
+ * name: 'projects/my-project/locations/my-location/registries/my-registrie',
+ * // Required. Only updates the `device_registry` fields indicated by this mask.
+ * // The field mask must not be empty, and it must not contain fields that
+ * // are immutable or only set by the server.
+ * // Mutable top-level fields: `event_notification_config`, `http_config`,
+ * // `mqtt_config`, and `state_notification_config`.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "credentials": [],
+ * // "eventNotificationConfigs": [],
+ * // "httpConfig": {},
+ * // "id": "my_id",
+ * // "logLevel": "my_logLevel",
+ * // "mqttConfig": {},
+ * // "name": "my_name",
+ * // "stateNotificationConfig": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "credentials": [],
+ * // "eventNotificationConfigs": [],
+ * // "httpConfig": {},
+ * // "id": "my_id",
+ * // "logLevel": "my_logLevel",
+ * // "mqttConfig": {},
+ * // "name": "my_name",
+ * // "stateNotificationConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.patch
* @memberOf! ()
*
@@ -1194,6 +1585,61 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/registries/my-registrie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.setIamPolicy
* @memberOf! ()
*
@@ -1267,6 +1713,59 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/registries/my-registrie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.testIamPermissions
* @memberOf! ()
*
@@ -1349,6 +1848,60 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.unbindDeviceFromGateway
* @desc Deletes the association between the device and the gateway.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.unbindDeviceFromGateway(
+ * {
+ * // Required. The name of the registry. For example,
+ * // `projects/example-project/locations/us-central1/registries/my-registry`.
+ * parent:
+ * 'projects/my-project/locations/my-location/registries/my-registrie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deviceId": "my_deviceId",
+ * // "gatewayId": "my_gatewayId"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.unbindDeviceFromGateway
* @memberOf! ()
*
@@ -1616,6 +2169,91 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.devices.create
* @desc Creates a device in a device registry.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.devices.create({
+ * // Required. The name of the device registry where this device should be created.
+ * // For example,
+ * // `projects/example-project/locations/us-central1/registries/my-registry`.
+ * parent: 'projects/my-project/locations/my-location/registries/my-registrie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "blocked": false,
+ * // "config": {},
+ * // "credentials": [],
+ * // "gatewayConfig": {},
+ * // "id": "my_id",
+ * // "lastConfigAckTime": "my_lastConfigAckTime",
+ * // "lastConfigSendTime": "my_lastConfigSendTime",
+ * // "lastErrorStatus": {},
+ * // "lastErrorTime": "my_lastErrorTime",
+ * // "lastEventTime": "my_lastEventTime",
+ * // "lastHeartbeatTime": "my_lastHeartbeatTime",
+ * // "lastStateTime": "my_lastStateTime",
+ * // "logLevel": "my_logLevel",
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "numId": "my_numId",
+ * // "state": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "blocked": false,
+ * // "config": {},
+ * // "credentials": [],
+ * // "gatewayConfig": {},
+ * // "id": "my_id",
+ * // "lastConfigAckTime": "my_lastConfigAckTime",
+ * // "lastConfigSendTime": "my_lastConfigSendTime",
+ * // "lastErrorStatus": {},
+ * // "lastErrorTime": "my_lastErrorTime",
+ * // "lastEventTime": "my_lastEventTime",
+ * // "lastHeartbeatTime": "my_lastHeartbeatTime",
+ * // "lastStateTime": "my_lastStateTime",
+ * // "logLevel": "my_logLevel",
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "numId": "my_numId",
+ * // "state": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.devices.create
* @memberOf! ()
*
@@ -1689,6 +2327,50 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.devices.delete
* @desc Deletes a device.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.devices.delete({
+ * // Required. The name of the device. For example,
+ * // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ * // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ * name:
+ * 'projects/my-project/locations/my-location/registries/my-registrie/devices/my-device',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.devices.delete
* @memberOf! ()
*
@@ -1758,6 +2440,71 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.devices.get
* @desc Gets details about a device.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.devices.get({
+ * // The fields of the `Device` resource to be returned in the response. If the
+ * // field mask is unset or empty, all fields are returned.
+ * fieldMask: 'placeholder-value',
+ * // Required. The name of the device. For example,
+ * // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ * // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ * name:
+ * 'projects/my-project/locations/my-location/registries/my-registrie/devices/my-device',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "blocked": false,
+ * // "config": {},
+ * // "credentials": [],
+ * // "gatewayConfig": {},
+ * // "id": "my_id",
+ * // "lastConfigAckTime": "my_lastConfigAckTime",
+ * // "lastConfigSendTime": "my_lastConfigSendTime",
+ * // "lastErrorStatus": {},
+ * // "lastErrorTime": "my_lastErrorTime",
+ * // "lastEventTime": "my_lastEventTime",
+ * // "lastHeartbeatTime": "my_lastHeartbeatTime",
+ * // "lastStateTime": "my_lastStateTime",
+ * // "logLevel": "my_logLevel",
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "numId": "my_numId",
+ * // "state": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.devices.get
* @memberOf! ()
*
@@ -1828,6 +2575,84 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.devices.list
* @desc List devices in a device registry.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.devices.list({
+ * // A list of device string IDs. For example, `['device0', 'device12']`.
+ * // If empty, this field is ignored. Maximum IDs: 10,000
+ * deviceIds: 'placeholder-value',
+ * // A list of device numeric IDs. If empty, this field is ignored. Maximum
+ * // IDs: 10,000.
+ * deviceNumIds: 'placeholder-value',
+ * // The fields of the `Device` resource to be returned in the response. The
+ * // fields `id` and `num_id` are always returned, along with any
+ * // other fields specified.
+ * fieldMask: 'placeholder-value',
+ * // If set, returns only the gateways with which the specified device is
+ * // associated. The device ID can be numeric (`num_id`) or the user-defined
+ * // string (`id`). For example, if `456` is specified, returns only the
+ * // gateways to which the device with `num_id` 456 is bound.
+ * 'gatewayListOptions.associationsDeviceId': 'placeholder-value',
+ * // If set, only devices associated with the specified gateway are returned.
+ * // The gateway ID can be numeric (`num_id`) or the user-defined string
+ * // (`id`). For example, if `123` is specified, only devices bound to the
+ * // gateway with `num_id` 123 are returned.
+ * 'gatewayListOptions.associationsGatewayId': 'placeholder-value',
+ * // If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY`
+ * // is specified, only non-gateway devices are returned. If
+ * // `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned.
+ * 'gatewayListOptions.gatewayType': 'placeholder-value',
+ * // The maximum number of devices to return in the response. If this value
+ * // is zero, the service will select a default size. A call may return fewer
+ * // objects than requested. A non-empty `next_page_token` in the response
+ * // indicates that more data is available.
+ * pageSize: 'placeholder-value',
+ * // The value returned by the last `ListDevicesResponse`; indicates
+ * // that this is a continuation of a prior `ListDevices` call and
+ * // the system should return the next page of data.
+ * pageToken: 'placeholder-value',
+ * // Required. The device registry path. Required. For example,
+ * // `projects/my-project/locations/us-central1/registries/my-registry`.
+ * parent: 'projects/my-project/locations/my-location/registries/my-registrie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "devices": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.devices.list
* @memberOf! ()
*
@@ -1910,6 +2735,66 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.devices.modifyCloudToDeviceConfig
* @desc Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.devices.modifyCloudToDeviceConfig(
+ * {
+ * // Required. The name of the device. For example,
+ * // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ * // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ * name:
+ * 'projects/my-project/locations/my-location/registries/my-registrie/devices/my-device',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "binaryData": "my_binaryData",
+ * // "versionToUpdate": "my_versionToUpdate"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "binaryData": "my_binaryData",
+ * // "cloudUpdateTime": "my_cloudUpdateTime",
+ * // "deviceAckTime": "my_deviceAckTime",
+ * // "version": "my_version"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.devices.modifyCloudToDeviceConfig
* @memberOf! ()
*
@@ -1987,6 +2872,99 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.devices.patch
* @desc Updates a device.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.devices.patch({
+ * // The resource path name. For example,
+ * // `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or
+ * // `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.
+ * // When `name` is populated as a response from the service, it always ends
+ * // in the device numeric ID.
+ * name:
+ * 'projects/my-project/locations/my-location/registries/my-registrie/devices/my-device',
+ * // Required. Only updates the `device` fields indicated by this mask.
+ * // The field mask must not be empty, and it must not contain fields that
+ * // are immutable or only set by the server.
+ * // Mutable top-level fields: `credentials`, `blocked`, and `metadata`
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "blocked": false,
+ * // "config": {},
+ * // "credentials": [],
+ * // "gatewayConfig": {},
+ * // "id": "my_id",
+ * // "lastConfigAckTime": "my_lastConfigAckTime",
+ * // "lastConfigSendTime": "my_lastConfigSendTime",
+ * // "lastErrorStatus": {},
+ * // "lastErrorTime": "my_lastErrorTime",
+ * // "lastEventTime": "my_lastEventTime",
+ * // "lastHeartbeatTime": "my_lastHeartbeatTime",
+ * // "lastStateTime": "my_lastStateTime",
+ * // "logLevel": "my_logLevel",
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "numId": "my_numId",
+ * // "state": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "blocked": false,
+ * // "config": {},
+ * // "credentials": [],
+ * // "gatewayConfig": {},
+ * // "id": "my_id",
+ * // "lastConfigAckTime": "my_lastConfigAckTime",
+ * // "lastConfigSendTime": "my_lastConfigSendTime",
+ * // "lastErrorStatus": {},
+ * // "lastErrorTime": "my_lastErrorTime",
+ * // "lastEventTime": "my_lastEventTime",
+ * // "lastHeartbeatTime": "my_lastHeartbeatTime",
+ * // "lastStateTime": "my_lastStateTime",
+ * // "logLevel": "my_logLevel",
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "numId": "my_numId",
+ * // "state": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.devices.patch
* @memberOf! ()
*
@@ -2058,6 +3036,61 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.devices.sendCommandToDevice
* @desc Sends a command to the specified device. In order for a device to be able to receive commands, it must: 1) be connected to Cloud IoT Core using the MQTT protocol, and 2) be subscribed to the group of MQTT topics specified by /devices/{device-id}/commands/#. This subscription will receive commands at the top-level topic /devices/{device-id}/commands as well as commands for subfolders, like /devices/{device-id}/commands/subfolder. Note that subscribing to specific subfolders is not supported. If the command could not be delivered to the device, this method will return an error; in particular, if the device is not subscribed, this method will return FAILED_PRECONDITION. Otherwise, this method will return OK. If the subscription is QoS 1, at least once delivery will be guaranteed; for QoS 0, no acknowledgment will be expected from the device.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.devices.sendCommandToDevice(
+ * {
+ * // Required. The name of the device. For example,
+ * // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ * // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ * name:
+ * 'projects/my-project/locations/my-location/registries/my-registrie/devices/my-device',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "binaryData": "my_binaryData",
+ * // "subfolder": "my_subfolder"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.devices.sendCommandToDevice
* @memberOf! ()
*
@@ -2292,6 +3325,58 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.devices.configVersions.list
* @desc Lists the last few versions of the device configuration in descending order (i.e.: newest first).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.devices.configVersions.list(
+ * {
+ * // Required. The name of the device. For example,
+ * // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ * // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ * name:
+ * 'projects/my-project/locations/my-location/registries/my-registrie/devices/my-device',
+ * // The number of versions to list. Versions are listed in decreasing order of
+ * // the version number. The maximum number of versions retained is 10. If this
+ * // value is zero, it will return all the versions available.
+ * numVersions: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deviceConfigs": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.devices.configVersions.list
* @memberOf! ()
*
@@ -2400,6 +3485,56 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.devices.states.list
* @desc Lists the last few versions of the device state in descending order (i.e.: newest first).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.devices.states.list({
+ * // Required. The name of the device. For example,
+ * // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ * // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ * name:
+ * 'projects/my-project/locations/my-location/registries/my-registrie/devices/my-device',
+ * // The number of states to list. States are listed in descending order of
+ * // update time. The maximum number of states retained is 10. If this
+ * // value is zero, it will return all the states available.
+ * numStates: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deviceStates": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.devices.states.list
* @memberOf! ()
*
@@ -2502,6 +3637,61 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.groups.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.groups.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/registries/my-registrie/groups/my-group',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.groups.getIamPolicy
* @memberOf! ()
*
@@ -2575,6 +3765,61 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.groups.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.groups.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/registries/my-registrie/groups/my-group',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.groups.setIamPolicy
* @memberOf! ()
*
@@ -2648,6 +3893,61 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.groups.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.groups.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/registries/my-registrie/groups/my-group',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.groups.testIamPermissions
* @memberOf! ()
*
@@ -2789,6 +4089,85 @@ export namespace cloudiot_v1 {
/**
* cloudiot.projects.locations.registries.groups.devices.list
* @desc List devices in a device registry.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudiot.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudiot = google.cloudiot('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudiot',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudiot.projects.locations.registries.groups.devices.list({
+ * // A list of device string IDs. For example, `['device0', 'device12']`.
+ * // If empty, this field is ignored. Maximum IDs: 10,000
+ * deviceIds: 'placeholder-value',
+ * // A list of device numeric IDs. If empty, this field is ignored. Maximum
+ * // IDs: 10,000.
+ * deviceNumIds: 'placeholder-value',
+ * // The fields of the `Device` resource to be returned in the response. The
+ * // fields `id` and `num_id` are always returned, along with any
+ * // other fields specified.
+ * fieldMask: 'placeholder-value',
+ * // If set, returns only the gateways with which the specified device is
+ * // associated. The device ID can be numeric (`num_id`) or the user-defined
+ * // string (`id`). For example, if `456` is specified, returns only the
+ * // gateways to which the device with `num_id` 456 is bound.
+ * 'gatewayListOptions.associationsDeviceId': 'placeholder-value',
+ * // If set, only devices associated with the specified gateway are returned.
+ * // The gateway ID can be numeric (`num_id`) or the user-defined string
+ * // (`id`). For example, if `123` is specified, only devices bound to the
+ * // gateway with `num_id` 123 are returned.
+ * 'gatewayListOptions.associationsGatewayId': 'placeholder-value',
+ * // If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY`
+ * // is specified, only non-gateway devices are returned. If
+ * // `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned.
+ * 'gatewayListOptions.gatewayType': 'placeholder-value',
+ * // The maximum number of devices to return in the response. If this value
+ * // is zero, the service will select a default size. A call may return fewer
+ * // objects than requested. A non-empty `next_page_token` in the response
+ * // indicates that more data is available.
+ * pageSize: 'placeholder-value',
+ * // The value returned by the last `ListDevicesResponse`; indicates
+ * // that this is a continuation of a prior `ListDevices` call and
+ * // the system should return the next page of data.
+ * pageToken: 'placeholder-value',
+ * // Required. The device registry path. Required. For example,
+ * // `projects/my-project/locations/us-central1/registries/my-registry`.
+ * parent:
+ * 'projects/my-project/locations/my-location/registries/my-registrie/groups/my-group',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "devices": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudiot.projects.locations.registries.groups.devices.list
* @memberOf! ()
*
diff --git a/src/apis/cloudkms/v1.ts b/src/apis/cloudkms/v1.ts
index ff93d1e1bfa..789666e49d4 100644
--- a/src/apis/cloudkms/v1.ts
+++ b/src/apis/cloudkms/v1.ts
@@ -713,6 +713,53 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.get
* @desc Gets information about a location.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.get({
+ * // Resource name for the location.
+ * name: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "labels": {},
+ * // "locationId": "my_locationId",
+ * // "metadata": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.get
* @memberOf! ()
*
@@ -782,6 +829,56 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.list
* @desc Lists information about the supported locations for this service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The resource that owns the locations collection, if applicable.
+ * name: 'projects/my-project',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "locations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.list
* @memberOf! ()
*
@@ -913,6 +1010,63 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.create
* @desc Create a new KeyRing in a given Project and Location.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.create({
+ * // Required. It must be unique within a location and match the regular
+ * // expression `[a-zA-Z0-9_-]{1,63}`
+ * keyRingId: 'placeholder-value',
+ * // Required. The resource name of the location associated with the
+ * // KeyRings, in the format `projects/x/locations/x`.
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.create
* @memberOf! ()
*
@@ -987,6 +1141,50 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.get
* @desc Returns metadata for a given KeyRing.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.get({
+ * // Required. The name of the KeyRing to get.
+ * name: 'projects/my-project/locations/my-location/keyRings/my-keyRing',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.get
* @memberOf! ()
*
@@ -1056,6 +1254,62 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.getIamPolicy({
+ * // Optional. The policy format version to be returned.
+ * //
+ * // Valid values are 0, 1, and 3. Requests specifying an invalid value will be
+ * // rejected.
+ * //
+ * // Requests for policies with any conditional bindings must specify version 3.
+ * // Policies without any conditional bindings may specify any valid value or
+ * // leave the field unset.
+ * 'options.requestedPolicyVersion': 'placeholder-value',
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/locations/my-location/keyRings/my-keyRing',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.getIamPolicy
* @memberOf! ()
*
@@ -1129,6 +1383,70 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.list
* @desc Lists KeyRings.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.list({
+ * // Optional. Only include resources that match the filter in the response. For
+ * // more information, see
+ * // [Sorting and filtering list
+ * // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ * filter: 'placeholder-value',
+ * // Optional. Specify how the results should be sorted. If not specified, the
+ * // results will be sorted in the default order. For more information, see
+ * // [Sorting and filtering list
+ * // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ * orderBy: 'placeholder-value',
+ * // Optional. Optional limit on the number of KeyRings to include in the
+ * // response. Further KeyRings can subsequently be obtained by
+ * // including the ListKeyRingsResponse.next_page_token in a subsequent
+ * // request. If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // Optional. Optional pagination token, returned earlier via
+ * // ListKeyRingsResponse.next_page_token.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name of the location associated with the
+ * // KeyRings, in the format `projects/x/locations/x`.
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "keyRings": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "totalSize": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.list
* @memberOf! ()
*
@@ -1209,6 +1527,62 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy. Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/locations/my-location/keyRings/my-keyRing',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {},
+ * // "updateMask": "my_updateMask"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.setIamPolicy
* @memberOf! ()
*
@@ -1282,6 +1656,58 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/locations/my-location/keyRings/my-keyRing',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.testIamPermissions
* @memberOf! ()
*
@@ -1487,6 +1913,81 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.create
* @desc Create a new CryptoKey within a KeyRing. CryptoKey.purpose and CryptoKey.version_template.algorithm are required.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.create({
+ * // Required. It must be unique within a KeyRing and match the regular
+ * // expression `[a-zA-Z0-9_-]{1,63}`
+ * cryptoKeyId: 'placeholder-value',
+ * // Required. The name of the KeyRing associated with the
+ * // CryptoKeys.
+ * parent: 'projects/my-project/locations/my-location/keyRings/my-keyRing',
+ * // If set to true, the request will create a CryptoKey without any
+ * // CryptoKeyVersions. You must manually call
+ * // CreateCryptoKeyVersion or
+ * // ImportCryptoKeyVersion
+ * // before you can use this CryptoKey.
+ * skipInitialVersionCreation: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "nextRotationTime": "my_nextRotationTime",
+ * // "primary": {},
+ * // "purpose": "my_purpose",
+ * // "rotationPeriod": "my_rotationPeriod",
+ * // "versionTemplate": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "nextRotationTime": "my_nextRotationTime",
+ * // "primary": {},
+ * // "purpose": "my_purpose",
+ * // "rotationPeriod": "my_rotationPeriod",
+ * // "versionTemplate": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.create
* @memberOf! ()
*
@@ -1564,6 +2065,60 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.decrypt
* @desc Decrypts data that was protected by Encrypt. The CryptoKey.purpose must be ENCRYPT_DECRYPT.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.decrypt({
+ * // Required. The resource name of the CryptoKey to use for decryption.
+ * // The server will choose the appropriate version.
+ * name:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/my-cryptoKey',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "additionalAuthenticatedData": "my_additionalAuthenticatedData",
+ * // "ciphertext": "my_ciphertext"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "plaintext": "my_plaintext"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.decrypt
* @memberOf! ()
*
@@ -1639,6 +2194,64 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.encrypt
* @desc Encrypts data, so that it can only be recovered by a call to Decrypt. The CryptoKey.purpose must be ENCRYPT_DECRYPT.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.encrypt({
+ * // Required. The resource name of the CryptoKey or CryptoKeyVersion
+ * // to use for encryption.
+ * //
+ * // If a CryptoKey is specified, the server will use its
+ * // primary version.
+ * name:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/.*',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "additionalAuthenticatedData": "my_additionalAuthenticatedData",
+ * // "plaintext": "my_plaintext"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "ciphertext": "my_ciphertext",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.encrypt
* @memberOf! ()
*
@@ -1714,6 +2327,57 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.get
* @desc Returns metadata for a given CryptoKey, as well as its primary CryptoKeyVersion.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.get({
+ * // Required. The name of the CryptoKey to get.
+ * name:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/my-cryptoKey',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "nextRotationTime": "my_nextRotationTime",
+ * // "primary": {},
+ * // "purpose": "my_purpose",
+ * // "rotationPeriod": "my_rotationPeriod",
+ * // "versionTemplate": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.get
* @memberOf! ()
*
@@ -1785,6 +2449,65 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.getIamPolicy(
+ * {
+ * // Optional. The policy format version to be returned.
+ * //
+ * // Valid values are 0, 1, and 3. Requests specifying an invalid value will be
+ * // rejected.
+ * //
+ * // Requests for policies with any conditional bindings must specify version 3.
+ * // Policies without any conditional bindings may specify any valid value or
+ * // leave the field unset.
+ * 'options.requestedPolicyVersion': 'placeholder-value',
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/my-cryptoKey',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.getIamPolicy
* @memberOf! ()
*
@@ -1858,6 +2581,72 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.list
* @desc Lists CryptoKeys.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.list({
+ * // Optional. Only include resources that match the filter in the response. For
+ * // more information, see
+ * // [Sorting and filtering list
+ * // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ * filter: 'placeholder-value',
+ * // Optional. Specify how the results should be sorted. If not specified, the
+ * // results will be sorted in the default order. For more information, see
+ * // [Sorting and filtering list
+ * // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ * orderBy: 'placeholder-value',
+ * // Optional. Optional limit on the number of CryptoKeys to include in the
+ * // response. Further CryptoKeys can subsequently be obtained by
+ * // including the ListCryptoKeysResponse.next_page_token in a subsequent
+ * // request. If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // Optional. Optional pagination token, returned earlier via
+ * // ListCryptoKeysResponse.next_page_token.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name of the KeyRing to list, in the format
+ * // `projects/x/locations/x/keyRings/x`.
+ * parent: 'projects/my-project/locations/my-location/keyRings/my-keyRing',
+ * // The fields of the primary version to include in the response.
+ * versionView: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cryptoKeys": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "totalSize": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.list
* @memberOf! ()
*
@@ -1939,6 +2728,75 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.patch
* @desc Update a CryptoKey.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.patch({
+ * // Output only. The resource name for this CryptoKey in the format
+ * // `projects/x/locations/x/keyRings/x/cryptoKeys/x`.
+ * name:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/my-cryptoKey',
+ * // Required. List of fields to be updated in this request.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "nextRotationTime": "my_nextRotationTime",
+ * // "primary": {},
+ * // "purpose": "my_purpose",
+ * // "rotationPeriod": "my_rotationPeriod",
+ * // "versionTemplate": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "nextRotationTime": "my_nextRotationTime",
+ * // "primary": {},
+ * // "purpose": "my_purpose",
+ * // "rotationPeriod": "my_rotationPeriod",
+ * // "versionTemplate": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.patch
* @memberOf! ()
*
@@ -2012,6 +2870,65 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy. Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.setIamPolicy(
+ * {
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/my-cryptoKey',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {},
+ * // "updateMask": "my_updateMask"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.setIamPolicy
* @memberOf! ()
*
@@ -2085,6 +3002,61 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/my-cryptoKey',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.testIamPermissions
* @memberOf! ()
*
@@ -2167,6 +3139,67 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.updatePrimaryVersion
* @desc Update the version of a CryptoKey that will be used in Encrypt. Returns an error if called on an asymmetric key.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.updatePrimaryVersion(
+ * {
+ * // Required. The resource name of the CryptoKey to update.
+ * name:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/my-cryptoKey',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "cryptoKeyVersionId": "my_cryptoKeyVersionId"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "nextRotationTime": "my_nextRotationTime",
+ * // "primary": {},
+ * // "purpose": "my_purpose",
+ * // "rotationPeriod": "my_rotationPeriod",
+ * // "versionTemplate": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.updatePrimaryVersion
* @memberOf! ()
*
@@ -2443,6 +3476,61 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.asymmetricDecrypt
* @desc Decrypts data that was encrypted with a public key retrieved from GetPublicKey corresponding to a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_DECRYPT.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.asymmetricDecrypt(
+ * {
+ * // Required. The resource name of the CryptoKeyVersion to use for
+ * // decryption.
+ * name:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/my-cryptoKey/cryptoKeyVersions/my-cryptoKeyVersion',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "ciphertext": "my_ciphertext"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "plaintext": "my_plaintext"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.asymmetricDecrypt
* @memberOf! ()
*
@@ -2525,6 +3613,60 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.asymmetricSign
* @desc Signs data using a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_SIGN, producing a signature that can be verified with the public key retrieved from GetPublicKey.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.asymmetricSign(
+ * {
+ * // Required. The resource name of the CryptoKeyVersion to use for signing.
+ * name:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/my-cryptoKey/cryptoKeyVersions/my-cryptoKeyVersion',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "digest": {}
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "signature": "my_signature"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.asymmetricSign
* @memberOf! ()
*
@@ -2604,6 +3746,85 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create
* @desc Create a new CryptoKeyVersion in a CryptoKey. The server will assign the next sequential id. If unset, state will be set to ENABLED.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create(
+ * {
+ * // Required. The name of the CryptoKey associated with
+ * // the CryptoKeyVersions.
+ * parent:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/my-cryptoKey',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "algorithm": "my_algorithm",
+ * // "attestation": {},
+ * // "createTime": "my_createTime",
+ * // "destroyEventTime": "my_destroyEventTime",
+ * // "destroyTime": "my_destroyTime",
+ * // "externalProtectionLevelOptions": {},
+ * // "generateTime": "my_generateTime",
+ * // "importFailureReason": "my_importFailureReason",
+ * // "importJob": "my_importJob",
+ * // "importTime": "my_importTime",
+ * // "name": "my_name",
+ * // "protectionLevel": "my_protectionLevel",
+ * // "state": "my_state"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "algorithm": "my_algorithm",
+ * // "attestation": {},
+ * // "createTime": "my_createTime",
+ * // "destroyEventTime": "my_destroyEventTime",
+ * // "destroyTime": "my_destroyTime",
+ * // "externalProtectionLevelOptions": {},
+ * // "generateTime": "my_generateTime",
+ * // "importFailureReason": "my_importFailureReason",
+ * // "importJob": "my_importJob",
+ * // "importTime": "my_importTime",
+ * // "name": "my_name",
+ * // "protectionLevel": "my_protectionLevel",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create
* @memberOf! ()
*
@@ -2679,6 +3900,70 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy
* @desc Schedule a CryptoKeyVersion for destruction. Upon calling this method, CryptoKeyVersion.state will be set to DESTROY_SCHEDULED and destroy_time will be set to a time 24 hours in the future, at which point the state will be changed to DESTROYED, and the key material will be irrevocably destroyed. Before the destroy_time is reached, RestoreCryptoKeyVersion may be called to reverse the process.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy(
+ * {
+ * // Required. The resource name of the CryptoKeyVersion to destroy.
+ * name:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/my-cryptoKey/cryptoKeyVersions/my-cryptoKeyVersion',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "algorithm": "my_algorithm",
+ * // "attestation": {},
+ * // "createTime": "my_createTime",
+ * // "destroyEventTime": "my_destroyEventTime",
+ * // "destroyTime": "my_destroyTime",
+ * // "externalProtectionLevelOptions": {},
+ * // "generateTime": "my_generateTime",
+ * // "importFailureReason": "my_importFailureReason",
+ * // "importJob": "my_importJob",
+ * // "importTime": "my_importTime",
+ * // "name": "my_name",
+ * // "protectionLevel": "my_protectionLevel",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy
* @memberOf! ()
*
@@ -2754,6 +4039,64 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.get
* @desc Returns metadata for a given CryptoKeyVersion.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.get(
+ * {
+ * // Required. The name of the CryptoKeyVersion to get.
+ * name:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/my-cryptoKey/cryptoKeyVersions/my-cryptoKeyVersion',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "algorithm": "my_algorithm",
+ * // "attestation": {},
+ * // "createTime": "my_createTime",
+ * // "destroyEventTime": "my_destroyEventTime",
+ * // "destroyTime": "my_destroyTime",
+ * // "externalProtectionLevelOptions": {},
+ * // "generateTime": "my_generateTime",
+ * // "importFailureReason": "my_importFailureReason",
+ * // "importJob": "my_importJob",
+ * // "importTime": "my_importTime",
+ * // "name": "my_name",
+ * // "protectionLevel": "my_protectionLevel",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.get
* @memberOf! ()
*
@@ -2825,6 +4168,54 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.getPublicKey
* @desc Returns the public key for the given CryptoKeyVersion. The CryptoKey.purpose must be ASYMMETRIC_SIGN or ASYMMETRIC_DECRYPT.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.getPublicKey(
+ * {
+ * // Required. The name of the CryptoKeyVersion public key to
+ * // get.
+ * name:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/my-cryptoKey/cryptoKeyVersions/my-cryptoKeyVersion',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "algorithm": "my_algorithm",
+ * // "pem": "my_pem"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.getPublicKey
* @memberOf! ()
*
@@ -2899,6 +4290,75 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.import
* @desc Imports a new CryptoKeyVersion into an existing CryptoKey using the wrapped key material provided in the request. The version ID will be assigned the next sequential id within the CryptoKey.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.import(
+ * {
+ * // Required. The name of the CryptoKey to
+ * // be imported into.
+ * parent:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/my-cryptoKey',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "algorithm": "my_algorithm",
+ * // "importJob": "my_importJob",
+ * // "rsaAesWrappedKey": "my_rsaAesWrappedKey"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "algorithm": "my_algorithm",
+ * // "attestation": {},
+ * // "createTime": "my_createTime",
+ * // "destroyEventTime": "my_destroyEventTime",
+ * // "destroyTime": "my_destroyTime",
+ * // "externalProtectionLevelOptions": {},
+ * // "generateTime": "my_generateTime",
+ * // "importFailureReason": "my_importFailureReason",
+ * // "importJob": "my_importJob",
+ * // "importTime": "my_importTime",
+ * // "name": "my_name",
+ * // "protectionLevel": "my_protectionLevel",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.import
* @memberOf! ()
*
@@ -2974,6 +4434,76 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list
* @desc Lists CryptoKeyVersions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list(
+ * {
+ * // Optional. Only include resources that match the filter in the response. For
+ * // more information, see
+ * // [Sorting and filtering list
+ * // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ * filter: 'placeholder-value',
+ * // Optional. Specify how the results should be sorted. If not specified, the
+ * // results will be sorted in the default order. For more information, see
+ * // [Sorting and filtering list
+ * // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ * orderBy: 'placeholder-value',
+ * // Optional. Optional limit on the number of CryptoKeyVersions to
+ * // include in the response. Further CryptoKeyVersions can
+ * // subsequently be obtained by including the
+ * // ListCryptoKeyVersionsResponse.next_page_token in a subsequent request.
+ * // If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // Optional. Optional pagination token, returned earlier via
+ * // ListCryptoKeyVersionsResponse.next_page_token.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name of the CryptoKey to list, in the format
+ * // `projects/x/locations/x/keyRings/x/cryptoKeys/x`.
+ * parent:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/my-cryptoKey',
+ * // The fields to include in the response.
+ * view: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cryptoKeyVersions": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "totalSize": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list
* @memberOf! ()
*
@@ -3062,6 +4592,87 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.patch
* @desc Update a CryptoKeyVersion's metadata. state may be changed between ENABLED and DISABLED using this method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to move between other states.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.patch(
+ * {
+ * // Output only. The resource name for this CryptoKeyVersion in the format
+ * // `projects/x/locations/x/keyRings/x/cryptoKeys/x/cryptoKeyVersions/x`.
+ * name:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/my-cryptoKey/cryptoKeyVersions/my-cryptoKeyVersion',
+ * // Required. List of fields to be updated in this request.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "algorithm": "my_algorithm",
+ * // "attestation": {},
+ * // "createTime": "my_createTime",
+ * // "destroyEventTime": "my_destroyEventTime",
+ * // "destroyTime": "my_destroyTime",
+ * // "externalProtectionLevelOptions": {},
+ * // "generateTime": "my_generateTime",
+ * // "importFailureReason": "my_importFailureReason",
+ * // "importJob": "my_importJob",
+ * // "importTime": "my_importTime",
+ * // "name": "my_name",
+ * // "protectionLevel": "my_protectionLevel",
+ * // "state": "my_state"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "algorithm": "my_algorithm",
+ * // "attestation": {},
+ * // "createTime": "my_createTime",
+ * // "destroyEventTime": "my_destroyEventTime",
+ * // "destroyTime": "my_destroyTime",
+ * // "externalProtectionLevelOptions": {},
+ * // "generateTime": "my_generateTime",
+ * // "importFailureReason": "my_importFailureReason",
+ * // "importJob": "my_importJob",
+ * // "importTime": "my_importTime",
+ * // "name": "my_name",
+ * // "protectionLevel": "my_protectionLevel",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.patch
* @memberOf! ()
*
@@ -3135,6 +4746,70 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore
* @desc Restore a CryptoKeyVersion in the DESTROY_SCHEDULED state. Upon restoration of the CryptoKeyVersion, state will be set to DISABLED, and destroy_time will be cleared.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore(
+ * {
+ * // Required. The resource name of the CryptoKeyVersion to restore.
+ * name:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/cryptoKeys/my-cryptoKey/cryptoKeyVersions/my-cryptoKeyVersion',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "algorithm": "my_algorithm",
+ * // "attestation": {},
+ * // "createTime": "my_createTime",
+ * // "destroyEventTime": "my_destroyEventTime",
+ * // "destroyTime": "my_destroyTime",
+ * // "externalProtectionLevelOptions": {},
+ * // "generateTime": "my_generateTime",
+ * // "importFailureReason": "my_importFailureReason",
+ * // "importJob": "my_importJob",
+ * // "importTime": "my_importTime",
+ * // "name": "my_name",
+ * // "protectionLevel": "my_protectionLevel",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore
* @memberOf! ()
*
@@ -3397,6 +5072,79 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.importJobs.create
* @desc Create a new ImportJob within a KeyRing. ImportJob.import_method is required.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.importJobs.create({
+ * // Required. It must be unique within a KeyRing and match the regular
+ * // expression `[a-zA-Z0-9_-]{1,63}`
+ * importJobId: 'placeholder-value',
+ * // Required. The name of the KeyRing associated with the
+ * // ImportJobs.
+ * parent: 'projects/my-project/locations/my-location/keyRings/my-keyRing',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attestation": {},
+ * // "createTime": "my_createTime",
+ * // "expireEventTime": "my_expireEventTime",
+ * // "expireTime": "my_expireTime",
+ * // "generateTime": "my_generateTime",
+ * // "importMethod": "my_importMethod",
+ * // "name": "my_name",
+ * // "protectionLevel": "my_protectionLevel",
+ * // "publicKey": {},
+ * // "state": "my_state"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestation": {},
+ * // "createTime": "my_createTime",
+ * // "expireEventTime": "my_expireEventTime",
+ * // "expireTime": "my_expireTime",
+ * // "generateTime": "my_generateTime",
+ * // "importMethod": "my_importMethod",
+ * // "name": "my_name",
+ * // "protectionLevel": "my_protectionLevel",
+ * // "publicKey": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.importJobs.create
* @memberOf! ()
*
@@ -3473,6 +5221,59 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.importJobs.get
* @desc Returns metadata for a given ImportJob.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.importJobs.get({
+ * // Required. The name of the ImportJob to get.
+ * name:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/importJobs/my-importJob',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestation": {},
+ * // "createTime": "my_createTime",
+ * // "expireEventTime": "my_expireEventTime",
+ * // "expireTime": "my_expireTime",
+ * // "generateTime": "my_generateTime",
+ * // "importMethod": "my_importMethod",
+ * // "name": "my_name",
+ * // "protectionLevel": "my_protectionLevel",
+ * // "publicKey": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.importJobs.get
* @memberOf! ()
*
@@ -3544,6 +5345,65 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.importJobs.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.importJobs.getIamPolicy(
+ * {
+ * // Optional. The policy format version to be returned.
+ * //
+ * // Valid values are 0, 1, and 3. Requests specifying an invalid value will be
+ * // rejected.
+ * //
+ * // Requests for policies with any conditional bindings must specify version 3.
+ * // Policies without any conditional bindings may specify any valid value or
+ * // leave the field unset.
+ * 'options.requestedPolicyVersion': 'placeholder-value',
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/importJobs/my-importJob',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.importJobs.getIamPolicy
* @memberOf! ()
*
@@ -3617,6 +5477,70 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.importJobs.list
* @desc Lists ImportJobs.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.importJobs.list({
+ * // Optional. Only include resources that match the filter in the response. For
+ * // more information, see
+ * // [Sorting and filtering list
+ * // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ * filter: 'placeholder-value',
+ * // Optional. Specify how the results should be sorted. If not specified, the
+ * // results will be sorted in the default order. For more information, see
+ * // [Sorting and filtering list
+ * // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ * orderBy: 'placeholder-value',
+ * // Optional. Optional limit on the number of ImportJobs to include in the
+ * // response. Further ImportJobs can subsequently be obtained by
+ * // including the ListImportJobsResponse.next_page_token in a subsequent
+ * // request. If unspecified, the server will pick an appropriate default.
+ * pageSize: 'placeholder-value',
+ * // Optional. Optional pagination token, returned earlier via
+ * // ListImportJobsResponse.next_page_token.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name of the KeyRing to list, in the format
+ * // `projects/x/locations/x/keyRings/x`.
+ * parent: 'projects/my-project/locations/my-location/keyRings/my-keyRing',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "importJobs": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "totalSize": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.importJobs.list
* @memberOf! ()
*
@@ -3697,6 +5621,65 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.importJobs.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy. Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.importJobs.setIamPolicy(
+ * {
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/importJobs/my-importJob',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {},
+ * // "updateMask": "my_updateMask"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.importJobs.setIamPolicy
* @memberOf! ()
*
@@ -3770,6 +5753,61 @@ export namespace cloudkms_v1 {
/**
* cloudkms.projects.locations.keyRings.importJobs.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudkms.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudkms = google.cloudkms('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloudkms',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudkms.projects.locations.keyRings.importJobs.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/keyRings/my-keyRing/importJobs/my-importJob',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudkms.projects.locations.keyRings.importJobs.testIamPermissions
* @memberOf! ()
*
diff --git a/src/apis/cloudprofiler/v2.ts b/src/apis/cloudprofiler/v2.ts
index 9b91f641964..ffb077dd95b 100644
--- a/src/apis/cloudprofiler/v2.ts
+++ b/src/apis/cloudprofiler/v2.ts
@@ -191,6 +191,64 @@ export namespace cloudprofiler_v2 {
/**
* cloudprofiler.projects.profiles.create
* @desc CreateProfile creates a new profile resource in the online mode. The server ensures that the new profiles are created at a constant rate per deployment, so the creation request may hang for some time until the next profile session is available. The request may fail with ABORTED error if the creation is not available within ~1m, the response will indicate the duration of the backoff the client should take before attempting creating a profile again. The backoff duration is returned in google.rpc.RetryInfo extension on the response status. To a gRPC client, the extension will be return as a binary-serialized proto in the trailing metadata item named "google.rpc.retryinfo-bin".
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudprofiler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudprofiler = google.cloudprofiler('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/monitoring',
+ * 'https://www.googleapis.com/auth/monitoring.write',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudprofiler.projects.profiles.create({
+ * // Parent project to create the profile in.
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deployment": {},
+ * // "profileType": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deployment": {},
+ * // "duration": "my_duration",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "profileBytes": "my_profileBytes",
+ * // "profileType": "my_profileType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudprofiler.projects.profiles.create
* @memberOf! ()
*
@@ -265,6 +323,68 @@ export namespace cloudprofiler_v2 {
/**
* cloudprofiler.projects.profiles.createOffline
* @desc CreateOfflineProfile creates a new profile resource in the offline mode. The client provides the profile to create along with the profile bytes, the server records it.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudprofiler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudprofiler = google.cloudprofiler('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/monitoring',
+ * 'https://www.googleapis.com/auth/monitoring.write',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudprofiler.projects.profiles.createOffline({
+ * // Parent project to create the profile in.
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deployment": {},
+ * // "duration": "my_duration",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "profileBytes": "my_profileBytes",
+ * // "profileType": "my_profileType"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deployment": {},
+ * // "duration": "my_duration",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "profileBytes": "my_profileBytes",
+ * // "profileType": "my_profileType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudprofiler.projects.profiles.createOffline
* @memberOf! ()
*
@@ -339,6 +459,73 @@ export namespace cloudprofiler_v2 {
/**
* cloudprofiler.projects.profiles.patch
* @desc UpdateProfile updates the profile bytes and labels on the profile resource created in the online mode. Updating the bytes for profiles created in the offline mode is currently not supported: the profile content must be provided at the time of the profile creation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudprofiler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudprofiler = google.cloudprofiler('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/monitoring',
+ * 'https://www.googleapis.com/auth/monitoring.write',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudprofiler.projects.profiles.patch({
+ * // Output only. Opaque, server-assigned, unique ID for this profile.
+ * name: 'projects/my-project/profiles/my-profile',
+ * // Field mask used to specify the fields to be overwritten. Currently only
+ * // profile_bytes and labels fields are supported by UpdateProfile, so only
+ * // those fields can be specified in the mask. When no mask is provided, all
+ * // fields are overwritten.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deployment": {},
+ * // "duration": "my_duration",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "profileBytes": "my_profileBytes",
+ * // "profileType": "my_profileType"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deployment": {},
+ * // "duration": "my_duration",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "profileBytes": "my_profileBytes",
+ * // "profileType": "my_profileType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudprofiler.projects.profiles.patch
* @memberOf! ()
*
diff --git a/src/apis/cloudresourcemanager/v1.ts b/src/apis/cloudresourcemanager/v1.ts
index 04f68306663..b250a838429 100644
--- a/src/apis/cloudresourcemanager/v1.ts
+++ b/src/apis/cloudresourcemanager/v1.ts
@@ -763,52 +763,52 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.folders.clearOrgPolicy
* @desc Clears a `Policy` from a resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Name of the resource for the `Policy` to clear.
- * resource_: 'folders/my-folder', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.clearOrgPolicy({
+ * // Name of the resource for the `Policy` to clear.
+ * resource: 'folders/my-folder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "constraint": "my_constraint",
+ * // "etag": "my_etag"
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
+ * // Example response
+ * // {}
+ * }
*
- * cloudResourceManager.folders.clearOrgPolicy(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.folders.clearOrgPolicy
* @memberOf! ()
*
@@ -884,55 +884,62 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.folders.getEffectiveOrgPolicy
* @desc Gets the effective `Policy` on a resource. This is the result of merging `Policies` in the resource hierarchy. The returned `Policy` will not have an `etag`set because it is a computed `Policy` across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // The name of the resource to start computing the effective `Policy`.
- * resource_: 'folders/my-folder', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.getEffectiveOrgPolicy({
+ * // The name of the resource to start computing the effective `Policy`.
+ * resource: 'folders/my-folder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "constraint": "my_constraint"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.folders.getEffectiveOrgPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "booleanPolicy": {},
+ * // "constraint": "my_constraint",
+ * // "etag": "my_etag",
+ * // "listPolicy": {},
+ * // "restoreDefault": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.folders.getEffectiveOrgPolicy
* @memberOf! ()
*
@@ -1012,55 +1019,62 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.folders.getOrgPolicy
* @desc Gets a `Policy` on a resource. If no `Policy` is set on the resource, a `Policy` is returned with default values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The `etag` value can be used with `SetOrgPolicy()` to create or update a `Policy` during read-modify-write.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Name of the resource the `Policy` is set on.
- * resource_: 'folders/my-folder', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.getOrgPolicy({
+ * // Name of the resource the `Policy` is set on.
+ * resource: 'folders/my-folder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "constraint": "my_constraint"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.folders.getOrgPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "booleanPolicy": {},
+ * // "constraint": "my_constraint",
+ * // "etag": "my_etag",
+ * // "listPolicy": {},
+ * // "restoreDefault": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.folders.getOrgPolicy
* @memberOf! ()
*
@@ -1138,68 +1152,60 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.folders.listAvailableOrgPolicyConstraints
* @desc Lists `Constraints` that could be applied on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Name of the resource to list `Constraints` for.
- * resource_: 'folders/my-folder', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var constraintsPage = response['constraints'];
- * if (!constraintsPage) {
- * return;
- * }
- * for (var i = 0; i < constraintsPage.length; i++) {
- * // TODO: Change code below to process each resource in `constraintsPage`:
- * console.log(JSON.stringify(constraintsPage[i], null, 2));
- * }
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * if (response.nextPageToken) {
- * request.resource.pageToken = response.nextPageToken;
- * cloudResourceManager.folders.listAvailableOrgPolicyConstraints(request, handlePage);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.listAvailableOrgPolicyConstraints(
+ * {
+ * // Name of the resource to list `Constraints` for.
+ * resource: 'folders/my-folder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "pageSize": 0,
+ * // "pageToken": "my_pageToken"
+ * // }
+ * },
* }
- * };
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "constraints": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
*
- * cloudResourceManager.folders.listAvailableOrgPolicyConstraints(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.folders.listAvailableOrgPolicyConstraints
* @memberOf! ()
*
@@ -1299,68 +1305,58 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.folders.listOrgPolicies
* @desc Lists all the `Policies` set for a particular resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Name of the resource to list Policies for.
- * resource_: 'folders/my-folder', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.listOrgPolicies({
+ * // Name of the resource to list Policies for.
+ * resource: 'folders/my-folder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "pageSize": 0,
+ * // "pageToken": "my_pageToken"
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var policiesPage = response['policies'];
- * if (!policiesPage) {
- * return;
- * }
- * for (var i = 0; i < policiesPage.length; i++) {
- * // TODO: Change code below to process each resource in `policiesPage`:
- * console.log(JSON.stringify(policiesPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.resource.pageToken = response.nextPageToken;
- * cloudResourceManager.folders.listOrgPolicies(request, handlePage);
- * }
- * };
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "policies": []
+ * // }
+ * }
*
- * cloudResourceManager.folders.listOrgPolicies(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.folders.listOrgPolicies
* @memberOf! ()
*
@@ -1442,55 +1438,59 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.folders.setOrgPolicy
* @desc Updates the specified `Policy` on the resource. Creates a new `Policy` for that `Constraint` on the resource if one does not exist. Not supplying an `etag` on the request `Policy` results in an unconditional write of the `Policy`.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Resource name of the resource to attach the `Policy`.
- * resource_: 'folders/my-folder', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudResourceManager.folders.setOrgPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.setOrgPolicy({
+ * // Resource name of the resource to attach the `Policy`.
+ * resource: 'folders/my-folder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "booleanPolicy": {},
+ * // "constraint": "my_constraint",
+ * // "etag": "my_etag",
+ * // "listPolicy": {},
+ * // "restoreDefault": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.folders.setOrgPolicy
* @memberOf! ()
*
@@ -1678,52 +1678,63 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.liens.create
* @desc Create a Lien which applies to the resource denoted by the `parent` field. Callers of this method will require permission on the `parent` resource. For example, applying to `projects/1234` requires permission `resourcemanager.projects.updateLiens`. NOTE: Some resources may limit the number of Liens which may be applied.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.liens.create({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "name": "my_name",
+ * // "origin": "my_origin",
+ * // "parent": "my_parent",
+ * // "reason": "my_reason",
+ * // "restrictions": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.liens.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "name": "my_name",
+ * // "origin": "my_origin",
+ * // "parent": "my_parent",
+ * // "reason": "my_reason",
+ * // "restrictions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.liens.create
* @memberOf! ()
*
@@ -1794,48 +1805,46 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.liens.delete
* @desc Delete a Lien by `name`. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission `resourcemanager.projects.updateLiens`.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The name/identifier of the Lien to delete.
- * name: 'liens/my-lien', // TODO: Update placeholder value.
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudResourceManager.liens.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudresourcemanager.liens.delete({
+ * // Required. The name/identifier of the Lien to delete.
+ * name: 'liens/.*',
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {}
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.liens.delete
* @memberOf! ()
*
@@ -1906,51 +1915,53 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.liens.get
* @desc Retrieve a Lien by `name`. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission requires permission `resourcemanager.projects.get` or `resourcemanager.projects.updateLiens`.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The name/identifier of the Lien.
- * name: 'liens/my-lien', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * cloudResourceManager.liens.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudresourcemanager.liens.get({
+ * // Required. The name/identifier of the Lien.
+ * name: 'liens/.*',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "name": "my_name",
+ * // "origin": "my_origin",
+ * // "parent": "my_parent",
+ * // "reason": "my_reason",
+ * // "restrictions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.liens.get
* @memberOf! ()
*
@@ -2021,61 +2032,58 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.liens.list
* @desc List all Liens applied to the `parent` resource. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission `resourcemanager.projects.get`.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * var liensPage = response['liens'];
- * if (!liensPage) {
- * return;
- * }
- * for (var i = 0; i < liensPage.length; i++) {
- * // TODO: Change code below to process each resource in `liensPage`:
- * console.log(JSON.stringify(liensPage[i], null, 2));
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.liens.list({
+ * // The maximum number of items to return. This is a suggestion for the server.
+ * pageSize: 'placeholder-value',
+ * // The `next_page_token` value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // Required. The name of the resource to list all attached Liens.
+ * // For example, `projects/1234`.
+ * //
+ * // (google.api.field_policy).resource_type annotation is not set since the
+ * // parent depends on the meta api implementation. This field could be a
+ * // project or other sub project resources.
+ * parent: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudResourceManager.liens.list(request, handlePage);
- * }
- * };
+ * // Example response
+ * // {
+ * // "liens": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
*
- * cloudResourceManager.liens.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.liens.list
* @memberOf! ()
*
@@ -2210,51 +2218,52 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The name of the operation resource.
- * name: 'operations/my-operation', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * cloudResourceManager.operations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudresourcemanager.operations.get({
+ * // The name of the operation resource.
+ * name: 'operations/.*',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.operations.get
* @memberOf! ()
*
@@ -2346,52 +2355,52 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.organizations.clearOrgPolicy
* @desc Clears a `Policy` from a resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Name of the resource for the `Policy` to clear.
- * resource_: 'organizations/my-organization', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await cloudresourcemanager.organizations.clearOrgPolicy({
+ * // Name of the resource for the `Policy` to clear.
+ * resource: 'organizations/my-organization',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "constraint": "my_constraint",
+ * // "etag": "my_etag"
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
+ * // Example response
+ * // {}
+ * }
*
- * cloudResourceManager.organizations.clearOrgPolicy(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.organizations.clearOrgPolicy
* @memberOf! ()
*
@@ -2467,53 +2476,54 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.organizations.get
* @desc Fetches an Organization resource identified by the specified resource name.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.organizations.get({
* // The resource name of the Organization to fetch. This is the organization's
* // relative path in the API, formatted as "organizations/[organizationId]".
* // For example, "organizations/1234".
- * name: 'organizations/my-organization', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.organizations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * name: 'organizations/my-organization',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "displayName": "my_displayName",
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "owner": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.organizations.get
* @memberOf! ()
*
@@ -2587,55 +2597,62 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.organizations.getEffectiveOrgPolicy
* @desc Gets the effective `Policy` on a resource. This is the result of merging `Policies` in the resource hierarchy. The returned `Policy` will not have an `etag`set because it is a computed `Policy` across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // The name of the resource to start computing the effective `Policy`.
- * resource_: 'organizations/my-organization', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await cloudresourcemanager.organizations.getEffectiveOrgPolicy({
+ * // The name of the resource to start computing the effective `Policy`.
+ * resource: 'organizations/my-organization',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "constraint": "my_constraint"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.organizations.getEffectiveOrgPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "booleanPolicy": {},
+ * // "constraint": "my_constraint",
+ * // "etag": "my_etag",
+ * // "listPolicy": {},
+ * // "restoreDefault": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.organizations.getEffectiveOrgPolicy
* @memberOf! ()
*
@@ -2715,56 +2732,60 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.organizations.getIamPolicy
* @desc Gets the access control policy for an Organization resource. May be empty if no such policy or resource exists. The `resource` field should be the organization's resource name, e.g. "organizations/123". Authorization requires the Google IAM permission `resourcemanager.organizations.getIamPolicy` on the specified organization
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudresourcemanager.organizations.getIamPolicy({
* // REQUIRED: The resource for which the policy is being requested.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'organizations/my-organization', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'organizations/my-organization',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.organizations.getIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.organizations.getIamPolicy
* @memberOf! ()
*
@@ -2840,55 +2861,62 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.organizations.getOrgPolicy
* @desc Gets a `Policy` on a resource. If no `Policy` is set on the resource, a `Policy` is returned with default values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The `etag` value can be used with `SetOrgPolicy()` to create or update a `Policy` during read-modify-write.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Name of the resource the `Policy` is set on.
- * resource_: 'organizations/my-organization', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await cloudresourcemanager.organizations.getOrgPolicy({
+ * // Name of the resource the `Policy` is set on.
+ * resource: 'organizations/my-organization',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "constraint": "my_constraint"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.organizations.getOrgPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "booleanPolicy": {},
+ * // "constraint": "my_constraint",
+ * // "etag": "my_etag",
+ * // "listPolicy": {},
+ * // "restoreDefault": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.organizations.getOrgPolicy
* @memberOf! ()
*
@@ -2966,68 +2994,60 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints
* @desc Lists `Constraints` that could be applied on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Name of the resource to list `Constraints` for.
- * resource_: 'organizations/my-organization', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var constraintsPage = response['constraints'];
- * if (!constraintsPage) {
- * return;
- * }
- * for (var i = 0; i < constraintsPage.length; i++) {
- * // TODO: Change code below to process each resource in `constraintsPage`:
- * console.log(JSON.stringify(constraintsPage[i], null, 2));
- * }
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * if (response.nextPageToken) {
- * request.resource.pageToken = response.nextPageToken;
- * cloudResourceManager.organizations.listAvailableOrgPolicyConstraints(request, handlePage);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints(
+ * {
+ * // Name of the resource to list `Constraints` for.
+ * resource: 'organizations/my-organization',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "pageSize": 0,
+ * // "pageToken": "my_pageToken"
+ * // }
+ * },
* }
- * };
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "constraints": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
*
- * cloudResourceManager.organizations.listAvailableOrgPolicyConstraints(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints
* @memberOf! ()
*
@@ -3127,68 +3147,58 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.organizations.listOrgPolicies
* @desc Lists all the `Policies` set for a particular resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Name of the resource to list Policies for.
- * resource_: 'organizations/my-organization', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await cloudresourcemanager.organizations.listOrgPolicies({
+ * // Name of the resource to list Policies for.
+ * resource: 'organizations/my-organization',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "pageSize": 0,
+ * // "pageToken": "my_pageToken"
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var policiesPage = response['policies'];
- * if (!policiesPage) {
- * return;
- * }
- * for (var i = 0; i < policiesPage.length; i++) {
- * // TODO: Change code below to process each resource in `policiesPage`:
- * console.log(JSON.stringify(policiesPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.resource.pageToken = response.nextPageToken;
- * cloudResourceManager.organizations.listOrgPolicies(request, handlePage);
- * }
- * };
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "policies": []
+ * // }
+ * }
*
- * cloudResourceManager.organizations.listOrgPolicies(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.organizations.listOrgPolicies
* @memberOf! ()
*
@@ -3270,65 +3280,56 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.organizations.search
* @desc Searches Organization resources that are visible to the user and satisfy the specified filter. This method returns Organizations in an unspecified order. New Organizations do not necessarily appear at the end of the results. Search will only return organizations on which the user has the permission `resourcemanager.organizations.get`
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.organizations.search({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "filter": "my_filter",
+ * // "pageSize": 0,
+ * // "pageToken": "my_pageToken"
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var organizationsPage = response['organizations'];
- * if (!organizationsPage) {
- * return;
- * }
- * for (var i = 0; i < organizationsPage.length; i++) {
- * // TODO: Change code below to process each resource in `organizationsPage`:
- * console.log(JSON.stringify(organizationsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.resource.pageToken = response.nextPageToken;
- * cloudResourceManager.organizations.search(request, handlePage);
- * }
- * };
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "organizations": []
+ * // }
+ * }
*
- * cloudResourceManager.organizations.search(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.organizations.search
* @memberOf! ()
*
@@ -3412,56 +3413,58 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.organizations.setIamPolicy
* @desc Sets the access control policy on an Organization resource. Replaces any existing policy. The `resource` field should be the organization's resource name, e.g. "organizations/123". Authorization requires the Google IAM permission `resourcemanager.organizations.setIamPolicy` on the specified organization
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
*
- * authorize(function(authClient) {
- * var request = {
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.organizations.setIamPolicy({
* // REQUIRED: The resource for which the policy is being specified.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'organizations/my-organization', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'organizations/my-organization',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {},
+ * // "updateMask": "my_updateMask"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.organizations.setIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.organizations.setIamPolicy
* @memberOf! ()
*
@@ -3537,55 +3540,59 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.organizations.setOrgPolicy
* @desc Updates the specified `Policy` on the resource. Creates a new `Policy` for that `Constraint` on the resource if one does not exist. Not supplying an `etag` on the request `Policy` results in an unconditional write of the `Policy`.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Resource name of the resource to attach the `Policy`.
- * resource_: 'organizations/my-organization', // TODO: Update placeholder value.
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudResourceManager.organizations.setOrgPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudresourcemanager.organizations.setOrgPolicy({
+ * // Resource name of the resource to attach the `Policy`.
+ * resource: 'organizations/my-organization',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "booleanPolicy": {},
+ * // "constraint": "my_constraint",
+ * // "etag": "my_etag",
+ * // "listPolicy": {},
+ * // "restoreDefault": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.organizations.setOrgPolicy
* @memberOf! ()
*
@@ -3663,56 +3670,57 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.organizations.testIamPermissions
* @desc Returns permissions that a caller has on the specified Organization. The `resource` field should be the organization's resource name, e.g. "organizations/123". There are no permissions required for making this API call.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudresourcemanager.organizations.testIamPermissions({
* // REQUIRED: The resource for which the policy detail is being requested.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'organizations/my-organization', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'organizations/my-organization',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * cloudResourceManager.organizations.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.organizations.testIamPermissions
* @memberOf! ()
*
@@ -3982,52 +3990,52 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.projects.clearOrgPolicy
* @desc Clears a `Policy` from a resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Name of the resource for the `Policy` to clear.
- * resource_: 'projects/my-project', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.clearOrgPolicy({
+ * // Name of the resource for the `Policy` to clear.
+ * resource: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "constraint": "my_constraint",
+ * // "etag": "my_etag"
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
+ * // Example response
+ * // {}
+ * }
*
- * cloudResourceManager.projects.clearOrgPolicy(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.clearOrgPolicy
* @memberOf! ()
*
@@ -4103,52 +4111,60 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.projects.create
* @desc Request that a new Project be created. The result is an Operation which can be used to track the creation process. This process usually takes a few seconds, but can sometimes take much longer. The tracking Operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. Authorization requires the Google IAM permission `resourcemanager.projects.create` on the specified parent for the new project. The parent is identified by a specified ResourceId, which must include both an ID and a type, such as organization. This method does not associate the new project with a billing account. You can set or update the billing account associated with a project using the [`projects.updateBillingInfo`] (/billing/reference/rest/v1/projects/updateBillingInfo) method.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
*
- * auth: authClient,
- * };
- *
- * cloudResourceManager.projects.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
- * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.create({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": {},
+ * // "projectId": "my_projectId",
+ * // "projectNumber": "my_projectNumber"
+ * // }
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.projects.create
* @memberOf! ()
*
@@ -4221,49 +4237,45 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.projects.delete
* @desc Marks the Project identified by the specified `project_id` (for example, `my-project-123`) for deletion. This method will only affect the Project if it has a lifecycle state of ACTIVE. This method changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the Project is no longer accessible. Until the deletion completes, you can check the lifecycle state checked by retrieving the Project with GetProject, and the Project remains visible to ListProjects. However, you cannot update the project. After the deletion completes, the Project is not retrievable by the GetProject and ListProjects methods. The caller must have modify permissions for this Project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.delete({
* // The Project ID (for example, `foo-bar-123`).
+ * //
* // Required.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
+ * // Example response
+ * // {}
+ * }
*
- * cloudResourceManager.projects.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.delete
* @memberOf! ()
*
@@ -4337,52 +4349,56 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.projects.get
* @desc Retrieves the Project identified by the specified `project_id` (for example, `my-project-123`). The caller must have read permissions for this Project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.get({
* // The Project ID (for example, `my-project-123`).
+ * //
* // Required.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.projects.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * projectId: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": {},
+ * // "projectId": "my_projectId",
+ * // "projectNumber": "my_projectNumber"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.get
* @memberOf! ()
*
@@ -4456,56 +4472,56 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.projects.getAncestry
* @desc Gets a list of ancestors in the resource hierarchy for the Project identified by the specified `project_id` (for example, `my-project-123`). The caller must have read permissions for this Project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.getAncestry({
* // The Project ID (for example, `my-project-123`).
+ * //
* // Required.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * projectId: 'placeholder-value',
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * cloudResourceManager.projects.getAncestry(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "ancestor": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.getAncestry
* @memberOf! ()
*
@@ -4585,55 +4601,62 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.projects.getEffectiveOrgPolicy
* @desc Gets the effective `Policy` on a resource. This is the result of merging `Policies` in the resource hierarchy. The returned `Policy` will not have an `etag`set because it is a computed `Policy` across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // The name of the resource to start computing the effective `Policy`.
- * resource_: 'projects/my-project', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.getEffectiveOrgPolicy({
+ * // The name of the resource to start computing the effective `Policy`.
+ * resource: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "constraint": "my_constraint"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.projects.getEffectiveOrgPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "booleanPolicy": {},
+ * // "constraint": "my_constraint",
+ * // "etag": "my_etag",
+ * // "listPolicy": {},
+ * // "restoreDefault": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.getEffectiveOrgPolicy
* @memberOf! ()
*
@@ -4713,56 +4736,60 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.projects.getIamPolicy
* @desc Returns the IAM access control policy for the specified Project. Permission is denied if the policy or the resource does not exist. Authorization requires the Google IAM permission `resourcemanager.projects.getIamPolicy` on the project. For additional information about resource structure and identification, see [Resource Names](/apis/design/resource_names).
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.getIamPolicy({
* // REQUIRED: The resource for which the policy is being requested.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.projects.getIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.getIamPolicy
* @memberOf! ()
*
@@ -4838,55 +4865,62 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.projects.getOrgPolicy
* @desc Gets a `Policy` on a resource. If no `Policy` is set on the resource, a `Policy` is returned with default values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The `etag` value can be used with `SetOrgPolicy()` to create or update a `Policy` during read-modify-write.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Name of the resource the `Policy` is set on.
- * resource_: 'projects/my-project', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.getOrgPolicy({
+ * // Name of the resource the `Policy` is set on.
+ * resource: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "constraint": "my_constraint"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.projects.getOrgPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "booleanPolicy": {},
+ * // "constraint": "my_constraint",
+ * // "etag": "my_etag",
+ * // "listPolicy": {},
+ * // "restoreDefault": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.getOrgPolicy
* @memberOf! ()
*
@@ -4964,61 +4998,92 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.projects.list
* @desc Lists Projects that the caller has the `resourcemanager.projects.get` permission on and satisfy the specified filter. This method returns Projects in an unspecified order. This method is eventually consistent with project mutations; this means that a newly created project may not appear in the results or recent updates to an existing project may not be reflected in the results. To retrieve the latest state of a project, use the GetProject method. NOTE: If the request filter contains a `parent.type` and `parent.id` and the caller has the `resourcemanager.projects.list` permission on the parent, the results will be drawn from an alternate index which provides more consistent results. In future versions of this API, this List method will be split into List and Search to properly capture the behavorial difference.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * var projectsPage = response['projects'];
- * if (!projectsPage) {
- * return;
- * }
- * for (var i = 0; i < projectsPage.length; i++) {
- * // TODO: Change code below to process each resource in `projectsPage`:
- * console.log(JSON.stringify(projectsPage[i], null, 2));
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.list({
+ * // An expression for filtering the results of the request. Filter rules are
+ * // case insensitive. The fields eligible for filtering are:
+ * //
+ * // + `name`
+ * // + `id`
+ * // + `labels.` (where *key* is the name of a label)
+ * // + `parent.type`
+ * // + `parent.id`
+ * //
+ * // Some examples of using labels as filters:
+ * //
+ * // | Filter | Description |
+ * // |------------------|-----------------------------------------------------|
+ * // | name:how* | The project's name starts with "how". |
+ * // | name:Howl | The project's name is `Howl` or `howl`. |
+ * // | name:HOWL | Equivalent to above. |
+ * // | NAME:howl | Equivalent to above. |
+ * // | labels.color:* | The project has the label `color`. |
+ * // | labels.color:red | The project's label `color` has the value `red`. |
+ * // | labels.color:red labels.size:big |The project's label `color` has
+ * // the value `red` and its label `size` has the value `big`. |
+ * //
+ * // If no filter is specified, the call will return projects for which the user
+ * // has the `resourcemanager.projects.get` permission.
+ * //
+ * // NOTE: To perform a by-parent query (eg., what projects are directly in a
+ * // Folder), the caller must have the `resourcemanager.projects.list`
+ * // permission on the parent and the filter must contain both a `parent.type`
+ * // and a `parent.id` restriction
+ * // (example: "parent.type:folder parent.id:123"). In this case an alternate
+ * // search index is used which provides more consistent results.
+ * //
+ * // Optional.
+ * filter: 'placeholder-value',
+ * // The maximum number of Projects to return in the response.
+ * // The server can return fewer Projects than requested.
+ * // If unspecified, server picks an appropriate default.
+ * //
+ * // Optional.
+ * pageSize: 'placeholder-value',
+ * // A pagination token returned from a previous call to ListProjects
+ * // that indicates from where listing should continue.
+ * //
+ * // Optional.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudResourceManager.projects.list(request, handlePage);
- * }
- * };
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "projects": []
+ * // }
+ * }
*
- * cloudResourceManager.projects.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.list
* @memberOf! ()
*
@@ -5095,68 +5160,60 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.projects.listAvailableOrgPolicyConstraints
* @desc Lists `Constraints` that could be applied on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Name of the resource to list `Constraints` for.
- * resource_: 'projects/my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var constraintsPage = response['constraints'];
- * if (!constraintsPage) {
- * return;
- * }
- * for (var i = 0; i < constraintsPage.length; i++) {
- * // TODO: Change code below to process each resource in `constraintsPage`:
- * console.log(JSON.stringify(constraintsPage[i], null, 2));
- * }
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * if (response.nextPageToken) {
- * request.resource.pageToken = response.nextPageToken;
- * cloudResourceManager.projects.listAvailableOrgPolicyConstraints(request, handlePage);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.listAvailableOrgPolicyConstraints(
+ * {
+ * // Name of the resource to list `Constraints` for.
+ * resource: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "pageSize": 0,
+ * // "pageToken": "my_pageToken"
+ * // }
+ * },
* }
- * };
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "constraints": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
*
- * cloudResourceManager.projects.listAvailableOrgPolicyConstraints(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.listAvailableOrgPolicyConstraints
* @memberOf! ()
*
@@ -5256,68 +5313,58 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.projects.listOrgPolicies
* @desc Lists all the `Policies` set for a particular resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
- * // Name of the resource to list Policies for.
- * resource_: 'projects/my-project', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.listOrgPolicies({
+ * // Name of the resource to list Policies for.
+ * resource: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "pageSize": 0,
+ * // "pageToken": "my_pageToken"
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var policiesPage = response['policies'];
- * if (!policiesPage) {
- * return;
- * }
- * for (var i = 0; i < policiesPage.length; i++) {
- * // TODO: Change code below to process each resource in `policiesPage`:
- * console.log(JSON.stringify(policiesPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.resource.pageToken = response.nextPageToken;
- * cloudResourceManager.projects.listOrgPolicies(request, handlePage);
- * }
- * };
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "policies": []
+ * // }
+ * }
*
- * cloudResourceManager.projects.listOrgPolicies(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.listOrgPolicies
* @memberOf! ()
*
@@ -5399,56 +5446,58 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.projects.setIamPolicy
* @desc Sets the IAM access control policy for the specified Project. Overwrites any existing policy. The following constraints apply when using `setIamPolicy()`: + Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a `Binding` of a `Policy`. + The owner role can be granted to a `user`, `serviceAccount`, or a group that is part of an organization. For example, group@myownpersonaldomain.com could be added as an owner to a project in the myownpersonaldomain.com organization, but not the examplepetstore.com organization. + Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited via Cloud Platform console and must accept the invitation. + A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation. + You can only grant ownership of a project to a member by using the GCP Console. Inviting a member will deliver an invitation email that they must accept. An invitation email is not generated if you are granting a role other than owner, or if both the member you are inviting and the project are part of your organization. + Membership changes that leave the project without any owners that have accepted the Terms of Service (ToS) will be rejected. + If the project is not part of an organization, there must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. + This method will replace the existing policy, and cannot be used to append additional IAM settings. Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles. Authorization requires the Google IAM permission `resourcemanager.projects.setIamPolicy` on the project
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.setIamPolicy({
* // REQUIRED: The resource for which the policy is being specified.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {},
+ * // "updateMask": "my_updateMask"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.projects.setIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.setIamPolicy
* @memberOf! ()
*
@@ -5524,55 +5573,59 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.projects.setOrgPolicy
* @desc Updates the specified `Policy` on the resource. Creates a new `Policy` for that `Constraint` on the resource if one does not exist. Not supplying an `etag` on the request `Policy` results in an unconditional write of the `Policy`.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Resource name of the resource to attach the `Policy`.
- * resource_: 'projects/my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
*
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudResourceManager.projects.setOrgPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.setOrgPolicy({
+ * // Resource name of the resource to attach the `Policy`.
+ * resource: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "booleanPolicy": {},
+ * // "constraint": "my_constraint",
+ * // "etag": "my_etag",
+ * // "listPolicy": {},
+ * // "restoreDefault": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.setOrgPolicy
* @memberOf! ()
*
@@ -5650,56 +5703,57 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.projects.testIamPermissions
* @desc Returns permissions that a caller has on the specified Project. There are no permissions required for making this API call.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.testIamPermissions({
* // REQUIRED: The resource for which the policy detail is being requested.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * cloudResourceManager.projects.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.testIamPermissions
* @memberOf! ()
*
@@ -5783,53 +5837,51 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.projects.undelete
* @desc Restores the Project identified by the specified `project_id` (for example, `my-project-123`). You can only use this method for a Project that has a lifecycle state of DELETE_REQUESTED. After deletion starts, the Project cannot be restored. The caller must have modify permissions for this Project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.undelete({
* // The project ID (for example, `foo-bar-123`).
+ * //
* // Required.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * projectId: 'placeholder-value',
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
+ * // Example response
+ * // {}
+ * }
*
- * cloudResourceManager.projects.undelete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.undelete
* @memberOf! ()
*
@@ -5905,57 +5957,67 @@ export namespace cloudresourcemanager_v1 {
* cloudresourcemanager.projects.update
* @desc Updates the attributes of the Project identified by the specified `project_id` (for example, `my-project-123`). The caller must have modify permissions for this Project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.update({
* // The project ID (for example, `my-project-123`).
+ * //
* // Required.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": {},
+ * // "projectId": "my_projectId",
+ * // "projectNumber": "my_projectNumber"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.projects.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": {},
+ * // "projectId": "my_projectId",
+ * // "projectNumber": "my_projectNumber"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.update
* @memberOf! ()
*
diff --git a/src/apis/cloudresourcemanager/v1beta1.ts b/src/apis/cloudresourcemanager/v1beta1.ts
index e4d00f8e1e3..82f2d66bd95 100644
--- a/src/apis/cloudresourcemanager/v1beta1.ts
+++ b/src/apis/cloudresourcemanager/v1beta1.ts
@@ -447,53 +447,58 @@ export namespace cloudresourcemanager_v1beta1 {
* cloudresourcemanager.organizations.get
* @desc Fetches an Organization resource identified by the specified resource name.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1beta1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudresourcemanager.organizations.get({
* // The resource name of the Organization to fetch. This is the organization's
* // relative path in the API, formatted as "organizations/[organizationId]".
* // For example, "organizations/1234".
- * name: 'organizations/my-organization', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.organizations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * name: 'organizations/my-organization',
+ * // The id of the Organization resource to fetch.
+ * // This field is deprecated and will be removed in v1. Use name instead.
+ * organizationId: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "displayName": "my_displayName",
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "organizationId": "my_organizationId",
+ * // "owner": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.organizations.get
* @memberOf! ()
*
@@ -568,56 +573,60 @@ export namespace cloudresourcemanager_v1beta1 {
* cloudresourcemanager.organizations.getIamPolicy
* @desc Gets the access control policy for an Organization resource. May be empty if no such policy or resource exists. The `resource` field should be the organization's resource name, e.g. "organizations/123".
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1beta1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.organizations.getIamPolicy({
* // REQUIRED: The resource for which the policy is being requested.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'organizations/my-organization', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'organizations/my-organization',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.organizations.getIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.organizations.getIamPolicy
* @memberOf! ()
*
@@ -693,61 +702,68 @@ export namespace cloudresourcemanager_v1beta1 {
* cloudresourcemanager.organizations.list
* @desc Lists Organization resources that are visible to the user and satisfy the specified filter. This method returns Organizations in an unspecified order. New Organizations do not necessarily appear at the end of the list.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1beta1');
- *
- * authorize(function(authClient) {
- * var request = {
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var organizationsPage = response['organizations'];
- * if (!organizationsPage) {
- * return;
- * }
- * for (var i = 0; i < organizationsPage.length; i++) {
- * // TODO: Change code below to process each resource in `organizationsPage`:
- * console.log(JSON.stringify(organizationsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudResourceManager.organizations.list(request, handlePage);
- * }
- * };
- *
- * cloudResourceManager.organizations.list(request, handlePage);
- * });
+ * const cloudresourcemanager = google.cloudresourcemanager('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.organizations.list({
+ * // An optional query string used to filter the Organizations to return in
+ * // the response. Filter rules are case-insensitive.
+ * //
+ * //
+ * // Organizations may be filtered by `owner.directoryCustomerId` or by
+ * // `domain`, where the domain is a G Suite domain, for example:
+ * //
+ * // * Filter `owner.directorycustomerid:123456789` returns Organization
+ * // resources with `owner.directory_customer_id` equal to `123456789`.
+ * // * Filter `domain:google.com` returns Organization resources corresponding
+ * // to the domain `google.com`.
+ * //
+ * // This field is optional.
+ * filter: 'placeholder-value',
+ * // The maximum number of Organizations to return in the response.
+ * // This field is optional.
+ * pageSize: 'placeholder-value',
+ * // A pagination token returned from a previous call to `ListOrganizations`
+ * // that indicates from where listing should continue.
+ * // This field is optional.
+ * pageToken: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "organizations": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.organizations.list
* @memberOf! ()
*
@@ -833,56 +849,58 @@ export namespace cloudresourcemanager_v1beta1 {
* cloudresourcemanager.organizations.setIamPolicy
* @desc Sets the access control policy on an Organization resource. Replaces any existing policy. The `resource` field should be the organization's resource name, e.g. "organizations/123".
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1beta1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudresourcemanager.organizations.setIamPolicy({
* // REQUIRED: The resource for which the policy is being specified.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'organizations/my-organization', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'organizations/my-organization',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {},
+ * // "updateMask": "my_updateMask"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.organizations.setIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.organizations.setIamPolicy
* @memberOf! ()
*
@@ -958,56 +976,57 @@ export namespace cloudresourcemanager_v1beta1 {
* cloudresourcemanager.organizations.testIamPermissions
* @desc Returns permissions that a caller has on the specified Organization. The `resource` field should be the organization's resource name, e.g. "organizations/123".
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1beta1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.organizations.testIamPermissions({
* // REQUIRED: The resource for which the policy detail is being requested.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'organizations/my-organization', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'organizations/my-organization',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * cloudResourceManager.organizations.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.organizations.testIamPermissions
* @memberOf! ()
*
@@ -1092,58 +1111,65 @@ export namespace cloudresourcemanager_v1beta1 {
* cloudresourcemanager.organizations.update
* @desc Updates an Organization resource identified by the specified resource name.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1beta1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
- * // Output Only. The resource name of the organization. This is the
+ * // Do the magic
+ * const res = await cloudresourcemanager.organizations.update({
+ * // Output only. The resource name of the organization. This is the
* // organization's relative path in the API. Its format is
* // "organizations/[organization_id]". For example, "organizations/1234".
- * name: 'organizations/my-organization', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * name: 'organizations/my-organization',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "displayName": "my_displayName",
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "organizationId": "my_organizationId",
+ * // "owner": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.organizations.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "displayName": "my_displayName",
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "organizationId": "my_organizationId",
+ * // "owner": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.organizations.update
* @memberOf! ()
*
@@ -1330,52 +1356,65 @@ export namespace cloudresourcemanager_v1beta1 {
* cloudresourcemanager.projects.create
* @desc Creates a Project resource. Initially, the Project resource is owned by its creator exclusively. The creator can later grant permission to others to read or update the Project. Several APIs are activated automatically for the Project, including Google Cloud Storage. The parent is identified by a specified ResourceId, which must include both an ID and a type, such as project, folder, or organization. This method does not associate the new project with a billing account. You can set or update the billing account associated with a project using the [`projects.updateBillingInfo`] (/billing/reference/rest/v1/projects/updateBillingInfo) method.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1beta1');
- *
- * authorize(function(authClient) {
- * var request = {
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.projects.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * const cloudresourcemanager = google.cloudresourcemanager('v1beta1');
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
- * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.create({
+ * // A now unused experiment opt-out option.
+ * useLegacyStack: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": {},
+ * // "projectId": "my_projectId",
+ * // "projectNumber": "my_projectNumber"
+ * // }
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": {},
+ * // "projectId": "my_projectId",
+ * // "projectNumber": "my_projectNumber"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.projects.create
* @memberOf! ()
*
@@ -1447,49 +1486,45 @@ export namespace cloudresourcemanager_v1beta1 {
* cloudresourcemanager.projects.delete
* @desc Marks the Project identified by the specified `project_id` (for example, `my-project-123`) for deletion. This method will only affect the Project if it has a lifecycle state of ACTIVE. This method changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the project is no longer accessible. Until the deletion completes, you can check the lifecycle state checked by retrieving the Project with GetProject, and the Project remains visible to ListProjects. However, you cannot update the project. After the deletion completes, the Project is not retrievable by the GetProject and ListProjects methods. The caller must have modify permissions for this Project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1beta1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.delete({
* // The Project ID (for example, `foo-bar-123`).
+ * //
* // Required.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
+ * // Example response
+ * // {}
+ * }
*
- * cloudResourceManager.projects.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.delete
* @memberOf! ()
*
@@ -1563,52 +1598,56 @@ export namespace cloudresourcemanager_v1beta1 {
* cloudresourcemanager.projects.get
* @desc Retrieves the Project identified by the specified `project_id` (for example, `my-project-123`). The caller must have read permissions for this Project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1beta1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.get({
* // The Project ID (for example, `my-project-123`).
+ * //
* // Required.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.projects.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * projectId: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": {},
+ * // "projectId": "my_projectId",
+ * // "projectNumber": "my_projectNumber"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.get
* @memberOf! ()
*
@@ -1682,56 +1721,56 @@ export namespace cloudresourcemanager_v1beta1 {
* cloudresourcemanager.projects.getAncestry
* @desc Gets a list of ancestors in the resource hierarchy for the Project identified by the specified `project_id` (for example, `my-project-123`). The caller must have read permissions for this Project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1beta1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.getAncestry({
* // The Project ID (for example, `my-project-123`).
+ * //
* // Required.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * projectId: 'placeholder-value',
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * cloudResourceManager.projects.getAncestry(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "ancestor": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.getAncestry
* @memberOf! ()
*
@@ -1810,56 +1849,60 @@ export namespace cloudresourcemanager_v1beta1 {
* cloudresourcemanager.projects.getIamPolicy
* @desc Returns the IAM access control policy for the specified Project. Permission is denied if the policy or the resource does not exist. For additional information about resource structure and identification, see [Resource Names](/apis/design/resource_names).
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1beta1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.getIamPolicy({
* // REQUIRED: The resource for which the policy is being requested.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.projects.getIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.getIamPolicy
* @memberOf! ()
*
@@ -1934,61 +1977,92 @@ export namespace cloudresourcemanager_v1beta1 {
* cloudresourcemanager.projects.list
* @desc Lists Projects that the caller has the `resourcemanager.projects.get` permission on and satisfy the specified filter. This method returns Projects in an unspecified order. This method is eventually consistent with project mutations; this means that a newly created project may not appear in the results or recent updates to an existing project may not be reflected in the results. To retrieve the latest state of a project, use the GetProject method. NOTE: If the request filter contains a `parent.type` and `parent.id` and the caller has the `resourcemanager.projects.list` permission on the parent, the results will be drawn from an alternate index which provides more consistent results. In future versions of this API, this List method will be split into List and Search to properly capture the behavorial difference.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1beta1');
- *
- * authorize(function(authClient) {
- * var request = {
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var projectsPage = response['projects'];
- * if (!projectsPage) {
- * return;
- * }
- * for (var i = 0; i < projectsPage.length; i++) {
- * // TODO: Change code below to process each resource in `projectsPage`:
- * console.log(JSON.stringify(projectsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudResourceManager.projects.list(request, handlePage);
- * }
- * };
- *
- * cloudResourceManager.projects.list(request, handlePage);
- * });
+ * const cloudresourcemanager = google.cloudresourcemanager('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.list({
+ * // An expression for filtering the results of the request. Filter rules are
+ * // case insensitive. The fields eligible for filtering are:
+ * //
+ * // + `name`
+ * // + `id`
+ * // + `labels.` (where *key* is the name of a label)
+ * // + `parent.type`
+ * // + `parent.id`
+ * //
+ * // Some examples of using labels as filters:
+ * //
+ * // | Filter | Description |
+ * // |------------------|-----------------------------------------------------|
+ * // | name:how* | The project's name starts with "how". |
+ * // | name:Howl | The project's name is `Howl` or `howl`. |
+ * // | name:HOWL | Equivalent to above. |
+ * // | NAME:howl | Equivalent to above. |
+ * // | labels.color:* | The project has the label `color`. |
+ * // | labels.color:red | The project's label `color` has the value `red`. |
+ * // | labels.color:red labels.size:big |The project's label `color` has
+ * // the value `red` and its label `size` has the value `big`. |
+ * //
+ * // If no filter is specified, the call will return projects for which the user
+ * // has the `resourcemanager.projects.get` permission.
+ * //
+ * // NOTE: To perform a by-parent query (eg., what projects are directly in a
+ * // Folder), the caller must have the `resourcemanager.projects.list`
+ * // permission on the parent and the filter must contain both a `parent.type`
+ * // and a `parent.id` restriction
+ * // (example: "parent.type:folder parent.id:123"). In this case an alternate
+ * // search index is used which provides more consistent results.
+ * //
+ * // Optional.
+ * filter: 'placeholder-value',
+ * // The maximum number of Projects to return in the response.
+ * // The server can return fewer Projects than requested.
+ * // If unspecified, server picks an appropriate default.
+ * //
+ * // Optional.
+ * pageSize: 'placeholder-value',
+ * // A pagination token returned from a previous call to ListProjects
+ * // that indicates from where listing should continue.
+ * //
+ * // Optional.
+ * pageToken: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "projects": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.projects.list
* @memberOf! ()
*
@@ -2065,56 +2139,58 @@ export namespace cloudresourcemanager_v1beta1 {
* cloudresourcemanager.projects.setIamPolicy
* @desc Sets the IAM access control policy for the specified Project. Overwrites any existing policy. The following constraints apply when using `setIamPolicy()`: + Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a `Binding` of a `Policy`. + The owner role can be granted to a `user`, `serviceAccount`, or a group that is part of an organization. For example, group@myownpersonaldomain.com could be added as an owner to a project in the myownpersonaldomain.com organization, but not the examplepetstore.com organization. + Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited via Cloud Platform console and must accept the invitation. + A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation. + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be sent only using the Cloud Platform Console. + Membership changes that leave the project without any owners that have accepted the Terms of Service (ToS) will be rejected. + If the project is not part of an organization, there must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. + This method will replace the existing policy, and cannot be used to append additional IAM settings. Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1beta1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.setIamPolicy({
* // REQUIRED: The resource for which the policy is being specified.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {},
+ * // "updateMask": "my_updateMask"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.projects.setIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.setIamPolicy
* @memberOf! ()
*
@@ -2189,56 +2265,57 @@ export namespace cloudresourcemanager_v1beta1 {
* cloudresourcemanager.projects.testIamPermissions
* @desc Returns permissions that a caller has on the specified Project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1beta1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.testIamPermissions({
* // REQUIRED: The resource for which the policy detail is being requested.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * cloudResourceManager.projects.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.testIamPermissions
* @memberOf! ()
*
@@ -2322,53 +2399,51 @@ export namespace cloudresourcemanager_v1beta1 {
* cloudresourcemanager.projects.undelete
* @desc Restores the Project identified by the specified `project_id` (for example, `my-project-123`). You can only use this method for a Project that has a lifecycle state of DELETE_REQUESTED. After deletion starts, the Project cannot be restored. The caller must have modify permissions for this Project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1beta1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.undelete({
* // The project ID (for example, `foo-bar-123`).
+ * //
* // Required.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * projectId: 'placeholder-value',
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
+ * // Example response
+ * // {}
+ * }
*
- * cloudResourceManager.projects.undelete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.undelete
* @memberOf! ()
*
@@ -2444,57 +2519,67 @@ export namespace cloudresourcemanager_v1beta1 {
* cloudresourcemanager.projects.update
* @desc Updates the attributes of the Project identified by the specified `project_id` (for example, `my-project-123`). The caller must have modify permissions for this Project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Resource Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudresourcemanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudResourceManager = google.cloudresourcemanager('v1beta1');
+ * const cloudresourcemanager = google.cloudresourcemanager('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.projects.update({
* // The project ID (for example, `my-project-123`).
+ * //
* // Required.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": {},
+ * // "projectId": "my_projectId",
+ * // "projectNumber": "my_projectNumber"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudResourceManager.projects.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": {},
+ * // "projectId": "my_projectId",
+ * // "projectNumber": "my_projectNumber"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudresourcemanager.projects.update
* @memberOf! ()
*
diff --git a/src/apis/cloudresourcemanager/v2.ts b/src/apis/cloudresourcemanager/v2.ts
index 38305af189c..6ac308c076d 100644
--- a/src/apis/cloudresourcemanager/v2.ts
+++ b/src/apis/cloudresourcemanager/v2.ts
@@ -429,6 +429,63 @@ export namespace cloudresourcemanager_v2 {
/**
* cloudresourcemanager.folders.create
* @desc Creates a Folder in the resource hierarchy. Returns an Operation which can be used to track the progress of the folder creation workflow. Upon success the Operation.response field will be populated with the created Folder. In order to succeed, the addition of this new Folder must not violate the Folder naming, height or fanout constraints. + The Folder's display_name must be distinct from all other Folder's that share its parent. + The addition of the Folder must not cause the active Folder hierarchy to exceed a height of 4. Note, the full active + deleted Folder hierarchy is allowed to reach a height of 8; this provides additional headroom when moving folders that contain deleted folders. + The addition of the Folder must not cause the total number of Folders under its parent to exceed 100. If the operation fails due to a folder constraint violation, some errors may be returned by the CreateFolder request, with status code FAILED_PRECONDITION and an error description. Other folder constraint violations will be communicated in the Operation, with the specific PreconditionFailure returned via the details list in the Operation.error field. The caller must have `resourcemanager.folders.create` permission on the identified parent.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.create({
+ * // Required. The resource name of the new Folder's parent.
+ * // Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+ * parent: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "displayName": "my_displayName",
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": "my_parent"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.create
* @memberOf! ()
*
@@ -501,6 +558,51 @@ export namespace cloudresourcemanager_v2 {
/**
* cloudresourcemanager.folders.delete
* @desc Requests deletion of a Folder. The Folder is moved into the DELETE_REQUESTED state immediately, and is deleted approximately 30 days later. This method may only be called on an empty Folder in the ACTIVE state, where a Folder is empty if it doesn't contain any Folders or Projects in the ACTIVE state. The caller must have `resourcemanager.folders.delete` permission on the identified folder.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.delete({
+ * // Required. the resource name of the Folder to be deleted.
+ * // Must be of the form `folders/{folder_id}`.
+ * name: 'folders/my-folder',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "displayName": "my_displayName",
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": "my_parent"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.delete
* @memberOf! ()
*
@@ -570,6 +672,54 @@ export namespace cloudresourcemanager_v2 {
/**
* cloudresourcemanager.folders.get
* @desc Retrieves a Folder identified by the supplied resource name. Valid Folder resource names have the format `folders/{folder_id}` (for example, `folders/1234`). The caller must have `resourcemanager.folders.get` permission on the identified folder.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.get({
+ * // Required. The resource name of the Folder to retrieve.
+ * // Must be of the form `folders/{folder_id}`.
+ * name: 'folders/my-folder',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "displayName": "my_displayName",
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": "my_parent"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.get
* @memberOf! ()
*
@@ -639,6 +789,61 @@ export namespace cloudresourcemanager_v2 {
/**
* cloudresourcemanager.folders.getIamPolicy
* @desc Gets the access control policy for a Folder. The returned policy may be empty if no such policy or resource exists. The `resource` field should be the Folder's resource name, e.g. "folders/1234". The caller must have `resourcemanager.folders.getIamPolicy` permission on the identified folder.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'folders/my-folder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.getIamPolicy
* @memberOf! ()
*
@@ -713,6 +918,63 @@ export namespace cloudresourcemanager_v2 {
/**
* cloudresourcemanager.folders.list
* @desc Lists the Folders that are direct descendants of supplied parent resource. List provides a strongly consistent view of the Folders underneath the specified parent resource. List returns Folders sorted based upon the (ascending) lexical ordering of their display_name. The caller must have `resourcemanager.folders.list` permission on the identified parent.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.list({
+ * // Optional. The maximum number of Folders to return in the response.
+ * pageSize: 'placeholder-value',
+ * // Optional. A pagination token returned from a previous call to `ListFolders`
+ * // that indicates where this listing should continue from.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name of the Organization or Folder whose Folders are
+ * // being listed.
+ * // Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+ * // Access to this method is controlled by checking the
+ * // `resourcemanager.folders.list` permission on the `parent`.
+ * parent: 'placeholder-value',
+ * // Optional. Controls whether Folders in the
+ * // DELETE_REQUESTED
+ * // state should be returned. Defaults to false.
+ * showDeleted: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "folders": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.list
* @memberOf! ()
*
@@ -787,6 +1049,59 @@ export namespace cloudresourcemanager_v2 {
/**
* cloudresourcemanager.folders.move
* @desc Moves a Folder under a new resource parent. Returns an Operation which can be used to track the progress of the folder move workflow. Upon success the Operation.response field will be populated with the moved Folder. Upon failure, a FolderOperationError categorizing the failure cause will be returned - if the failure occurs synchronously then the FolderOperationError will be returned via the Status.details field and if it occurs asynchronously then the FolderOperation will be returned via the Operation.error field. In addition, the Operation.metadata field will be populated with a FolderOperation message as an aid to stateless clients. Folder moves will be rejected if they violate either the naming, height or fanout constraints described in the CreateFolder documentation. The caller must have `resourcemanager.folders.move` permission on the folder's current and proposed new parent.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.move({
+ * // Required. The resource name of the Folder to move.
+ * // Must be of the form folders/{folder_id}
+ * name: 'folders/my-folder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "destinationParent": "my_destinationParent"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.move
* @memberOf! ()
*
@@ -859,6 +1174,66 @@ export namespace cloudresourcemanager_v2 {
/**
* cloudresourcemanager.folders.patch
* @desc Updates a Folder, changing its display_name. Changes to the folder display_name will be rejected if they violate either the display_name formatting rules or naming constraints described in the CreateFolder documentation. The Folder's display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression: [\p{L}\p{N}]([\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?. The caller must have `resourcemanager.folders.update` permission on the identified folder. If the update fails due to the unique name constraint then a PreconditionFailure explaining this violation will be returned in the Status.details field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.patch({
+ * // Output only. The resource name of the Folder.
+ * // Its format is `folders/{folder_id}`, for example: "folders/1234".
+ * name: 'folders/my-folder',
+ * // Required. Fields to be updated.
+ * // Only the `display_name` can be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "displayName": "my_displayName",
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": "my_parent"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "displayName": "my_displayName",
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": "my_parent"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.patch
* @memberOf! ()
*
@@ -930,6 +1305,57 @@ export namespace cloudresourcemanager_v2 {
/**
* cloudresourcemanager.folders.search
* @desc Search for folders that match specific filter criteria. Search provides an eventually consistent view of the folders a user has access to which meet the specified filter criteria. This will only return folders on which the caller has the permission `resourcemanager.folders.get`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.search({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "pageSize": 0,
+ * // "pageToken": "my_pageToken",
+ * // "query": "my_query"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "folders": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.search
* @memberOf! ()
*
@@ -1003,6 +1429,59 @@ export namespace cloudresourcemanager_v2 {
/**
* cloudresourcemanager.folders.setIamPolicy
* @desc Sets the access control policy on a Folder, replacing any existing policy. The `resource` field should be the Folder's resource name, e.g. "folders/1234". The caller must have `resourcemanager.folders.setIamPolicy` permission on the identified folder.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'folders/my-folder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {},
+ * // "updateMask": "my_updateMask"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.setIamPolicy
* @memberOf! ()
*
@@ -1077,6 +1556,55 @@ export namespace cloudresourcemanager_v2 {
/**
* cloudresourcemanager.folders.testIamPermissions
* @desc Returns permissions that a caller has on the specified Folder. The `resource` field should be the Folder's resource name, e.g. "folders/1234". There are no permissions required for making this API call.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'folders/my-folder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.testIamPermissions
* @memberOf! ()
*
@@ -1160,6 +1688,57 @@ export namespace cloudresourcemanager_v2 {
/**
* cloudresourcemanager.folders.undelete
* @desc Cancels the deletion request for a Folder. This method may only be called on a Folder in the DELETE_REQUESTED state. In order to succeed, the Folder's parent must be in the ACTIVE state. In addition, reintroducing the folder into the tree must not violate folder naming, height and fanout constraints described in the CreateFolder documentation. The caller must have `resourcemanager.folders.undelete` permission on the identified folder.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.undelete({
+ * // Required. The resource name of the Folder to undelete.
+ * // Must be of the form `folders/{folder_id}`.
+ * name: 'folders/my-folder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "displayName": "my_displayName",
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": "my_parent"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.undelete
* @memberOf! ()
*
@@ -1416,6 +1995,53 @@ export namespace cloudresourcemanager_v2 {
/**
* cloudresourcemanager.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.operations.get({
+ * // The name of the operation resource.
+ * name: 'operations/.*',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.operations.get
* @memberOf! ()
*
diff --git a/src/apis/cloudresourcemanager/v2beta1.ts b/src/apis/cloudresourcemanager/v2beta1.ts
index bfa7ad2569c..022df338391 100644
--- a/src/apis/cloudresourcemanager/v2beta1.ts
+++ b/src/apis/cloudresourcemanager/v2beta1.ts
@@ -429,6 +429,63 @@ export namespace cloudresourcemanager_v2beta1 {
/**
* cloudresourcemanager.folders.create
* @desc Creates a Folder in the resource hierarchy. Returns an Operation which can be used to track the progress of the folder creation workflow. Upon success the Operation.response field will be populated with the created Folder. In order to succeed, the addition of this new Folder must not violate the Folder naming, height or fanout constraints. + The Folder's display_name must be distinct from all other Folder's that share its parent. + The addition of the Folder must not cause the active Folder hierarchy to exceed a height of 4. Note, the full active + deleted Folder hierarchy is allowed to reach a height of 8; this provides additional headroom when moving folders that contain deleted folders. + The addition of the Folder must not cause the total number of Folders under its parent to exceed 100. If the operation fails due to a folder constraint violation, some errors may be returned by the CreateFolder request, with status code FAILED_PRECONDITION and an error description. Other folder constraint violations will be communicated in the Operation, with the specific PreconditionFailure returned via the details list in the Operation.error field. The caller must have `resourcemanager.folders.create` permission on the identified parent.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.create({
+ * // Required. The resource name of the new Folder's parent.
+ * // Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+ * parent: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "displayName": "my_displayName",
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": "my_parent"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.create
* @memberOf! ()
*
@@ -501,6 +558,51 @@ export namespace cloudresourcemanager_v2beta1 {
/**
* cloudresourcemanager.folders.delete
* @desc Requests deletion of a Folder. The Folder is moved into the DELETE_REQUESTED state immediately, and is deleted approximately 30 days later. This method may only be called on an empty Folder in the ACTIVE state, where a Folder is empty if it doesn't contain any Folders or Projects in the ACTIVE state. The caller must have `resourcemanager.folders.delete` permission on the identified folder.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.delete({
+ * // Required. the resource name of the Folder to be deleted.
+ * // Must be of the form `folders/{folder_id}`.
+ * name: 'folders/my-folder',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "displayName": "my_displayName",
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": "my_parent"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.delete
* @memberOf! ()
*
@@ -570,6 +672,54 @@ export namespace cloudresourcemanager_v2beta1 {
/**
* cloudresourcemanager.folders.get
* @desc Retrieves a Folder identified by the supplied resource name. Valid Folder resource names have the format `folders/{folder_id}` (for example, `folders/1234`). The caller must have `resourcemanager.folders.get` permission on the identified folder.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.get({
+ * // Required. The resource name of the Folder to retrieve.
+ * // Must be of the form `folders/{folder_id}`.
+ * name: 'folders/my-folder',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "displayName": "my_displayName",
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": "my_parent"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.get
* @memberOf! ()
*
@@ -639,6 +789,61 @@ export namespace cloudresourcemanager_v2beta1 {
/**
* cloudresourcemanager.folders.getIamPolicy
* @desc Gets the access control policy for a Folder. The returned policy may be empty if no such policy or resource exists. The `resource` field should be the Folder's resource name, e.g. "folders/1234". The caller must have `resourcemanager.folders.getIamPolicy` permission on the identified folder.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'folders/my-folder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.getIamPolicy
* @memberOf! ()
*
@@ -713,6 +918,63 @@ export namespace cloudresourcemanager_v2beta1 {
/**
* cloudresourcemanager.folders.list
* @desc Lists the Folders that are direct descendants of supplied parent resource. List provides a strongly consistent view of the Folders underneath the specified parent resource. List returns Folders sorted based upon the (ascending) lexical ordering of their display_name. The caller must have `resourcemanager.folders.list` permission on the identified parent.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.list({
+ * // Optional. The maximum number of Folders to return in the response.
+ * pageSize: 'placeholder-value',
+ * // Optional. A pagination token returned from a previous call to `ListFolders`
+ * // that indicates where this listing should continue from.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name of the Organization or Folder whose Folders are
+ * // being listed.
+ * // Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+ * // Access to this method is controlled by checking the
+ * // `resourcemanager.folders.list` permission on the `parent`.
+ * parent: 'placeholder-value',
+ * // Optional. Controls whether Folders in the
+ * // DELETE_REQUESTED
+ * // state should be returned. Defaults to false.
+ * showDeleted: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "folders": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.list
* @memberOf! ()
*
@@ -787,6 +1049,59 @@ export namespace cloudresourcemanager_v2beta1 {
/**
* cloudresourcemanager.folders.move
* @desc Moves a Folder under a new resource parent. Returns an Operation which can be used to track the progress of the folder move workflow. Upon success the Operation.response field will be populated with the moved Folder. Upon failure, a FolderOperationError categorizing the failure cause will be returned - if the failure occurs synchronously then the FolderOperationError will be returned via the Status.details field and if it occurs asynchronously then the FolderOperation will be returned via the Operation.error field. In addition, the Operation.metadata field will be populated with a FolderOperation message as an aid to stateless clients. Folder moves will be rejected if they violate either the naming, height or fanout constraints described in the CreateFolder documentation. The caller must have `resourcemanager.folders.move` permission on the folder's current and proposed new parent.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.move({
+ * // Required. The resource name of the Folder to move.
+ * // Must be of the form folders/{folder_id}
+ * name: 'folders/my-folder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "destinationParent": "my_destinationParent"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.move
* @memberOf! ()
*
@@ -859,6 +1174,66 @@ export namespace cloudresourcemanager_v2beta1 {
/**
* cloudresourcemanager.folders.patch
* @desc Updates a Folder, changing its display_name. Changes to the folder display_name will be rejected if they violate either the display_name formatting rules or naming constraints described in the CreateFolder documentation. The Folder's display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression: [\p{L}\p{N}]([\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?. The caller must have `resourcemanager.folders.update` permission on the identified folder. If the update fails due to the unique name constraint then a PreconditionFailure explaining this violation will be returned in the Status.details field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.patch({
+ * // Output only. The resource name of the Folder.
+ * // Its format is `folders/{folder_id}`, for example: "folders/1234".
+ * name: 'folders/my-folder',
+ * // Required. Fields to be updated.
+ * // Only the `display_name` can be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "displayName": "my_displayName",
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": "my_parent"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "displayName": "my_displayName",
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": "my_parent"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.patch
* @memberOf! ()
*
@@ -930,6 +1305,57 @@ export namespace cloudresourcemanager_v2beta1 {
/**
* cloudresourcemanager.folders.search
* @desc Search for folders that match specific filter criteria. Search provides an eventually consistent view of the folders a user has access to which meet the specified filter criteria. This will only return folders on which the caller has the permission `resourcemanager.folders.get`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.search({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "pageSize": 0,
+ * // "pageToken": "my_pageToken",
+ * // "query": "my_query"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "folders": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.search
* @memberOf! ()
*
@@ -1003,6 +1429,59 @@ export namespace cloudresourcemanager_v2beta1 {
/**
* cloudresourcemanager.folders.setIamPolicy
* @desc Sets the access control policy on a Folder, replacing any existing policy. The `resource` field should be the Folder's resource name, e.g. "folders/1234". The caller must have `resourcemanager.folders.setIamPolicy` permission on the identified folder.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'folders/my-folder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {},
+ * // "updateMask": "my_updateMask"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.setIamPolicy
* @memberOf! ()
*
@@ -1077,6 +1556,55 @@ export namespace cloudresourcemanager_v2beta1 {
/**
* cloudresourcemanager.folders.testIamPermissions
* @desc Returns permissions that a caller has on the specified Folder. The `resource` field should be the Folder's resource name, e.g. "folders/1234". There are no permissions required for making this API call.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'folders/my-folder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.testIamPermissions
* @memberOf! ()
*
@@ -1160,6 +1688,57 @@ export namespace cloudresourcemanager_v2beta1 {
/**
* cloudresourcemanager.folders.undelete
* @desc Cancels the deletion request for a Folder. This method may only be called on a Folder in the DELETE_REQUESTED state. In order to succeed, the Folder's parent must be in the ACTIVE state. In addition, reintroducing the folder into the tree must not violate folder naming, height and fanout constraints described in the CreateFolder documentation. The caller must have `resourcemanager.folders.undelete` permission on the identified folder.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.folders.undelete({
+ * // Required. The resource name of the Folder to undelete.
+ * // Must be of the form `folders/{folder_id}`.
+ * name: 'folders/my-folder',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "displayName": "my_displayName",
+ * // "lifecycleState": "my_lifecycleState",
+ * // "name": "my_name",
+ * // "parent": "my_parent"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.folders.undelete
* @memberOf! ()
*
@@ -1416,6 +1995,53 @@ export namespace cloudresourcemanager_v2beta1 {
/**
* cloudresourcemanager.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudresourcemanager = google.cloudresourcemanager('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudresourcemanager.operations.get({
+ * // The name of the operation resource.
+ * name: 'operations/.*',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudresourcemanager.operations.get
* @memberOf! ()
*
diff --git a/src/apis/cloudscheduler/v1.ts b/src/apis/cloudscheduler/v1.ts
index 48184a630be..d78f0ba1636 100644
--- a/src/apis/cloudscheduler/v1.ts
+++ b/src/apis/cloudscheduler/v1.ts
@@ -444,51 +444,49 @@ export namespace cloudscheduler_v1 {
* cloudscheduler.projects.locations.get
* @desc Gets information about a location.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1');
+ * const cloudscheduler = google.cloudscheduler('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Resource name for the location.
- * name: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudScheduler.projects.locations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.get({
+ * // Resource name for the location.
+ * name: 'projects/my-project/locations/my-location',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "labels": {},
+ * // "locationId": "my_locationId",
+ * // "metadata": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudscheduler.projects.locations.get
* @memberOf! ()
*
@@ -560,64 +558,52 @@ export namespace cloudscheduler_v1 {
* cloudscheduler.projects.locations.list
* @desc Lists information about the supported locations for this service.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1');
+ * const cloudscheduler = google.cloudscheduler('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The resource that owns the locations collection, if applicable.
- * name: 'projects/my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var locationsPage = response['locations'];
- * if (!locationsPage) {
- * return;
- * }
- * for (var i = 0; i < locationsPage.length; i++) {
- * // TODO: Change code below to process each resource in `locationsPage`:
- * console.log(JSON.stringify(locationsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudScheduler.projects.locations.list(request, handlePage);
- * }
- * };
- *
- * cloudScheduler.projects.locations.list(request, handlePage);
- * });
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The resource that owns the locations collection, if applicable.
+ * name: 'projects/my-project',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "locations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudscheduler.projects.locations.list
* @memberOf! ()
*
@@ -743,57 +729,80 @@ export namespace cloudscheduler_v1 {
* cloudscheduler.projects.locations.jobs.create
* @desc Creates a job.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The location name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID`.
- * parent: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
+ * const cloudscheduler = google.cloudscheduler('v1');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudScheduler.projects.locations.jobs.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.jobs.create({
+ * // Required. The location name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID`.
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "attemptDeadline": "my_attemptDeadline",
+ * // "description": "my_description",
+ * // "httpTarget": {},
+ * // "lastAttemptTime": "my_lastAttemptTime",
+ * // "name": "my_name",
+ * // "pubsubTarget": {},
+ * // "retryConfig": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "state": "my_state",
+ * // "status": {},
+ * // "timeZone": "my_timeZone",
+ * // "userUpdateTime": "my_userUpdateTime"
+ * // }
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "attemptDeadline": "my_attemptDeadline",
+ * // "description": "my_description",
+ * // "httpTarget": {},
+ * // "lastAttemptTime": "my_lastAttemptTime",
+ * // "name": "my_name",
+ * // "pubsubTarget": {},
+ * // "retryConfig": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "state": "my_state",
+ * // "status": {},
+ * // "timeZone": "my_timeZone",
+ * // "userUpdateTime": "my_userUpdateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudscheduler.projects.locations.jobs.create
* @memberOf! ()
*
@@ -866,50 +875,44 @@ export namespace cloudscheduler_v1 {
* cloudscheduler.projects.locations.jobs.delete
* @desc Deletes a job.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1');
+ * const cloudscheduler = google.cloudscheduler('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The job name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
- * name: 'projects/my-project/locations/my-location/jobs/my-job', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudScheduler.projects.locations.jobs.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.jobs.delete({
+ * // Required. The job name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ * name: 'projects/my-project/locations/my-location/jobs/my-job',
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {}
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudscheduler.projects.locations.jobs.delete
* @memberOf! ()
*
@@ -981,53 +984,59 @@ export namespace cloudscheduler_v1 {
* cloudscheduler.projects.locations.jobs.get
* @desc Gets a job.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1');
+ * const cloudscheduler = google.cloudscheduler('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The job name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
- * name: 'projects/my-project/locations/my-location/jobs/my-job', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudScheduler.projects.locations.jobs.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.jobs.get({
+ * // Required. The job name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ * name: 'projects/my-project/locations/my-location/jobs/my-job',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "attemptDeadline": "my_attemptDeadline",
+ * // "description": "my_description",
+ * // "httpTarget": {},
+ * // "lastAttemptTime": "my_lastAttemptTime",
+ * // "name": "my_name",
+ * // "pubsubTarget": {},
+ * // "retryConfig": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "state": "my_state",
+ * // "status": {},
+ * // "timeZone": "my_timeZone",
+ * // "userUpdateTime": "my_userUpdateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudscheduler.projects.locations.jobs.get
* @memberOf! ()
*
@@ -1099,66 +1108,62 @@ export namespace cloudscheduler_v1 {
* cloudscheduler.projects.locations.jobs.list
* @desc Lists jobs.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1');
+ * const cloudscheduler = google.cloudscheduler('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The location name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID`.
- * parent: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var jobsPage = response['jobs'];
- * if (!jobsPage) {
- * return;
- * }
- * for (var i = 0; i < jobsPage.length; i++) {
- * // TODO: Change code below to process each resource in `jobsPage`:
- * console.log(JSON.stringify(jobsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudScheduler.projects.locations.jobs.list(request, handlePage);
- * }
- * };
- *
- * cloudScheduler.projects.locations.jobs.list(request, handlePage);
- * });
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.jobs.list({
+ * // Requested page size.
+ * //
+ * // The maximum page size is 500. If unspecified, the page size will
+ * // be the maximum. Fewer jobs than requested might be returned,
+ * // even if more jobs exist; use next_page_token to determine if more
+ * // jobs exist.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server will return. To
+ * // request the first page results, page_token must be empty. To
+ * // request the next page of results, page_token must be the value of
+ * // next_page_token returned from
+ * // the previous call to ListJobs. It is an error to
+ * // switch the value of filter or
+ * // order_by while iterating through pages.
+ * pageToken: 'placeholder-value',
+ * // Required. The location name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID`.
+ * parent: 'projects/my-project/locations/my-location',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "jobs": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudscheduler.projects.locations.jobs.list
* @memberOf! ()
*
@@ -1234,71 +1239,97 @@ export namespace cloudscheduler_v1 {
* cloudscheduler.projects.locations.jobs.patch
* @desc Updates a job. If successful, the updated Job is returned. If the job does not exist, `NOT_FOUND` is returned. If UpdateJob does not successfully return, it is possible for the job to be in an Job.State.UPDATE_FAILED state. A job in this state may not be executed. If this happens, retry the UpdateJob request until a successful response is received.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1');
+ * const cloudscheduler = google.cloudscheduler('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.jobs.patch({
* // Optionally caller-specified in CreateJob, after
* // which it becomes output only.
+ * //
* // The job name. For example:
* // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ * //
* // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
- * // hyphens (-), colons (:), or periods (.).
- * // For more information, see
- * // [Identifying
- * // projects]
- * // (https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
+ * // hyphens (-), colons (:), or periods (.).
+ * // For more information, see
+ * // [Identifying
+ * // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
* // * `LOCATION_ID` is the canonical ID for the job's location.
- * // The list of available locations can be obtained by calling
- * // ListLocations.
- * // For more information, see https://cloud.google.com/about/locations/.
+ * // The list of available locations can be obtained by calling
+ * // ListLocations.
+ * // For more information, see https://cloud.google.com/about/locations/.
* // * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
- * // hyphens (-), or underscores (_). The maximum length is 500 characters.
- * name: 'projects/my-project/locations/my-location/jobs/my-job', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * // hyphens (-), or underscores (_). The maximum length is 500 characters.
+ * name: 'projects/my-project/locations/my-location/jobs/my-job',
+ * // A mask used to specify which fields of the job are being updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "attemptDeadline": "my_attemptDeadline",
+ * // "description": "my_description",
+ * // "httpTarget": {},
+ * // "lastAttemptTime": "my_lastAttemptTime",
+ * // "name": "my_name",
+ * // "pubsubTarget": {},
+ * // "retryConfig": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "state": "my_state",
+ * // "status": {},
+ * // "timeZone": "my_timeZone",
+ * // "userUpdateTime": "my_userUpdateTime"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudScheduler.projects.locations.jobs.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "attemptDeadline": "my_attemptDeadline",
+ * // "description": "my_description",
+ * // "httpTarget": {},
+ * // "lastAttemptTime": "my_lastAttemptTime",
+ * // "name": "my_name",
+ * // "pubsubTarget": {},
+ * // "retryConfig": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "state": "my_state",
+ * // "status": {},
+ * // "timeZone": "my_timeZone",
+ * // "userUpdateTime": "my_userUpdateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudscheduler.projects.locations.jobs.patch
* @memberOf! ()
*
@@ -1372,57 +1403,65 @@ export namespace cloudscheduler_v1 {
* cloudscheduler.projects.locations.jobs.pause
* @desc Pauses a job. If a job is paused then the system will stop executing the job until it is re-enabled via ResumeJob. The state of the job is stored in state; if paused it will be set to Job.State.PAUSED. A job must be in Job.State.ENABLED to be paused.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The job name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
- * name: 'projects/my-project/locations/my-location/jobs/my-job', // TODO: Update placeholder value.
+ * const cloudscheduler = google.cloudscheduler('v1');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudScheduler.projects.locations.jobs.pause(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.jobs.pause({
+ * // Required. The job name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ * name: 'projects/my-project/locations/my-location/jobs/my-job',
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "attemptDeadline": "my_attemptDeadline",
+ * // "description": "my_description",
+ * // "httpTarget": {},
+ * // "lastAttemptTime": "my_lastAttemptTime",
+ * // "name": "my_name",
+ * // "pubsubTarget": {},
+ * // "retryConfig": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "state": "my_state",
+ * // "status": {},
+ * // "timeZone": "my_timeZone",
+ * // "userUpdateTime": "my_userUpdateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudscheduler.projects.locations.jobs.pause
* @memberOf! ()
*
@@ -1495,57 +1534,65 @@ export namespace cloudscheduler_v1 {
* cloudscheduler.projects.locations.jobs.resume
* @desc Resume a job. This method reenables a job after it has been Job.State.PAUSED. The state of a job is stored in Job.state; after calling this method it will be set to Job.State.ENABLED. A job must be in Job.State.PAUSED to be resumed.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The job name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
- * name: 'projects/my-project/locations/my-location/jobs/my-job', // TODO: Update placeholder value.
+ * const cloudscheduler = google.cloudscheduler('v1');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudScheduler.projects.locations.jobs.resume(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.jobs.resume({
+ * // Required. The job name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ * name: 'projects/my-project/locations/my-location/jobs/my-job',
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "attemptDeadline": "my_attemptDeadline",
+ * // "description": "my_description",
+ * // "httpTarget": {},
+ * // "lastAttemptTime": "my_lastAttemptTime",
+ * // "name": "my_name",
+ * // "pubsubTarget": {},
+ * // "retryConfig": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "state": "my_state",
+ * // "status": {},
+ * // "timeZone": "my_timeZone",
+ * // "userUpdateTime": "my_userUpdateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudscheduler.projects.locations.jobs.resume
* @memberOf! ()
*
@@ -1618,57 +1665,65 @@ export namespace cloudscheduler_v1 {
* cloudscheduler.projects.locations.jobs.run
* @desc Forces a job to run now. When this method is called, Cloud Scheduler will dispatch the job, even if the job is already running.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The job name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
- * name: 'projects/my-project/locations/my-location/jobs/my-job', // TODO: Update placeholder value.
+ * const cloudscheduler = google.cloudscheduler('v1');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudScheduler.projects.locations.jobs.run(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.jobs.run({
+ * // Required. The job name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ * name: 'projects/my-project/locations/my-location/jobs/my-job',
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "attemptDeadline": "my_attemptDeadline",
+ * // "description": "my_description",
+ * // "httpTarget": {},
+ * // "lastAttemptTime": "my_lastAttemptTime",
+ * // "name": "my_name",
+ * // "pubsubTarget": {},
+ * // "retryConfig": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "state": "my_state",
+ * // "status": {},
+ * // "timeZone": "my_timeZone",
+ * // "userUpdateTime": "my_userUpdateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudscheduler.projects.locations.jobs.run
* @memberOf! ()
*
diff --git a/src/apis/cloudscheduler/v1beta1.ts b/src/apis/cloudscheduler/v1beta1.ts
index 6ec72ffbf09..fbf6f145ab6 100644
--- a/src/apis/cloudscheduler/v1beta1.ts
+++ b/src/apis/cloudscheduler/v1beta1.ts
@@ -444,51 +444,49 @@ export namespace cloudscheduler_v1beta1 {
* cloudscheduler.projects.locations.get
* @desc Gets information about a location.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1beta1');
+ * const cloudscheduler = google.cloudscheduler('v1beta1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Resource name for the location.
- * name: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudScheduler.projects.locations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.get({
+ * // Resource name for the location.
+ * name: 'projects/my-project/locations/my-location',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "labels": {},
+ * // "locationId": "my_locationId",
+ * // "metadata": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudscheduler.projects.locations.get
* @memberOf! ()
*
@@ -560,64 +558,52 @@ export namespace cloudscheduler_v1beta1 {
* cloudscheduler.projects.locations.list
* @desc Lists information about the supported locations for this service.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1beta1');
+ * const cloudscheduler = google.cloudscheduler('v1beta1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The resource that owns the locations collection, if applicable.
- * name: 'projects/my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var locationsPage = response['locations'];
- * if (!locationsPage) {
- * return;
- * }
- * for (var i = 0; i < locationsPage.length; i++) {
- * // TODO: Change code below to process each resource in `locationsPage`:
- * console.log(JSON.stringify(locationsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudScheduler.projects.locations.list(request, handlePage);
- * }
- * };
- *
- * cloudScheduler.projects.locations.list(request, handlePage);
- * });
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The resource that owns the locations collection, if applicable.
+ * name: 'projects/my-project',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "locations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudscheduler.projects.locations.list
* @memberOf! ()
*
@@ -743,57 +729,80 @@ export namespace cloudscheduler_v1beta1 {
* cloudscheduler.projects.locations.jobs.create
* @desc Creates a job.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1beta1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The location name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID`.
- * parent: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
+ * const cloudscheduler = google.cloudscheduler('v1beta1');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudScheduler.projects.locations.jobs.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.jobs.create({
+ * // Required. The location name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID`.
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "attemptDeadline": "my_attemptDeadline",
+ * // "description": "my_description",
+ * // "httpTarget": {},
+ * // "lastAttemptTime": "my_lastAttemptTime",
+ * // "name": "my_name",
+ * // "pubsubTarget": {},
+ * // "retryConfig": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "state": "my_state",
+ * // "status": {},
+ * // "timeZone": "my_timeZone",
+ * // "userUpdateTime": "my_userUpdateTime"
+ * // }
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "attemptDeadline": "my_attemptDeadline",
+ * // "description": "my_description",
+ * // "httpTarget": {},
+ * // "lastAttemptTime": "my_lastAttemptTime",
+ * // "name": "my_name",
+ * // "pubsubTarget": {},
+ * // "retryConfig": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "state": "my_state",
+ * // "status": {},
+ * // "timeZone": "my_timeZone",
+ * // "userUpdateTime": "my_userUpdateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudscheduler.projects.locations.jobs.create
* @memberOf! ()
*
@@ -869,50 +878,44 @@ export namespace cloudscheduler_v1beta1 {
* cloudscheduler.projects.locations.jobs.delete
* @desc Deletes a job.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1beta1');
+ * const cloudscheduler = google.cloudscheduler('v1beta1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The job name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
- * name: 'projects/my-project/locations/my-location/jobs/my-job', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudScheduler.projects.locations.jobs.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.jobs.delete({
+ * // Required. The job name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ * name: 'projects/my-project/locations/my-location/jobs/my-job',
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {}
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudscheduler.projects.locations.jobs.delete
* @memberOf! ()
*
@@ -984,53 +987,59 @@ export namespace cloudscheduler_v1beta1 {
* cloudscheduler.projects.locations.jobs.get
* @desc Gets a job.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1beta1');
+ * const cloudscheduler = google.cloudscheduler('v1beta1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The job name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
- * name: 'projects/my-project/locations/my-location/jobs/my-job', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudScheduler.projects.locations.jobs.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.jobs.get({
+ * // Required. The job name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ * name: 'projects/my-project/locations/my-location/jobs/my-job',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "attemptDeadline": "my_attemptDeadline",
+ * // "description": "my_description",
+ * // "httpTarget": {},
+ * // "lastAttemptTime": "my_lastAttemptTime",
+ * // "name": "my_name",
+ * // "pubsubTarget": {},
+ * // "retryConfig": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "state": "my_state",
+ * // "status": {},
+ * // "timeZone": "my_timeZone",
+ * // "userUpdateTime": "my_userUpdateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudscheduler.projects.locations.jobs.get
* @memberOf! ()
*
@@ -1102,66 +1111,62 @@ export namespace cloudscheduler_v1beta1 {
* cloudscheduler.projects.locations.jobs.list
* @desc Lists jobs.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1beta1');
+ * const cloudscheduler = google.cloudscheduler('v1beta1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The location name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID`.
- * parent: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var jobsPage = response['jobs'];
- * if (!jobsPage) {
- * return;
- * }
- * for (var i = 0; i < jobsPage.length; i++) {
- * // TODO: Change code below to process each resource in `jobsPage`:
- * console.log(JSON.stringify(jobsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudScheduler.projects.locations.jobs.list(request, handlePage);
- * }
- * };
- *
- * cloudScheduler.projects.locations.jobs.list(request, handlePage);
- * });
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.jobs.list({
+ * // Requested page size.
+ * //
+ * // The maximum page size is 500. If unspecified, the page size will
+ * // be the maximum. Fewer jobs than requested might be returned,
+ * // even if more jobs exist; use next_page_token to determine if more
+ * // jobs exist.
+ * pageSize: 'placeholder-value',
+ * // A token identifying a page of results the server will return. To
+ * // request the first page results, page_token must be empty. To
+ * // request the next page of results, page_token must be the value of
+ * // next_page_token returned from
+ * // the previous call to ListJobs. It is an error to
+ * // switch the value of filter or
+ * // order_by while iterating through pages.
+ * pageToken: 'placeholder-value',
+ * // Required. The location name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID`.
+ * parent: 'projects/my-project/locations/my-location',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "jobs": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudscheduler.projects.locations.jobs.list
* @memberOf! ()
*
@@ -1240,71 +1245,97 @@ export namespace cloudscheduler_v1beta1 {
* cloudscheduler.projects.locations.jobs.patch
* @desc Updates a job. If successful, the updated Job is returned. If the job does not exist, `NOT_FOUND` is returned. If UpdateJob does not successfully return, it is possible for the job to be in an Job.State.UPDATE_FAILED state. A job in this state may not be executed. If this happens, retry the UpdateJob request until a successful response is received.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1beta1');
+ * const cloudscheduler = google.cloudscheduler('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.jobs.patch({
* // Optionally caller-specified in CreateJob, after
* // which it becomes output only.
+ * //
* // The job name. For example:
* // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ * //
* // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
- * // hyphens (-), colons (:), or periods (.).
- * // For more information, see
- * // [Identifying
- * // projects]
- * // (https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
+ * // hyphens (-), colons (:), or periods (.).
+ * // For more information, see
+ * // [Identifying
+ * // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
* // * `LOCATION_ID` is the canonical ID for the job's location.
- * // The list of available locations can be obtained by calling
- * // ListLocations.
- * // For more information, see https://cloud.google.com/about/locations/.
+ * // The list of available locations can be obtained by calling
+ * // ListLocations.
+ * // For more information, see https://cloud.google.com/about/locations/.
* // * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
- * // hyphens (-), or underscores (_). The maximum length is 500 characters.
- * name: 'projects/my-project/locations/my-location/jobs/my-job', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * // hyphens (-), or underscores (_). The maximum length is 500 characters.
+ * name: 'projects/my-project/locations/my-location/jobs/my-job',
+ * // A mask used to specify which fields of the job are being updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "attemptDeadline": "my_attemptDeadline",
+ * // "description": "my_description",
+ * // "httpTarget": {},
+ * // "lastAttemptTime": "my_lastAttemptTime",
+ * // "name": "my_name",
+ * // "pubsubTarget": {},
+ * // "retryConfig": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "state": "my_state",
+ * // "status": {},
+ * // "timeZone": "my_timeZone",
+ * // "userUpdateTime": "my_userUpdateTime"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudScheduler.projects.locations.jobs.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "attemptDeadline": "my_attemptDeadline",
+ * // "description": "my_description",
+ * // "httpTarget": {},
+ * // "lastAttemptTime": "my_lastAttemptTime",
+ * // "name": "my_name",
+ * // "pubsubTarget": {},
+ * // "retryConfig": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "state": "my_state",
+ * // "status": {},
+ * // "timeZone": "my_timeZone",
+ * // "userUpdateTime": "my_userUpdateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudscheduler.projects.locations.jobs.patch
* @memberOf! ()
*
@@ -1378,57 +1409,65 @@ export namespace cloudscheduler_v1beta1 {
* cloudscheduler.projects.locations.jobs.pause
* @desc Pauses a job. If a job is paused then the system will stop executing the job until it is re-enabled via ResumeJob. The state of the job is stored in state; if paused it will be set to Job.State.PAUSED. A job must be in Job.State.ENABLED to be paused.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1beta1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The job name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
- * name: 'projects/my-project/locations/my-location/jobs/my-job', // TODO: Update placeholder value.
+ * const cloudscheduler = google.cloudscheduler('v1beta1');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudScheduler.projects.locations.jobs.pause(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.jobs.pause({
+ * // Required. The job name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ * name: 'projects/my-project/locations/my-location/jobs/my-job',
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "attemptDeadline": "my_attemptDeadline",
+ * // "description": "my_description",
+ * // "httpTarget": {},
+ * // "lastAttemptTime": "my_lastAttemptTime",
+ * // "name": "my_name",
+ * // "pubsubTarget": {},
+ * // "retryConfig": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "state": "my_state",
+ * // "status": {},
+ * // "timeZone": "my_timeZone",
+ * // "userUpdateTime": "my_userUpdateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudscheduler.projects.locations.jobs.pause
* @memberOf! ()
*
@@ -1504,57 +1543,65 @@ export namespace cloudscheduler_v1beta1 {
* cloudscheduler.projects.locations.jobs.resume
* @desc Resume a job. This method reenables a job after it has been Job.State.PAUSED. The state of a job is stored in Job.state; after calling this method it will be set to Job.State.ENABLED. A job must be in Job.State.PAUSED to be resumed.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1beta1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The job name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
- * name: 'projects/my-project/locations/my-location/jobs/my-job', // TODO: Update placeholder value.
+ * const cloudscheduler = google.cloudscheduler('v1beta1');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudScheduler.projects.locations.jobs.resume(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.jobs.resume({
+ * // Required. The job name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ * name: 'projects/my-project/locations/my-location/jobs/my-job',
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "attemptDeadline": "my_attemptDeadline",
+ * // "description": "my_description",
+ * // "httpTarget": {},
+ * // "lastAttemptTime": "my_lastAttemptTime",
+ * // "name": "my_name",
+ * // "pubsubTarget": {},
+ * // "retryConfig": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "state": "my_state",
+ * // "status": {},
+ * // "timeZone": "my_timeZone",
+ * // "userUpdateTime": "my_userUpdateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudscheduler.projects.locations.jobs.resume
* @memberOf! ()
*
@@ -1630,57 +1677,65 @@ export namespace cloudscheduler_v1beta1 {
* cloudscheduler.projects.locations.jobs.run
* @desc Forces a job to run now. When this method is called, Cloud Scheduler will dispatch the job, even if the job is already running.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Scheduler API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudscheduler
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudScheduler = google.cloudscheduler('v1beta1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The job name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
- * name: 'projects/my-project/locations/my-location/jobs/my-job', // TODO: Update placeholder value.
+ * const cloudscheduler = google.cloudscheduler('v1beta1');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudScheduler.projects.locations.jobs.run(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudscheduler.projects.locations.jobs.run({
+ * // Required. The job name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
+ * name: 'projects/my-project/locations/my-location/jobs/my-job',
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "attemptDeadline": "my_attemptDeadline",
+ * // "description": "my_description",
+ * // "httpTarget": {},
+ * // "lastAttemptTime": "my_lastAttemptTime",
+ * // "name": "my_name",
+ * // "pubsubTarget": {},
+ * // "retryConfig": {},
+ * // "schedule": "my_schedule",
+ * // "scheduleTime": "my_scheduleTime",
+ * // "state": "my_state",
+ * // "status": {},
+ * // "timeZone": "my_timeZone",
+ * // "userUpdateTime": "my_userUpdateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudscheduler.projects.locations.jobs.run
* @memberOf! ()
*
diff --git a/src/apis/cloudsearch/v1.ts b/src/apis/cloudsearch/v1.ts
index 84898c011e4..96f35c08d85 100644
--- a/src/apis/cloudsearch/v1.ts
+++ b/src/apis/cloudsearch/v1.ts
@@ -2191,6 +2191,63 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.debug.datasources.items.checkAccess
* @desc Checks whether an item is accessible by specified principal. **Note:** This API requires an admin account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.debug',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.debug.datasources.items.checkAccess({
+ * // If you are asked by Google to help with debugging, set this field.
+ * // Otherwise, ignore this field.
+ * 'debugOptions.enableDebugging': 'placeholder-value',
+ * // Item name, format:
+ * // datasources/{source_id}/items/{item_id}
+ * name: 'datasources/my-datasource/items/my-item',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "groupResourceName": "my_groupResourceName",
+ * // "gsuitePrincipal": {},
+ * // "userResourceName": "my_userResourceName"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "hasAccess": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.debug.datasources.items.checkAccess
* @memberOf! ()
*
@@ -2269,6 +2326,61 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.debug.datasources.items.searchByViewUrl
* @desc Fetches the item whose viewUrl exactly matches that of the URL provided in the request. **Note:** This API requires an admin account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.debug',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.debug.datasources.items.searchByViewUrl({
+ * // Source name, format:
+ * // datasources/{source_id}
+ * name: 'datasources/my-datasource',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "debugOptions": {},
+ * // "pageToken": "my_pageToken",
+ * // "viewUrl": "my_viewUrl"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.debug.datasources.items.searchByViewUrl
* @memberOf! ()
*
@@ -2399,6 +2511,59 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.debug.datasources.items.unmappedids.list
* @desc List all unmapped identities for a specific item. **Note:** This API requires an admin account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.debug',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.debug.datasources.items.unmappedids.list({
+ * // If you are asked by Google to help with debugging, set this field.
+ * // Otherwise, ignore this field.
+ * 'debugOptions.enableDebugging': 'placeholder-value',
+ * // Maximum number of items to fetch in a request.
+ * // Defaults to 100.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // The name of the item, in the following format:
+ * // datasources/{source_id}/items/{ID}
+ * parent: 'datasources/my-datasource/items/my-item',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "unmappedIdentities": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.debug.datasources.items.unmappedids.list
* @memberOf! ()
*
@@ -2530,6 +2695,65 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.debug.identitysources.items.listForunmappedidentity
* @desc Lists names of items associated with an unmapped identity. **Note:** This API requires an admin account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.debug',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.debug.identitysources.items.listForunmappedidentity(
+ * {
+ * // If you are asked by Google to help with debugging, set this field.
+ * // Otherwise, ignore this field.
+ * 'debugOptions.enableDebugging': 'placeholder-value',
+ *
+ * groupResourceName: 'placeholder-value',
+ * // Maximum number of items to fetch in a request.
+ * // Defaults to 100.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // The name of the identity source, in the following format:
+ * // identitysources/{source_id}}
+ * parent: 'identitysources/my-identitysource',
+ *
+ * userResourceName: 'placeholder-value',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "itemNames": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.debug.identitysources.items.listForunmappedidentity
* @memberOf! ()
*
@@ -2665,6 +2889,61 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.debug.identitysources.unmappedids.list
* @desc Lists unmapped user identities for an identity source. **Note:** This API requires an admin account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.debug',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.debug.identitysources.unmappedids.list({
+ * // If you are asked by Google to help with debugging, set this field.
+ * // Otherwise, ignore this field.
+ * 'debugOptions.enableDebugging': 'placeholder-value',
+ * // Maximum number of items to fetch in a request.
+ * // Defaults to 100.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // The name of the identity source, in the following format:
+ * // identitysources/{source_id}
+ * parent: 'identitysources/my-identitysource',
+ * // Limit users selection to this status.
+ * resolutionStatusCode: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "unmappedIdentities": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.debug.identitysources.unmappedids.list
* @memberOf! ()
*
@@ -2799,6 +3078,58 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.indexing.datasources.deleteSchema
* @desc Deletes the schema of a data source. **Note:** This API requires an admin or service account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.settings',
+ * 'https://www.googleapis.com/auth/cloud_search.settings.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.indexing.datasources.deleteSchema({
+ * // If you are asked by Google to help with debugging, set this field.
+ * // Otherwise, ignore this field.
+ * 'debugOptions.enableDebugging': 'placeholder-value',
+ * // Name of the data source to delete Schema. Format:
+ * // datasources/{source_id}
+ * name: 'datasources/my-datasource',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.indexing.datasources.deleteSchema
* @memberOf! ()
*
@@ -2874,6 +3205,55 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.indexing.datasources.getSchema
* @desc Gets the schema of a data source. **Note:** This API requires an admin or service account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.settings',
+ * 'https://www.googleapis.com/auth/cloud_search.settings.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.indexing.datasources.getSchema({
+ * // If you are asked by Google to help with debugging, set this field.
+ * // Otherwise, ignore this field.
+ * 'debugOptions.enableDebugging': 'placeholder-value',
+ * // Name of the data source to get Schema. Format:
+ * // datasources/{source_id}
+ * name: 'datasources/my-datasource',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "objectDefinitions": [],
+ * // "operationIds": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.indexing.datasources.getSchema
* @memberOf! ()
*
@@ -2947,6 +3327,65 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.indexing.datasources.updateSchema
* @desc Updates the schema of a data source. This method does not perform incremental updates to the schema. Instead, this method updates the schema by overwriting the entire schema. **Note:** This API requires an admin or service account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.settings',
+ * 'https://www.googleapis.com/auth/cloud_search.settings.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.indexing.datasources.updateSchema({
+ * // Name of the data source to update Schema. Format:
+ * // datasources/{source_id}
+ * name: 'datasources/my-datasource',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "debugOptions": {},
+ * // "schema": {},
+ * // "validateOnly": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.indexing.datasources.updateSchema
* @memberOf! ()
*
@@ -3079,6 +3518,72 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.indexing.datasources.items.delete
* @desc Deletes Item resource for the specified resource name. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.indexing.datasources.items.delete({
+ * // Name of connector making this call.
+ * //
Format: datasources/{source_id}/connectors/{ID}
+ * connectorName: 'placeholder-value',
+ * // If you are asked by Google to help with debugging, set this field.
+ * // Otherwise, ignore this field.
+ * 'debugOptions.enableDebugging': 'placeholder-value',
+ * // Required. The RequestMode for this request.
+ * mode: 'placeholder-value',
+ * // Required. Name of the item to delete.
+ * // Format: datasources/{source_id}/items/{item_id}
+ * name: 'datasources/my-datasource/items/my-item',
+ * // Required. The incremented version of the item to delete from the index.
+ * // The indexing system stores the version from the datasource as a
+ * // byte string and compares the Item version in the index
+ * // to the version of the queued Item using lexical ordering.
+ * //
+ * // Cloud Search Indexing won't delete any queued item with
+ * // a version value that is less than or equal to
+ * // the version of the currently indexed item.
+ * // The maximum length for this field is 1024 bytes.
+ * version: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.indexing.datasources.items.delete
* @memberOf! ()
*
@@ -3157,6 +3662,64 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.indexing.datasources.items.deleteQueueItems
* @desc Deletes all items in a queue. This method is useful for deleting stale items. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.indexing.datasources.items.deleteQueueItems({
+ * // Name of the Data Source to delete items in a queue.
+ * // Format: datasources/{source_id}
+ * name: 'datasources/my-datasource',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "connectorName": "my_connectorName",
+ * // "debugOptions": {},
+ * // "queue": "my_queue"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.indexing.datasources.items.deleteQueueItems
* @memberOf! ()
*
@@ -3231,6 +3794,65 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.indexing.datasources.items.get
* @desc Gets Item resource by item name. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.indexing.datasources.items.get({
+ * // Name of connector making this call.
+ * //
Format: datasources/{source_id}/connectors/{ID}
+ * connectorName: 'placeholder-value',
+ * // If you are asked by Google to help with debugging, set this field.
+ * // Otherwise, ignore this field.
+ * 'debugOptions.enableDebugging': 'placeholder-value',
+ * // Name of the item to get info.
+ * // Format: datasources/{source_id}/items/{item_id}
+ * name: 'datasources/my-datasource/items/my-item',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "acl": {},
+ * // "content": {},
+ * // "itemType": "my_itemType",
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "payload": "my_payload",
+ * // "queue": "my_queue",
+ * // "status": {},
+ * // "structuredData": {},
+ * // "version": "my_version"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.indexing.datasources.items.get
* @memberOf! ()
*
@@ -3305,6 +3927,68 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.indexing.datasources.items.index
* @desc Updates Item ACL, metadata, and content. It will insert the Item if it does not exist. This method does not support partial updates. Fields with no provided values are cleared out in the Cloud Search index. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.indexing.datasources.items.index({
+ * // Name of the Item. Format:
+ * // datasources/{source_id}/items/{item_id}
+ * //
This is a required field.
+ * // The maximum length is 1536 characters.
+ * name: 'datasources/my-datasource/items/my-item',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "connectorName": "my_connectorName",
+ * // "debugOptions": {},
+ * // "indexItemOptions": {},
+ * // "item": {},
+ * // "mode": "my_mode"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.indexing.datasources.items.index
* @memberOf! ()
*
@@ -3380,6 +4064,84 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.indexing.datasources.items.list
* @desc Lists all or a subset of Item resources. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.indexing.datasources.items.list({
+ * // When set to true, the indexing system only populates the following fields:
+ * // name,
+ * // version,
+ * // queue.
+ * // metadata.hash,
+ * // metadata.title,
+ * // metadata.sourceRepositoryURL,
+ * // metadata.objectType,
+ * // metadata.createTime,
+ * // metadata.updateTime,
+ * // metadata.contentLanguage,
+ * // metadata.mimeType,
+ * // structured_data.hash,
+ * // content.hash,
+ * // itemType,
+ * // itemStatus.code,
+ * // itemStatus.processingError.code,
+ * // itemStatus.repositoryError.type,
+ * //
If this value is false, then all the fields are populated in Item.
+ * brief: 'placeholder-value',
+ * // Name of connector making this call.
+ * //
Format: datasources/{source_id}/connectors/{ID}
+ * connectorName: 'placeholder-value',
+ * // If you are asked by Google to help with debugging, set this field.
+ * // Otherwise, ignore this field.
+ * 'debugOptions.enableDebugging': 'placeholder-value',
+ * // Name of the Data Source to list Items. Format:
+ * // datasources/{source_id}
+ * name: 'datasources/my-datasource',
+ * // Maximum number of items to fetch in a request.
+ * // The max value is 1000 when brief is true. The max value is 10 if brief
+ * // is false.
+ * //
The default value is 10
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.indexing.datasources.items.list
* @memberOf! ()
*
@@ -3459,6 +4221,62 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.indexing.datasources.items.poll
* @desc Polls for unreserved items from the indexing queue and marks a set as reserved, starting with items that have the oldest timestamp from the highest priority ItemStatus. The priority order is as follows:
ERROR
MODIFIED
NEW_ITEM
ACCEPTED
Reserving items ensures that polling from other threads cannot create overlapping sets. After handling the reserved items, the client should put items back into the unreserved state, either by calling index, or by calling push with the type REQUEUE. Items automatically become available (unreserved) after 4 hours even if no update or push method is called. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.indexing.datasources.items.poll({
+ * // Name of the Data Source to poll items.
+ * // Format: datasources/{source_id}
+ * name: 'datasources/my-datasource',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "connectorName": "my_connectorName",
+ * // "debugOptions": {},
+ * // "limit": 0,
+ * // "queue": "my_queue",
+ * // "statusCodes": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.indexing.datasources.items.poll
* @memberOf! ()
*
@@ -3534,6 +4352,72 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.indexing.datasources.items.push
* @desc Pushes an item onto a queue for later polling and updating. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.indexing.datasources.items.push({
+ * // Name of the item to
+ * // push into the indexing queue.
+ * // Format: datasources/{source_id}/items/{ID}
+ * //
This is a required field.
+ * // The maximum length is 1536 characters.
+ * name: 'datasources/my-datasource/items/my-item',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "connectorName": "my_connectorName",
+ * // "debugOptions": {},
+ * // "item": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "acl": {},
+ * // "content": {},
+ * // "itemType": "my_itemType",
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "payload": "my_payload",
+ * // "queue": "my_queue",
+ * // "status": {},
+ * // "structuredData": {},
+ * // "version": "my_version"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.indexing.datasources.items.push
* @memberOf! ()
*
@@ -3607,6 +4491,64 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.indexing.datasources.items.unreserve
* @desc Unreserves all items from a queue, making them all eligible to be polled. This method is useful for resetting the indexing queue after a connector has been restarted. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.indexing.datasources.items.unreserve({
+ * // Name of the Data Source to unreserve all items.
+ * // Format: datasources/{source_id}
+ * name: 'datasources/my-datasource',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "connectorName": "my_connectorName",
+ * // "debugOptions": {},
+ * // "queue": "my_queue"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.indexing.datasources.items.unreserve
* @memberOf! ()
*
@@ -3682,6 +4624,60 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.indexing.datasources.items.upload
* @desc Creates an upload session for uploading item content. For items smaller than 100 KB, it's easier to embed the content inline within an index request. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.indexing.datasources.items.upload({
+ * // Name of the Item to start a resumable upload.
+ * // Format: datasources/{source_id}/items/{item_id}.
+ * // The maximum length is 1536 bytes.
+ * name: 'datasources/my-datasource/items/my-item',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "connectorName": "my_connectorName",
+ * // "debugOptions": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.indexing.datasources.items.upload
* @memberOf! ()
*
@@ -3947,6 +4943,62 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.media.upload
* @desc Uploads media for indexing. The upload endpoint supports direct and resumable upload protocols and is intended for large items that can not be [inlined during index requests](https://developers.google.com/cloud-search/docs/reference/rest/v1/indexing.datasources.items#itemcontent). To index large content: 1. Call indexing.datasources.items.upload with the resource name to begin an upload session and retrieve the UploadItemRef. 1. Call media.upload to upload the content using the same resource name from step 1. 1. Call indexing.datasources.items.index to index the item. Populate the [ItemContent](/cloud-search/docs/reference/rest/v1/indexing.datasources.items#ItemContent) with the UploadItemRef from step 1. For additional information, see [Create a content connector using the REST API](https://developers.google.com/cloud-search/docs/guides/content-connector#rest). **Note:** This API requires a service account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.media.upload({
+ * // Name of the media that is being downloaded. See
+ * // ReadRequest.resource_name.
+ * resourceName: '.*',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourceName": "my_resourceName"
+ * // }
+ * },
+ * media: {
+ * mimeType: 'placeholder-value',
+ * body: 'placeholder-value',
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "resourceName": "my_resourceName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.media.upload
* @memberOf! ()
*
@@ -4065,6 +5117,57 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.debug',
+ * 'https://www.googleapis.com/auth/cloud_search.indexing',
+ * 'https://www.googleapis.com/auth/cloud_search.settings',
+ * 'https://www.googleapis.com/auth/cloud_search.settings.indexing',
+ * 'https://www.googleapis.com/auth/cloud_search.settings.query',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.operations.get({
+ * // The name of the operation resource.
+ * name: 'operations/.*',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.operations.get
* @memberOf! ()
*
@@ -4156,6 +5259,71 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.query.search
* @desc The Cloud Search Query API provides the search method, which returns the most relevant results from a user query. The results can come from G Suite Apps, such as Gmail or Google Drive, or they can come from data that you have indexed from a third party. **Note:** This API requires a standard end user account to execute. A service account can't perform Query API requests directly; to use a service account to perform queries, set up [G Suite domain-wide delegation of authority](https://developers.google.com/cloud-search/docs/guides/delegation/).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.query',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.query.search({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "dataSourceRestrictions": [],
+ * // "facetOptions": [],
+ * // "pageSize": 0,
+ * // "query": "my_query",
+ * // "queryInterpretationOptions": {},
+ * // "requestOptions": {},
+ * // "sortOptions": {},
+ * // "start": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "debugInfo": {},
+ * // "errorInfo": {},
+ * // "facetResults": [],
+ * // "hasMoreResults": false,
+ * // "queryInterpretation": {},
+ * // "resultCountEstimate": "my_resultCountEstimate",
+ * // "resultCountExact": "my_resultCountExact",
+ * // "resultCounts": {},
+ * // "results": [],
+ * // "spellResults": [],
+ * // "structuredResults": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.query.search
* @memberOf! ()
*
@@ -4226,6 +5394,56 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.query.suggest
* @desc Provides suggestions for autocompleting the query. **Note:** This API requires a standard end user account to execute. A service account can't perform Query API requests directly; to use a service account to perform queries, set up [G Suite domain-wide delegation of authority](https://developers.google.com/cloud-search/docs/guides/delegation/).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.query',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.query.suggest({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "dataSourceRestrictions": [],
+ * // "query": "my_query",
+ * // "requestOptions": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "suggestResults": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.query.suggest
* @memberOf! ()
*
@@ -4326,6 +5544,79 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.query.sources.list
* @desc Returns list of sources that user can use for Search and Suggest APIs. **Note:** This API requires a standard end user account to execute. A service account can't perform Query API requests directly; to use a service account to perform queries, set up [G Suite domain-wide delegation of authority](https://developers.google.com/cloud-search/docs/guides/delegation/).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.query',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.query.sources.list({
+ * // Number of sources to return in the response.
+ * pageToken: 'placeholder-value',
+ * // If you are asked by Google to help with debugging, set this field.
+ * // Otherwise, ignore this field.
+ * 'requestOptions.debugOptions.enableDebugging': 'placeholder-value',
+ * // The BCP-47 language code, such as "en-US" or "sr-Latn".
+ * // For more information, see
+ * // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ * // For translations.
+ * //
+ * // Set this field using the language set in browser or for the page. In the
+ * // event that the user's language preference is known, set this field to the
+ * // known user language.
+ * //
+ * // When specified, the documents in search results are biased towards the
+ * // specified language.
+ * //
+ * // The suggest API does not use this parameter. Instead, suggest autocompletes
+ * // only based on characters in the query.
+ * 'requestOptions.languageCode': 'placeholder-value',
+ * // The ID generated when you create a search application using the
+ * // [admin console](https://support.google.com/a/answer/9043922).
+ * 'requestOptions.searchApplicationId': 'placeholder-value',
+ * // Current user's time zone id, such as "America/Los_Angeles" or
+ * // "Australia/Sydney". These IDs are defined by
+ * // [Unicode Common Locale Data Repository (CLDR)](http://cldr.unicode.org/)
+ * // project, and currently available in the file
+ * // [timezone.xml](http://unicode.org/repos/cldr/trunk/common/bcp47/timezone.xml).
+ * // This field is used to correctly interpret date and time queries.
+ * // If this field is not specified, the default time zone (UTC) is used.
+ * 'requestOptions.timeZone': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "sources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.query.sources.list
* @memberOf! ()
*
@@ -4452,6 +5743,66 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.settings.datasources.create
* @desc Creates a datasource. **Note:** This API requires an admin account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.settings',
+ * 'https://www.googleapis.com/auth/cloud_search.settings.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.settings.datasources.create({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "disableModifications": false,
+ * // "disableServing": false,
+ * // "displayName": "my_displayName",
+ * // "indexingServiceAccounts": [],
+ * // "itemsVisibility": [],
+ * // "name": "my_name",
+ * // "operationIds": [],
+ * // "shortName": "my_shortName"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.settings.datasources.create
* @memberOf! ()
*
@@ -4526,6 +5877,58 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.settings.datasources.delete
* @desc Deletes a datasource. **Note:** This API requires an admin account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.settings',
+ * 'https://www.googleapis.com/auth/cloud_search.settings.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.settings.datasources.delete({
+ * // If you are asked by Google to help with debugging, set this field.
+ * // Otherwise, ignore this field.
+ * 'debugOptions.enableDebugging': 'placeholder-value',
+ * // Name of the datasource.
+ * // Format: datasources/{source_id}.
+ * name: 'datasources/my-datasource',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.settings.datasources.delete
* @memberOf! ()
*
@@ -4601,6 +6004,61 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.settings.datasources.get
* @desc Gets a datasource. **Note:** This API requires an admin account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.settings',
+ * 'https://www.googleapis.com/auth/cloud_search.settings.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.settings.datasources.get({
+ * // If you are asked by Google to help with debugging, set this field.
+ * // Otherwise, ignore this field.
+ * 'debugOptions.enableDebugging': 'placeholder-value',
+ * // Name of the datasource resource.
+ * // Format: datasources/{source_id}.
+ * name: 'datasources/my-datasource',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "disableModifications": false,
+ * // "disableServing": false,
+ * // "displayName": "my_displayName",
+ * // "indexingServiceAccounts": [],
+ * // "itemsVisibility": [],
+ * // "name": "my_name",
+ * // "operationIds": [],
+ * // "shortName": "my_shortName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.settings.datasources.get
* @memberOf! ()
*
@@ -4676,6 +6134,58 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.settings.datasources.list
* @desc Lists datasources. **Note:** This API requires an admin account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.settings',
+ * 'https://www.googleapis.com/auth/cloud_search.settings.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.settings.datasources.list({
+ * // If you are asked by Google to help with debugging, set this field.
+ * // Otherwise, ignore this field.
+ * 'debugOptions.enableDebugging': 'placeholder-value',
+ * // Maximum number of datasources to fetch in a request.
+ * // The max value is 100.
+ * //
The default value is 10
+ * pageSize: 'placeholder-value',
+ * // Starting index of the results.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "sources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.settings.datasources.list
* @memberOf! ()
*
@@ -4754,6 +6264,65 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.settings.datasources.update
* @desc Updates a datasource. **Note:** This API requires an admin account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.settings',
+ * 'https://www.googleapis.com/auth/cloud_search.settings.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.settings.datasources.update({
+ * // Name of the datasource resource.
+ * // Format: datasources/{source_id}.
+ * //
The name is ignored when creating a datasource.
+ * name: 'datasources/my-datasource',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "debugOptions": {},
+ * // "source": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.settings.datasources.update
* @memberOf! ()
*
@@ -4918,6 +6487,66 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.settings.searchapplications.create
* @desc Creates a search application. **Note:** This API requires an admin account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.settings',
+ * 'https://www.googleapis.com/auth/cloud_search.settings.query',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.settings.searchapplications.create({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "dataSourceRestrictions": [],
+ * // "defaultFacetOptions": [],
+ * // "defaultSortOptions": {},
+ * // "displayName": "my_displayName",
+ * // "name": "my_name",
+ * // "operationIds": [],
+ * // "scoringConfig": {},
+ * // "sourceConfig": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.settings.searchapplications.create
* @memberOf! ()
*
@@ -4992,6 +6621,58 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.settings.searchapplications.delete
* @desc Deletes a search application. **Note:** This API requires an admin account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.settings',
+ * 'https://www.googleapis.com/auth/cloud_search.settings.query',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.settings.searchapplications.delete({
+ * // If you are asked by Google to help with debugging, set this field.
+ * // Otherwise, ignore this field.
+ * 'debugOptions.enableDebugging': 'placeholder-value',
+ * // The name of the search application to be deleted.
+ * //
Format: applications/{application_id}.
+ * name: 'searchapplications/my-searchapplication',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.settings.searchapplications.delete
* @memberOf! ()
*
@@ -5067,6 +6748,61 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.settings.searchapplications.get
* @desc Gets the specified search application. **Note:** This API requires an admin account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.settings',
+ * 'https://www.googleapis.com/auth/cloud_search.settings.query',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.settings.searchapplications.get({
+ * // If you are asked by Google to help with debugging, set this field.
+ * // Otherwise, ignore this field.
+ * 'debugOptions.enableDebugging': 'placeholder-value',
+ * // Name of the search application.
+ * //
Format: applications/{application_id}.
+ * name: 'searchapplications/my-searchapplication',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dataSourceRestrictions": [],
+ * // "defaultFacetOptions": [],
+ * // "defaultSortOptions": {},
+ * // "displayName": "my_displayName",
+ * // "name": "my_name",
+ * // "operationIds": [],
+ * // "scoringConfig": {},
+ * // "sourceConfig": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.settings.searchapplications.get
* @memberOf! ()
*
@@ -5142,6 +6878,57 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.settings.searchapplications.list
* @desc Lists all search applications. **Note:** This API requires an admin account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.settings',
+ * 'https://www.googleapis.com/auth/cloud_search.settings.query',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.settings.searchapplications.list({
+ * // If you are asked by Google to help with debugging, set this field.
+ * // Otherwise, ignore this field.
+ * 'debugOptions.enableDebugging': 'placeholder-value',
+ * // The maximum number of items to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * //
The default value is 10
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "searchApplications": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.settings.searchapplications.list
* @memberOf! ()
*
@@ -5227,6 +7014,63 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.settings.searchapplications.reset
* @desc Resets a search application to default settings. This will return an empty response. **Note:** This API requires an admin account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.settings',
+ * 'https://www.googleapis.com/auth/cloud_search.settings.query',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.settings.searchapplications.reset({
+ * // The name of the search application to be reset.
+ * //
Format: applications/{application_id}.
+ * name: 'searchapplications/my-searchapplication',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "debugOptions": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.settings.searchapplications.reset
* @memberOf! ()
*
@@ -5302,6 +7146,70 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.settings.searchapplications.update
* @desc Updates a search application. **Note:** This API requires an admin account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.settings',
+ * 'https://www.googleapis.com/auth/cloud_search.settings.query',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.settings.searchapplications.update({
+ * // Name of the Search Application.
+ * //
Format: searchapplications/{application_id}.
+ * name: 'searchapplications/my-searchapplication',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "dataSourceRestrictions": [],
+ * // "defaultFacetOptions": [],
+ * // "defaultSortOptions": {},
+ * // "displayName": "my_displayName",
+ * // "name": "my_name",
+ * // "operationIds": [],
+ * // "scoringConfig": {},
+ * // "sourceConfig": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.settings.searchapplications.update
* @memberOf! ()
*
@@ -5491,6 +7399,60 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.stats.getIndex
* @desc Gets indexed item statistics aggreggated across all data sources. This API only returns statistics for previous dates; it doesn't return statistics for the current day. **Note:** This API requires a standard end user account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.stats',
+ * 'https://www.googleapis.com/auth/cloud_search.stats.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.stats.getIndex({
+ * // Day of month. Must be from 1 to 31 and valid for the year and month.
+ * 'fromDate.day': 'placeholder-value',
+ * // Month of date. Must be from 1 to 12.
+ * 'fromDate.month': 'placeholder-value',
+ * // Year of date. Must be from 1 to 9999.
+ * 'fromDate.year': 'placeholder-value',
+ * // Day of month. Must be from 1 to 31 and valid for the year and month.
+ * 'toDate.day': 'placeholder-value',
+ * // Month of date. Must be from 1 to 12.
+ * 'toDate.month': 'placeholder-value',
+ * // Year of date. Must be from 1 to 9999.
+ * 'toDate.year': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "stats": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.stats.getIndex
* @memberOf! ()
*
@@ -5575,6 +7537,60 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.stats.getQuery
* @desc Get the query statistics for customer. **Note:** This API requires a standard end user account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.stats',
+ * 'https://www.googleapis.com/auth/cloud_search.stats.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.stats.getQuery({
+ * // Day of month. Must be from 1 to 31 and valid for the year and month.
+ * 'fromDate.day': 'placeholder-value',
+ * // Month of date. Must be from 1 to 12.
+ * 'fromDate.month': 'placeholder-value',
+ * // Year of date. Must be from 1 to 9999.
+ * 'fromDate.year': 'placeholder-value',
+ * // Day of month. Must be from 1 to 31 and valid for the year and month.
+ * 'toDate.day': 'placeholder-value',
+ * // Month of date. Must be from 1 to 12.
+ * 'toDate.month': 'placeholder-value',
+ * // Year of date. Must be from 1 to 9999.
+ * 'toDate.year': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "stats": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.stats.getQuery
* @memberOf! ()
*
@@ -5659,6 +7675,60 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.stats.getSession
* @desc Get the # of search sessions, % of successful sessions with a click query statistics for customer. **Note:** This API requires a standard end user account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.stats',
+ * 'https://www.googleapis.com/auth/cloud_search.stats.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.stats.getSession({
+ * // Day of month. Must be from 1 to 31 and valid for the year and month.
+ * 'fromDate.day': 'placeholder-value',
+ * // Month of date. Must be from 1 to 12.
+ * 'fromDate.month': 'placeholder-value',
+ * // Year of date. Must be from 1 to 9999.
+ * 'fromDate.year': 'placeholder-value',
+ * // Day of month. Must be from 1 to 31 and valid for the year and month.
+ * 'toDate.day': 'placeholder-value',
+ * // Month of date. Must be from 1 to 12.
+ * 'toDate.month': 'placeholder-value',
+ * // Year of date. Must be from 1 to 9999.
+ * 'toDate.year': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "stats": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.stats.getSession
* @memberOf! ()
*
@@ -5743,6 +7813,60 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.stats.getUser
* @desc Get the users statistics for customer. **Note:** This API requires a standard end user account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.stats',
+ * 'https://www.googleapis.com/auth/cloud_search.stats.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.stats.getUser({
+ * // Day of month. Must be from 1 to 31 and valid for the year and month.
+ * 'fromDate.day': 'placeholder-value',
+ * // Month of date. Must be from 1 to 12.
+ * 'fromDate.month': 'placeholder-value',
+ * // Year of date. Must be from 1 to 9999.
+ * 'fromDate.year': 'placeholder-value',
+ * // Day of month. Must be from 1 to 31 and valid for the year and month.
+ * 'toDate.day': 'placeholder-value',
+ * // Month of date. Must be from 1 to 12.
+ * 'toDate.month': 'placeholder-value',
+ * // Year of date. Must be from 1 to 9999.
+ * 'toDate.year': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "stats": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.stats.getUser
* @memberOf! ()
*
@@ -5968,6 +8092,63 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.stats.index.datasources.get
* @desc Gets indexed item statistics for a single data source. **Note:** This API requires a standard end user account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.stats',
+ * 'https://www.googleapis.com/auth/cloud_search.stats.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.stats.index.datasources.get({
+ * // Day of month. Must be from 1 to 31 and valid for the year and month.
+ * 'fromDate.day': 'placeholder-value',
+ * // Month of date. Must be from 1 to 12.
+ * 'fromDate.month': 'placeholder-value',
+ * // Year of date. Must be from 1 to 9999.
+ * 'fromDate.year': 'placeholder-value',
+ * // The resource id of the data source to retrieve statistics for,
+ * // in the following format: "datasources/{source_id}"
+ * name: 'datasources/my-datasource',
+ * // Day of month. Must be from 1 to 31 and valid for the year and month.
+ * 'toDate.day': 'placeholder-value',
+ * // Month of date. Must be from 1 to 12.
+ * 'toDate.month': 'placeholder-value',
+ * // Year of date. Must be from 1 to 9999.
+ * 'toDate.year': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "stats": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.stats.index.datasources.get
* @memberOf! ()
*
@@ -6112,6 +8293,63 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.stats.query.searchapplications.get
* @desc Get the query statistics for search application. **Note:** This API requires a standard end user account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.stats',
+ * 'https://www.googleapis.com/auth/cloud_search.stats.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.stats.query.searchapplications.get({
+ * // Day of month. Must be from 1 to 31 and valid for the year and month.
+ * 'fromDate.day': 'placeholder-value',
+ * // Month of date. Must be from 1 to 12.
+ * 'fromDate.month': 'placeholder-value',
+ * // Year of date. Must be from 1 to 9999.
+ * 'fromDate.year': 'placeholder-value',
+ * // The resource id of the search application query stats, in the following
+ * // format: searchapplications/{application_id}
+ * name: 'searchapplications/my-searchapplication',
+ * // Day of month. Must be from 1 to 31 and valid for the year and month.
+ * 'toDate.day': 'placeholder-value',
+ * // Month of date. Must be from 1 to 12.
+ * 'toDate.month': 'placeholder-value',
+ * // Year of date. Must be from 1 to 9999.
+ * 'toDate.year': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "stats": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.stats.query.searchapplications.get
* @memberOf! ()
*
@@ -6264,6 +8502,63 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.stats.session.searchapplications.get
* @desc Get the # of search sessions, % of successful sessions with a click query statistics for search application. **Note:** This API requires a standard end user account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.stats',
+ * 'https://www.googleapis.com/auth/cloud_search.stats.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.stats.session.searchapplications.get({
+ * // Day of month. Must be from 1 to 31 and valid for the year and month.
+ * 'fromDate.day': 'placeholder-value',
+ * // Month of date. Must be from 1 to 12.
+ * 'fromDate.month': 'placeholder-value',
+ * // Year of date. Must be from 1 to 9999.
+ * 'fromDate.year': 'placeholder-value',
+ * // The resource id of the search application session stats, in the following
+ * // format: searchapplications/{application_id}
+ * name: 'searchapplications/my-searchapplication',
+ * // Day of month. Must be from 1 to 31 and valid for the year and month.
+ * 'toDate.day': 'placeholder-value',
+ * // Month of date. Must be from 1 to 12.
+ * 'toDate.month': 'placeholder-value',
+ * // Year of date. Must be from 1 to 9999.
+ * 'toDate.year': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "stats": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.stats.session.searchapplications.get
* @memberOf! ()
*
@@ -6416,6 +8711,63 @@ export namespace cloudsearch_v1 {
/**
* cloudsearch.stats.user.searchapplications.get
* @desc Get the users statistics for search application. **Note:** This API requires a standard end user account to execute.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudsearch = google.cloudsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud_search',
+ * 'https://www.googleapis.com/auth/cloud_search.stats',
+ * 'https://www.googleapis.com/auth/cloud_search.stats.indexing',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudsearch.stats.user.searchapplications.get({
+ * // Day of month. Must be from 1 to 31 and valid for the year and month.
+ * 'fromDate.day': 'placeholder-value',
+ * // Month of date. Must be from 1 to 12.
+ * 'fromDate.month': 'placeholder-value',
+ * // Year of date. Must be from 1 to 9999.
+ * 'fromDate.year': 'placeholder-value',
+ * // The resource id of the search application session stats, in the following
+ * // format: searchapplications/{application_id}
+ * name: 'searchapplications/my-searchapplication',
+ * // Day of month. Must be from 1 to 31 and valid for the year and month.
+ * 'toDate.day': 'placeholder-value',
+ * // Month of date. Must be from 1 to 12.
+ * 'toDate.month': 'placeholder-value',
+ * // Year of date. Must be from 1 to 9999.
+ * 'toDate.year': 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "stats": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudsearch.stats.user.searchapplications.get
* @memberOf! ()
*
diff --git a/src/apis/cloudshell/v1.ts b/src/apis/cloudshell/v1.ts
index 24b9520ed8c..0d521fc9ac9 100644
--- a/src/apis/cloudshell/v1.ts
+++ b/src/apis/cloudshell/v1.ts
@@ -274,6 +274,50 @@ export namespace cloudshell_v1 {
/**
* cloudshell.operations.cancel
* @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudshell.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudshell = google.cloudshell('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudshell.operations.cancel({
+ * // The name of the operation resource to be cancelled.
+ * name: 'operations/.*',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudshell.operations.cancel
* @memberOf! ()
*
@@ -344,6 +388,44 @@ export namespace cloudshell_v1 {
/**
* cloudshell.operations.delete
* @desc Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudshell.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudshell = google.cloudshell('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudshell.operations.delete({
+ * // The name of the operation resource to be deleted.
+ * name: 'operations/.*',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudshell.operations.delete
* @memberOf! ()
*
@@ -413,6 +495,50 @@ export namespace cloudshell_v1 {
/**
* cloudshell.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudshell.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudshell = google.cloudshell('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudshell.operations.get({
+ * // The name of the operation resource.
+ * name: 'operations/.*',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudshell.operations.get
* @memberOf! ()
*
@@ -483,6 +609,53 @@ export namespace cloudshell_v1 {
/**
* cloudshell.operations.list
* @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudshell.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudshell = google.cloudshell('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudshell.operations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The name of the operation's parent resource.
+ * name: 'operations',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudshell.operations.list
* @memberOf! ()
*
diff --git a/src/apis/cloudshell/v1alpha1.ts b/src/apis/cloudshell/v1alpha1.ts
index f194125565b..670368dcd48 100644
--- a/src/apis/cloudshell/v1alpha1.ts
+++ b/src/apis/cloudshell/v1alpha1.ts
@@ -309,6 +309,56 @@ export namespace cloudshell_v1alpha1 {
/**
* cloudshell.users.environments.authorize
* @desc Sends OAuth credentials to a running environment on behalf of a user. When this completes, the environment will be authorized to run various Google Cloud command line tools without requiring the user to manually authenticate.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudshell.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudshell = google.cloudshell('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudshell.users.environments.authorize({
+ * // Name of the resource that should receive the credentials, for example
+ * // `users/me/environments/default` or
+ * // `users/someone@example.com/environments/default`.
+ * name: 'users/my-user/environments/my-environment',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accessToken": "my_accessToken",
+ * // "expireTime": "my_expireTime",
+ * // "idToken": "my_idToken"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudshell.users.environments.authorize
* @memberOf! ()
*
@@ -382,6 +432,58 @@ export namespace cloudshell_v1alpha1 {
/**
* cloudshell.users.environments.get
* @desc Gets an environment. Returns NOT_FOUND if the environment does not exist.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudshell.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudshell = google.cloudshell('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudshell.users.environments.get({
+ * // Name of the requested resource, for example `users/me/environments/default`
+ * // or `users/someone@example.com/environments/default`.
+ * name: 'users/my-user/environments/my-environment',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dockerImage": "my_dockerImage",
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "publicKeys": [],
+ * // "size": "my_size",
+ * // "sshHost": "my_sshHost",
+ * // "sshPort": 0,
+ * // "sshUsername": "my_sshUsername",
+ * // "state": "my_state",
+ * // "vmSizeExpireTime": "my_vmSizeExpireTime",
+ * // "webHost": "my_webHost",
+ * // "webPorts": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudshell.users.environments.get
* @memberOf! ()
*
@@ -453,6 +555,80 @@ export namespace cloudshell_v1alpha1 {
/**
* cloudshell.users.environments.patch
* @desc Updates an existing environment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudshell.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudshell = google.cloudshell('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudshell.users.environments.patch({
+ * // Name of the resource to be updated, for example
+ * // `users/me/environments/default` or
+ * // `users/someone@example.com/environments/default`.
+ * name: 'users/my-user/environments/my-environment',
+ * // Mask specifying which fields in the environment should be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "dockerImage": "my_dockerImage",
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "publicKeys": [],
+ * // "size": "my_size",
+ * // "sshHost": "my_sshHost",
+ * // "sshPort": 0,
+ * // "sshUsername": "my_sshUsername",
+ * // "state": "my_state",
+ * // "vmSizeExpireTime": "my_vmSizeExpireTime",
+ * // "webHost": "my_webHost",
+ * // "webPorts": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dockerImage": "my_dockerImage",
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "publicKeys": [],
+ * // "size": "my_size",
+ * // "sshHost": "my_sshHost",
+ * // "sshPort": 0,
+ * // "sshUsername": "my_sshUsername",
+ * // "state": "my_state",
+ * // "vmSizeExpireTime": "my_vmSizeExpireTime",
+ * // "webHost": "my_webHost",
+ * // "webPorts": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudshell.users.environments.patch
* @memberOf! ()
*
@@ -526,6 +702,61 @@ export namespace cloudshell_v1alpha1 {
/**
* cloudshell.users.environments.start
* @desc Starts an existing environment, allowing clients to connect to it. The returned operation will contain an instance of StartEnvironmentMetadata in its metadata field. Users can wait for the environment to start by polling this operation via GetOperation. Once the environment has finished starting and is ready to accept connections, the operation will contain a StartEnvironmentResponse in its response field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudshell.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudshell = google.cloudshell('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudshell.users.environments.start({
+ * // Name of the resource that should be started, for example
+ * // `users/me/environments/default` or
+ * // `users/someone@example.com/environments/default`.
+ * name: 'users/my-user/environments/my-environment',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accessToken": "my_accessToken",
+ * // "publicKeys": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudshell.users.environments.start
* @memberOf! ()
*
@@ -676,6 +907,56 @@ export namespace cloudshell_v1alpha1 {
/**
* cloudshell.users.environments.publicKeys.create
* @desc Adds a public SSH key to an environment, allowing clients with the corresponding private key to connect to that environment via SSH. If a key with the same format and content already exists, this will return the existing key.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudshell.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudshell = google.cloudshell('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudshell.users.environments.publicKeys.create({
+ * // Parent resource name, e.g. `users/me/environments/default`.
+ * parent: 'users/my-user/environments/my-environment',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "key": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "format": "my_format",
+ * // "key": "my_key",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudshell.users.environments.publicKeys.create
* @memberOf! ()
*
@@ -751,6 +1032,45 @@ export namespace cloudshell_v1alpha1 {
/**
* cloudshell.users.environments.publicKeys.delete
* @desc Removes a public SSH key from an environment. Clients will no longer be able to connect to the environment using the corresponding private key.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudshell.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudshell = google.cloudshell('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudshell.users.environments.publicKeys.delete({
+ * // Name of the resource to be deleted, e.g.
+ * // `users/me/environments/default/publicKeys/my-key`.
+ * name: 'users/my-user/environments/my-environment/publicKeys/my-publicKey',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudshell.users.environments.publicKeys.delete
* @memberOf! ()
*
diff --git a/src/apis/cloudtasks/v2.ts b/src/apis/cloudtasks/v2.ts
index 974ff430ffc..0f974e2fad6 100644
--- a/src/apis/cloudtasks/v2.ts
+++ b/src/apis/cloudtasks/v2.ts
@@ -609,51 +609,49 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.get
* @desc Gets information about a location.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
+ * const cloudtasks = google.cloudtasks('v2');
*
- * authorize(function(authClient) {
- * var request = {
- * // Resource name for the location.
- * name: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudTasks.projects.locations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.get({
+ * // Resource name for the location.
+ * name: 'projects/my-project/locations/my-location',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "labels": {},
+ * // "locationId": "my_locationId",
+ * // "metadata": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.get
* @memberOf! ()
*
@@ -724,64 +722,52 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.list
* @desc Lists information about the supported locations for this service.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
+ * const cloudtasks = google.cloudtasks('v2');
*
- * authorize(function(authClient) {
- * var request = {
- * // The resource that owns the locations collection, if applicable.
- * name: 'projects/my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var locationsPage = response['locations'];
- * if (!locationsPage) {
- * return;
- * }
- * for (var i = 0; i < locationsPage.length; i++) {
- * // TODO: Change code below to process each resource in `locationsPage`:
- * console.log(JSON.stringify(locationsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudTasks.projects.locations.list(request, handlePage);
- * }
- * };
- *
- * cloudTasks.projects.locations.list(request, handlePage);
- * });
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The resource that owns the locations collection, if applicable.
+ * name: 'projects/my-project',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "locations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtasks.projects.locations.list
* @memberOf! ()
*
@@ -908,60 +894,70 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.queues.create
* @desc Creates a queue. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
+ * const cloudtasks = google.cloudtasks('v2');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The location name in which the queue will be created.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.create({
+ * // Required. The location name in which the queue will be created.
* // For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+ * //
* // The list of allowed locations can be obtained by calling Cloud
* // Tasks' implementation of
* // ListLocations.
- * parent: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "appEngineRoutingOverride": {},
+ * // "name": "my_name",
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "stackdriverLoggingConfig": {},
+ * // "state": "my_state"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineRoutingOverride": {},
+ * // "name": "my_name",
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "stackdriverLoggingConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.create
* @memberOf! ()
*
@@ -1036,50 +1032,44 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.queues.delete
* @desc Deletes a queue. This command will delete the queue even if it has tasks in it. Note: If you delete a queue, a queue with the same name can't be created for 7 days. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
+ * const cloudtasks = google.cloudtasks('v2');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudTasks.projects.locations.queues.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.delete({
+ * // Required. The queue name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {}
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtasks.projects.locations.queues.delete
* @memberOf! ()
*
@@ -1150,53 +1140,52 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.queues.get
* @desc Gets a queue.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The resource name of the queue. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
+ * const cloudtasks = google.cloudtasks('v2');
*
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudTasks.projects.locations.queues.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.get({
+ * // Required. The resource name of the queue. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineRoutingOverride": {},
+ * // "name": "my_name",
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "stackdriverLoggingConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.get
* @memberOf! ()
*
@@ -1267,56 +1256,56 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.queues.getIamPolicy
* @desc Gets the access control policy for a Queue. Returns an empty policy if the resource exists and does not have a policy set. Authorization requires the following [Google IAM](https://cloud.google.com/iam) permission on the specified resource parent: * `cloudtasks.queues.getIamPolicy`
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
+ * const cloudtasks = google.cloudtasks('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.getIamPolicy({
* // REQUIRED: The resource for which the policy is being requested.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'projects/my-project/locations/my-location/queues/my-queue',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.getIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.getIamPolicy
* @memberOf! ()
*
@@ -1391,66 +1380,76 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.queues.list
* @desc Lists queues. Queues are returned in lexicographical order.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
+ * const cloudtasks = google.cloudtasks('v2');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The location name.
- * // For example: `projects/PROJECT_ID/locations/LOCATION_ID`
- * parent: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var queuesPage = response['queues'];
- * if (!queuesPage) {
- * return;
- * }
- * for (var i = 0; i < queuesPage.length; i++) {
- * // TODO: Change code below to process each resource in `queuesPage`:
- * console.log(JSON.stringify(queuesPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudTasks.projects.locations.queues.list(request, handlePage);
- * }
- * };
- *
- * cloudTasks.projects.locations.queues.list(request, handlePage);
- * });
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.list({
+ * // `filter` can be used to specify a subset of queues. Any Queue
+ * // field can be used as a filter and several operators as supported.
+ * // For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
+ * // described in
+ * // [Stackdriver's Advanced Logs
+ * // Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
+ * //
+ * // Sample filter "state: PAUSED".
+ * //
+ * // Note that using filters might cause fewer queues than the
+ * // requested page_size to be returned.
+ * filter: 'placeholder-value',
+ * // Requested page size.
+ * //
+ * // The maximum page size is 9800. If unspecified, the page size will
+ * // be the maximum. Fewer queues than requested might be returned,
+ * // even if more queues exist; use the
+ * // next_page_token in the
+ * // response to determine if more queues exist.
+ * pageSize: 'placeholder-value',
+ * // A token identifying the page of results to return.
+ * //
+ * // To request the first page results, page_token must be empty. To
+ * // request the next page of results, page_token must be the value of
+ * // next_page_token returned
+ * // from the previous call to ListQueues
+ * // method. It is an error to switch the value of the
+ * // filter while iterating through pages.
+ * pageToken: 'placeholder-value',
+ * // Required. The location name.
+ * // For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+ * parent: 'projects/my-project/locations/my-location',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "queues": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtasks.projects.locations.queues.list
* @memberOf! ()
*
@@ -1529,72 +1528,87 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.queues.patch
* @desc Updates a queue. This method creates the queue if it does not exist and updates the queue if it does exist. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
+ * const cloudtasks = google.cloudtasks('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.patch({
* // Caller-specified and required in CreateQueue,
* // after which it becomes output only.
+ * //
* // The queue name.
+ * //
* // The queue name must have the following format:
* // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ * //
* // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
- * // hyphens (-), colons (:), or periods (.).
- * // For more information, see
- * // [Identifying
- * // projects]
- * // (https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
+ * // hyphens (-), colons (:), or periods (.).
+ * // For more information, see
+ * // [Identifying
+ * // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
* // * `LOCATION_ID` is the canonical ID for the queue's location.
- * // The list of available locations can be obtained by calling
- * // ListLocations.
- * // For more information, see https://cloud.google.com/about/locations/.
+ * // The list of available locations can be obtained by calling
+ * // ListLocations.
+ * // For more information, see https://cloud.google.com/about/locations/.
* // * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
- * // hyphens (-). The maximum length is 100 characters.
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * // hyphens (-). The maximum length is 100 characters.
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
+ * // A mask used to specify which fields of the queue are being updated.
+ * //
+ * // If empty, then all fields will be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "appEngineRoutingOverride": {},
+ * // "name": "my_name",
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "stackdriverLoggingConfig": {},
+ * // "state": "my_state"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineRoutingOverride": {},
+ * // "name": "my_name",
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "stackdriverLoggingConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.patch
* @memberOf! ()
*
@@ -1667,57 +1681,58 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.queues.pause
* @desc Pauses the queue. If a queue is paused then the system will stop dispatching tasks until the queue is resumed via ResumeQueue. Tasks can still be added when the queue is paused. A queue is paused if its state is PAUSED.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
+ * const cloudtasks = google.cloudtasks('v2');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
- * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudTasks.projects.locations.queues.pause(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.pause({
+ * // Required. The queue name. For example:
+ * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineRoutingOverride": {},
+ * // "name": "my_name",
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "stackdriverLoggingConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.pause
* @memberOf! ()
*
@@ -1789,57 +1804,58 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.queues.purge
* @desc Purges a queue by deleting all of its tasks. All tasks created before this method is called are permanently deleted. Purge operations can take up to one minute to take effect. Tasks might be dispatched before the purge takes effect. A purge is irreversible.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
- * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
+ * const cloudtasks = google.cloudtasks('v2');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudTasks.projects.locations.queues.purge(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.purge({
+ * // Required. The queue name. For example:
+ * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineRoutingOverride": {},
+ * // "name": "my_name",
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "stackdriverLoggingConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.purge
* @memberOf! ()
*
@@ -1911,57 +1927,58 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.queues.resume
* @desc Resume a queue. This method resumes a queue after it has been PAUSED or DISABLED. The state of a queue is stored in the queue's state; after calling this method it will be set to RUNNING. WARNING: Resuming many high-QPS queues at the same time can lead to target overloading. If you are resuming high-QPS queues, follow the 500/50/5 pattern described in [Managing Cloud Tasks Scaling Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
- * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
+ * const cloudtasks = google.cloudtasks('v2');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudTasks.projects.locations.queues.resume(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.resume({
+ * // Required. The queue name. For example:
+ * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineRoutingOverride": {},
+ * // "name": "my_name",
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "stackdriverLoggingConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.resume
* @memberOf! ()
*
@@ -2033,56 +2050,56 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.queues.setIamPolicy
* @desc Sets the access control policy for a Queue. Replaces any existing policy. Note: The Cloud Console does not check queue-level IAM permissions yet. Project-level permissions are required to use the Cloud Console. Authorization requires the following [Google IAM](https://cloud.google.com/iam) permission on the specified resource parent: * `cloudtasks.queues.setIamPolicy`
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
+ * const cloudtasks = google.cloudtasks('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.setIamPolicy({
* // REQUIRED: The resource for which the policy is being specified.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'projects/my-project/locations/my-location/queues/my-queue',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.setIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.setIamPolicy
* @memberOf! ()
*
@@ -2157,56 +2174,54 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.queues.testIamPermissions
* @desc Returns permissions that a caller has on a Queue. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
+ * const cloudtasks = google.cloudtasks('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.testIamPermissions({
* // REQUIRED: The resource for which the policy detail is being requested.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'projects/my-project/locations/my-location/queues/my-queue',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.testIamPermissions
* @memberOf! ()
*
@@ -2486,58 +2501,67 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.queues.tasks.create
* @desc Creates a task and adds it to a queue. Tasks cannot be updated after creation; there is no UpdateTask command. * The maximum task size is 100KB.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
+ * const cloudtasks = google.cloudtasks('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.create({
+ * // Required. The queue name. For example:
* // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ * //
* // The queue must already exist.
- * parent: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * parent: 'projects/my-project/locations/my-location/queues/my-queue',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "responseView": "my_responseView",
+ * // "task": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.tasks.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpRequest": {},
+ * // "createTime": "my_createTime",
+ * // "dispatchCount": 0,
+ * // "dispatchDeadline": "my_dispatchDeadline",
+ * // "firstAttempt": {},
+ * // "httpRequest": {},
+ * // "lastAttempt": {},
+ * // "name": "my_name",
+ * // "responseCount": 0,
+ * // "scheduleTime": "my_scheduleTime",
+ * // "view": "my_view"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.tasks.create
* @memberOf! ()
*
@@ -2612,50 +2636,45 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.queues.tasks.delete
* @desc Deletes a task. A task can be deleted if it is scheduled or dispatched. A task cannot be deleted if it has executed successfully or permanently failed.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
+ * const cloudtasks = google.cloudtasks('v2');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The task name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudTasks.projects.locations.queues.tasks.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.delete({
+ * // Required. The task name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ * name:
+ * 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task',
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {}
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtasks.projects.locations.queues.tasks.delete
* @memberOf! ()
*
@@ -2726,53 +2745,70 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.queues.tasks.get
* @desc Gets a task.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
+ * const cloudtasks = google.cloudtasks('v2');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The task name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudTasks.projects.locations.queues.tasks.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.get({
+ * // Required. The task name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ * name:
+ * 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task',
+ * // The response_view specifies which subset of the Task will be
+ * // returned.
+ * //
+ * // By default response_view is BASIC; not all
+ * // information is retrieved by default because some data, such as
+ * // payloads, might be desirable to return only when needed because
+ * // of its large size or because of the sensitivity of data that it
+ * // contains.
+ * //
+ * // Authorization for FULL requires
+ * // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+ * // permission on the Task resource.
+ * responseView: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpRequest": {},
+ * // "createTime": "my_createTime",
+ * // "dispatchCount": 0,
+ * // "dispatchDeadline": "my_dispatchDeadline",
+ * // "firstAttempt": {},
+ * // "httpRequest": {},
+ * // "lastAttempt": {},
+ * // "name": "my_name",
+ * // "responseCount": 0,
+ * // "scheduleTime": "my_scheduleTime",
+ * // "view": "my_view"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.tasks.get
* @memberOf! ()
*
@@ -2844,66 +2880,79 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.queues.tasks.list
* @desc Lists the tasks in a queue. By default, only the BASIC view is retrieved due to performance considerations; response_view controls the subset of information which is returned. The tasks may be returned in any order. The ordering may change at any time.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
+ * const cloudtasks = google.cloudtasks('v2');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
- * parent: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var tasksPage = response['tasks'];
- * if (!tasksPage) {
- * return;
- * }
- * for (var i = 0; i < tasksPage.length; i++) {
- * // TODO: Change code below to process each resource in `tasksPage`:
- * console.log(JSON.stringify(tasksPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudTasks.projects.locations.queues.tasks.list(request, handlePage);
- * }
- * };
- *
- * cloudTasks.projects.locations.queues.tasks.list(request, handlePage);
- * });
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.list({
+ * // Maximum page size.
+ * //
+ * // Fewer tasks than requested might be returned, even if more tasks exist; use
+ * // next_page_token in the response to
+ * // determine if more tasks exist.
+ * //
+ * // The maximum page size is 1000. If unspecified, the page size will be the
+ * // maximum.
+ * pageSize: 'placeholder-value',
+ * // A token identifying the page of results to return.
+ * //
+ * // To request the first page results, page_token must be empty. To
+ * // request the next page of results, page_token must be the value of
+ * // next_page_token returned
+ * // from the previous call to ListTasks
+ * // method.
+ * //
+ * // The page token is valid for only 2 hours.
+ * pageToken: 'placeholder-value',
+ * // Required. The queue name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ * parent: 'projects/my-project/locations/my-location/queues/my-queue',
+ * // The response_view specifies which subset of the Task will be
+ * // returned.
+ * //
+ * // By default response_view is BASIC; not all
+ * // information is retrieved by default because some data, such as
+ * // payloads, might be desirable to return only when needed because
+ * // of its large size or because of the sensitivity of data that it
+ * // contains.
+ * //
+ * // Authorization for FULL requires
+ * // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+ * // permission on the Task resource.
+ * responseView: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "tasks": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtasks.projects.locations.queues.tasks.list
* @memberOf! ()
*
@@ -2982,57 +3031,65 @@ export namespace cloudtasks_v2 {
* cloudtasks.projects.locations.queues.tasks.run
* @desc Forces a task to run now. When this method is called, Cloud Tasks will dispatch the task, even if the task is already running, the queue has reached its RateLimits or is PAUSED. This command is meant to be used for manual debugging. For example, RunTask can be used to retry a failed task after a fix has been made or to manually force a task to be dispatched now. The dispatched task is returned. That is, the task that is returned contains the status after the task is dispatched but before the task is received by its target. If Cloud Tasks receives a successful response from the task's target, then the task will be deleted; otherwise the task's schedule_time will be reset to the time that RunTask was called plus the retry delay specified in the queue's RetryConfig. RunTask returns NOT_FOUND when it is called on a task that has already succeeded or permanently failed.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2');
+ * const cloudtasks = google.cloudtasks('v2');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The task name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudTasks.projects.locations.queues.tasks.run(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.run({
+ * // Required. The task name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ * name:
+ * 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "responseView": "my_responseView"
+ * // }
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpRequest": {},
+ * // "createTime": "my_createTime",
+ * // "dispatchCount": 0,
+ * // "dispatchDeadline": "my_dispatchDeadline",
+ * // "firstAttempt": {},
+ * // "httpRequest": {},
+ * // "lastAttempt": {},
+ * // "name": "my_name",
+ * // "responseCount": 0,
+ * // "scheduleTime": "my_scheduleTime",
+ * // "view": "my_view"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.tasks.run
* @memberOf! ()
*
diff --git a/src/apis/cloudtasks/v2beta2.ts b/src/apis/cloudtasks/v2beta2.ts
index b1940f0a4e7..1ce29776ca0 100644
--- a/src/apis/cloudtasks/v2beta2.ts
+++ b/src/apis/cloudtasks/v2beta2.ts
@@ -649,55 +649,49 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.get
* @desc Gets information about a location.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Resource name for the location.
- * name: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudTasks.projects.locations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.get({
+ * // Resource name for the location.
+ * name: 'projects/my-project/locations/my-location',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "labels": {},
+ * // "locationId": "my_locationId",
+ * // "metadata": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias cloudtasks.projects.locations.get
* @memberOf! ()
*
@@ -768,68 +762,52 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.list
* @desc Lists information about the supported locations for this service.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The resource that owns the locations collection, if applicable.
- * name: 'projects/my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var locationsPage = response['locations'];
- * if (!locationsPage) {
- * return;
- * }
- * for (var i = 0; i < locationsPage.length; i++) {
- * // TODO: Change code below to process each resource in `locationsPage`:
- * console.log(JSON.stringify(locationsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudTasks.projects.locations.list(request, handlePage);
- * }
- * };
- *
- * cloudTasks.projects.locations.list(request, handlePage);
- * });
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The resource that owns the locations collection, if applicable.
+ * name: 'projects/my-project',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "locations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtasks.projects.locations.list
* @memberOf! ()
*
@@ -956,64 +934,70 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.create
* @desc Creates a queue. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The location name in which the queue will be created.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.create({
+ * // Required. The location name in which the queue will be created.
* // For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+ * //
* // The list of allowed locations can be obtained by calling Cloud
* // Tasks' implementation of
- * // google.cloud.location.Locations.ListLocations.
- * parent: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // ListLocations.
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "name": "my_name",
+ * // "pullTarget": {},
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "state": "my_state"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "name": "my_name",
+ * // "pullTarget": {},
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.create
* @memberOf! ()
*
@@ -1088,54 +1072,44 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.delete
* @desc Deletes a queue. This command will delete the queue even if it has tasks in it. Note: If you delete a queue, a queue with the same name can't be created for 7 days. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudTasks.projects.locations.queues.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.delete({
+ * // Required. The queue name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
+ * // Example response
+ * // {}
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtasks.projects.locations.queues.delete
* @memberOf! ()
*
@@ -1206,57 +1180,55 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.get
* @desc Gets a queue.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The resource name of the queue. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudTasks.projects.locations.queues.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.get({
+ * // Required. The resource name of the queue. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
+ * // Optional. Read mask is used for a more granular control over what the API returns. By
+ * // it includes all fields in Queue except for stats.
+ * readMask: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "name": "my_name",
+ * // "pullTarget": {},
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.get
* @memberOf! ()
*
@@ -1328,60 +1300,56 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.getIamPolicy
* @desc Gets the access control policy for a Queue. Returns an empty policy if the resource exists and does not have a policy set. Authorization requires the following [Google IAM](https://cloud.google.com/iam) permission on the specified resource parent: * `cloudtasks.queues.getIamPolicy`
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.getIamPolicy({
* // REQUIRED: The resource for which the policy is being requested.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'projects/my-project/locations/my-location/queues/my-queue',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.getIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.getIamPolicy
* @memberOf! ()
*
@@ -1456,70 +1424,76 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.list
* @desc Lists queues. Queues are returned in lexicographical order.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The location name.
- * // For example: `projects/PROJECT_ID/locations/LOCATION_ID`
- * parent: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var queuesPage = response['queues'];
- * if (!queuesPage) {
- * return;
- * }
- * for (var i = 0; i < queuesPage.length; i++) {
- * // TODO: Change code below to process each resource in `queuesPage`:
- * console.log(JSON.stringify(queuesPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudTasks.projects.locations.queues.list(request, handlePage);
- * }
- * };
- *
- * cloudTasks.projects.locations.queues.list(request, handlePage);
- * });
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.list({
+ * // `filter` can be used to specify a subset of queues. Any Queue
+ * // field can be used as a filter and several operators as supported.
+ * // For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
+ * // described in
+ * // [Stackdriver's Advanced Logs
+ * // Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
+ * //
+ * // Sample filter "app_engine_http_target: *".
+ * //
+ * // Note that using filters might cause fewer queues than the
+ * // requested_page size to be returned.
+ * filter: 'placeholder-value',
+ * // Requested page size.
+ * //
+ * // The maximum page size is 9800. If unspecified, the page size will
+ * // be the maximum. Fewer queues than requested might be returned,
+ * // even if more queues exist; use the
+ * // next_page_token in the
+ * // response to determine if more queues exist.
+ * pageSize: 'placeholder-value',
+ * // A token identifying the page of results to return.
+ * //
+ * // To request the first page results, page_token must be empty. To
+ * // request the next page of results, page_token must be the value of
+ * // next_page_token returned
+ * // from the previous call to ListQueues
+ * // method. It is an error to switch the value of the
+ * // filter while iterating through pages.
+ * pageToken: 'placeholder-value',
+ * // Required. The location name.
+ * // For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+ * parent: 'projects/my-project/locations/my-location',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "queues": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtasks.projects.locations.queues.list
* @memberOf! ()
*
@@ -1598,71 +1572,87 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.patch
* @desc Updates a queue. This method creates the queue if it does not exist and updates the queue if it does exist. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.patch({
+ * // Caller-specified and required in CreateQueue,
+ * // after which it becomes output only.
+ * //
* // The queue name.
+ * //
* // The queue name must have the following format:
* // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
- * // * `PROJECT_ID` can contain uppercase and lowercase letters,
- * // numbers, hyphens, colons, and periods; that is, it must match
- * // the regular expression: `[a-zA-Z\\d-:\\.]+`.
- * // * `QUEUE_ID` can contain uppercase and lowercase letters,
- * // numbers, and hyphens; that is, it must match the regular
- * // expression: `[a-zA-Z\\d-]+`. The maximum length is 100
- * // characters.
- * // Caller-specified and required in CreateQueueRequest, after which
- * // it becomes output only.
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * //
+ * // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+ * // hyphens (-), colons (:), or periods (.).
+ * // For more information, see
+ * // [Identifying
+ * // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
+ * // * `LOCATION_ID` is the canonical ID for the queue's location.
+ * // The list of available locations can be obtained by calling
+ * // ListLocations.
+ * // For more information, see https://cloud.google.com/about/locations/.
+ * // * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+ * // hyphens (-). The maximum length is 100 characters.
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
+ * // A mask used to specify which fields of the queue are being updated.
+ * //
+ * // If empty, then all fields will be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "name": "my_name",
+ * // "pullTarget": {},
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "state": "my_state"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "name": "my_name",
+ * // "pullTarget": {},
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.patch
* @memberOf! ()
*
@@ -1735,61 +1725,58 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.pause
* @desc Pauses the queue. If a queue is paused then the system will stop dispatching tasks until the queue is resumed via ResumeQueue. Tasks can still be added when the queue is paused. A queue is paused if its state is PAUSED.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
- * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudTasks.projects.locations.queues.pause(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.pause({
+ * // Required. The queue name. For example:
+ * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "name": "my_name",
+ * // "pullTarget": {},
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.pause
* @memberOf! ()
*
@@ -1864,61 +1851,58 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.purge
* @desc Purges a queue by deleting all of its tasks. All tasks created before this method is called are permanently deleted. Purge operations can take up to one minute to take effect. Tasks might be dispatched before the purge takes effect. A purge is irreversible.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
- * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudTasks.projects.locations.queues.purge(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.purge({
+ * // Required. The queue name. For example:
+ * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "name": "my_name",
+ * // "pullTarget": {},
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.purge
* @memberOf! ()
*
@@ -1993,61 +1977,58 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.resume
* @desc Resume a queue. This method resumes a queue after it has been PAUSED or DISABLED. The state of a queue is stored in the queue's state; after calling this method it will be set to RUNNING. WARNING: Resuming many high-QPS queues at the same time can lead to target overloading. If you are resuming high-QPS queues, follow the 500/50/5 pattern described in [Managing Cloud Tasks Scaling Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
- * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudTasks.projects.locations.queues.resume(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.resume({
+ * // Required. The queue name. For example:
+ * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpTarget": {},
+ * // "name": "my_name",
+ * // "pullTarget": {},
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.resume
* @memberOf! ()
*
@@ -2122,60 +2103,56 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.setIamPolicy
* @desc Sets the access control policy for a Queue. Replaces any existing policy. Note: The Cloud Console does not check queue-level IAM permissions yet. Project-level permissions are required to use the Cloud Console. Authorization requires the following [Google IAM](https://cloud.google.com/iam) permission on the specified resource parent: * `cloudtasks.queues.setIamPolicy`
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.setIamPolicy({
* // REQUIRED: The resource for which the policy is being specified.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'projects/my-project/locations/my-location/queues/my-queue',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.setIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.setIamPolicy
* @memberOf! ()
*
@@ -2250,60 +2227,54 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.testIamPermissions
* @desc Returns permissions that a caller has on a Queue. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.testIamPermissions({
* // REQUIRED: The resource for which the policy detail is being requested.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'projects/my-project/locations/my-location/queues/my-queue',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.testIamPermissions
* @memberOf! ()
*
@@ -2587,58 +2558,53 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.tasks.acknowledge
* @desc Acknowledges a pull task. The worker, that is, the entity that leased this task must call this method to indicate that the work associated with the task has finished. The worker must acknowledge a task within the lease_duration or the lease will expire and the task will become available to be leased again. After the task is acknowledged, it will not be returned by a later LeaseTasks, GetTask, or ListTasks.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The task name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task', // TODO: Update placeholder value.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.acknowledge({
+ * // Required. The task name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ * name:
+ * 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "scheduleTime": "my_scheduleTime"
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
+ * // Example response
+ * // {}
+ * }
*
- * cloudTasks.projects.locations.queues.tasks.acknowledge(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.tasks.acknowledge
* @memberOf! ()
*
@@ -2713,61 +2679,62 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.tasks.cancelLease
* @desc Cancel a pull task's lease. The worker can use this method to cancel a task's lease by setting its schedule_time to now. This will make the task available to be leased to the next caller of LeaseTasks.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The task name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudTasks.projects.locations.queues.tasks.cancelLease(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.cancelLease({
+ * // Required. The task name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ * name:
+ * 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "responseView": "my_responseView",
+ * // "scheduleTime": "my_scheduleTime"
+ * // }
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpRequest": {},
+ * // "createTime": "my_createTime",
+ * // "name": "my_name",
+ * // "pullMessage": {},
+ * // "scheduleTime": "my_scheduleTime",
+ * // "status": {},
+ * // "view": "my_view"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.tasks.cancelLease
* @memberOf! ()
*
@@ -2842,62 +2809,63 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.tasks.create
* @desc Creates a task and adds it to a queue. Tasks cannot be updated after creation; there is no UpdateTask command. * For App Engine queues, the maximum task size is 100KB. * For pull queues, the maximum task size is 1MB.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.create({
+ * // Required. The queue name. For example:
* // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ * //
* // The queue must already exist.
- * parent: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * parent: 'projects/my-project/locations/my-location/queues/my-queue',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "responseView": "my_responseView",
+ * // "task": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.tasks.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpRequest": {},
+ * // "createTime": "my_createTime",
+ * // "name": "my_name",
+ * // "pullMessage": {},
+ * // "scheduleTime": "my_scheduleTime",
+ * // "status": {},
+ * // "view": "my_view"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.tasks.create
* @memberOf! ()
*
@@ -2972,54 +2940,45 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.tasks.delete
* @desc Deletes a task. A task can be deleted if it is scheduled or dispatched. A task cannot be deleted if it has completed successfully or permanently failed.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The task name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task', // TODO: Update placeholder value.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudTasks.projects.locations.queues.tasks.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.delete({
+ * // Required. The task name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ * name:
+ * 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task',
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
+ * // Example response
+ * // {}
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtasks.projects.locations.queues.tasks.delete
* @memberOf! ()
*
@@ -3090,57 +3049,66 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.tasks.get
* @desc Gets a task.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The task name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudTasks.projects.locations.queues.tasks.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.get({
+ * // Required. The task name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ * name:
+ * 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task',
+ * // The response_view specifies which subset of the Task will be
+ * // returned.
+ * //
+ * // By default response_view is BASIC; not all
+ * // information is retrieved by default because some data, such as
+ * // payloads, might be desirable to return only when needed because
+ * // of its large size or because of the sensitivity of data that it
+ * // contains.
+ * //
+ * // Authorization for FULL requires
+ * // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+ * // permission on the Task resource.
+ * responseView: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpRequest": {},
+ * // "createTime": "my_createTime",
+ * // "name": "my_name",
+ * // "pullMessage": {},
+ * // "scheduleTime": "my_scheduleTime",
+ * // "status": {},
+ * // "view": "my_view"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.tasks.get
* @memberOf! ()
*
@@ -3211,6 +3179,58 @@ export namespace cloudtasks_v2beta2 {
/**
* cloudtasks.projects.locations.queues.tasks.lease
* @desc Leases tasks from a pull queue for lease_duration. This method is invoked by the worker to obtain a lease. The worker must acknowledge the task via AcknowledgeTask after they have performed the work associated with the task. The payload is intended to store data that the worker needs to perform the work associated with the task. To return the payloads in the response, set response_view to FULL. A maximum of 10 qps of LeaseTasks requests are allowed per queue. RESOURCE_EXHAUSTED is returned when this limit is exceeded. RESOURCE_EXHAUSTED is also returned when max_tasks_dispatched_per_second is exceeded.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.lease({
+ * // Required. The queue name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ * parent: 'projects/my-project/locations/my-location/queues/my-queue',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "filter": "my_filter",
+ * // "leaseDuration": "my_leaseDuration",
+ * // "maxTasks": 0,
+ * // "responseView": "my_responseView"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "tasks": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtasks.projects.locations.queues.tasks.lease
* @memberOf! ()
*
@@ -3287,70 +3307,79 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.tasks.list
* @desc Lists the tasks in a queue. By default, only the BASIC view is retrieved due to performance considerations; response_view controls the subset of information which is returned. The tasks may be returned in any order. The ordering may change at any time.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
- * parent: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var tasksPage = response['tasks'];
- * if (!tasksPage) {
- * return;
- * }
- * for (var i = 0; i < tasksPage.length; i++) {
- * // TODO: Change code below to process each resource in `tasksPage`:
- * console.log(JSON.stringify(tasksPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudTasks.projects.locations.queues.tasks.list(request, handlePage);
- * }
- * };
- *
- * cloudTasks.projects.locations.queues.tasks.list(request, handlePage);
- * });
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.list({
+ * // Maximum page size.
+ * //
+ * // Fewer tasks than requested might be returned, even if more tasks exist; use
+ * // next_page_token in the response to
+ * // determine if more tasks exist.
+ * //
+ * // The maximum page size is 1000. If unspecified, the page size will be the
+ * // maximum.
+ * pageSize: 'placeholder-value',
+ * // A token identifying the page of results to return.
+ * //
+ * // To request the first page results, page_token must be empty. To
+ * // request the next page of results, page_token must be the value of
+ * // next_page_token returned
+ * // from the previous call to ListTasks
+ * // method.
+ * //
+ * // The page token is valid for only 2 hours.
+ * pageToken: 'placeholder-value',
+ * // Required. The queue name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ * parent: 'projects/my-project/locations/my-location/queues/my-queue',
+ * // The response_view specifies which subset of the Task will be
+ * // returned.
+ * //
+ * // By default response_view is BASIC; not all
+ * // information is retrieved by default because some data, such as
+ * // payloads, might be desirable to return only when needed because
+ * // of its large size or because of the sensitivity of data that it
+ * // contains.
+ * //
+ * // Authorization for FULL requires
+ * // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+ * // permission on the Task resource.
+ * responseView: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "tasks": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtasks.projects.locations.queues.tasks.list
* @memberOf! ()
*
@@ -3429,61 +3458,63 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.tasks.renewLease
* @desc Renew the current lease of a pull task. The worker can use this method to extend the lease by a new duration, starting from now. The new task lease will be returned in the task's schedule_time.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The task name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudTasks.projects.locations.queues.tasks.renewLease(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.renewLease({
+ * // Required. The task name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ * name:
+ * 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "leaseDuration": "my_leaseDuration",
+ * // "responseView": "my_responseView",
+ * // "scheduleTime": "my_scheduleTime"
+ * // }
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpRequest": {},
+ * // "createTime": "my_createTime",
+ * // "name": "my_name",
+ * // "pullMessage": {},
+ * // "scheduleTime": "my_scheduleTime",
+ * // "status": {},
+ * // "view": "my_view"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.tasks.renewLease
* @memberOf! ()
*
@@ -3558,61 +3589,61 @@ export namespace cloudtasks_v2beta2 {
* cloudtasks.projects.locations.queues.tasks.run
* @desc Forces a task to run now. When this method is called, Cloud Tasks will dispatch the task, even if the task is already running, the queue has reached its RateLimits or is PAUSED. This command is meant to be used for manual debugging. For example, RunTask can be used to retry a failed task after a fix has been made or to manually force a task to be dispatched now. The dispatched task is returned. That is, the task that is returned contains the status after the task is dispatched but before the task is received by its target. If Cloud Tasks receives a successful response from the task's target, then the task will be deleted; otherwise the task's schedule_time will be reset to the time that RunTask was called plus the retry delay specified in the queue's RetryConfig. RunTask returns NOT_FOUND when it is called on a task that has already succeeded or permanently failed. RunTask cannot be called on a pull task.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The task name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtasks = google.cloudtasks('v2beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudTasks.projects.locations.queues.tasks.run(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.run({
+ * // Required. The task name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ * name:
+ * 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "responseView": "my_responseView"
+ * // }
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpRequest": {},
+ * // "createTime": "my_createTime",
+ * // "name": "my_name",
+ * // "pullMessage": {},
+ * // "scheduleTime": "my_scheduleTime",
+ * // "status": {},
+ * // "view": "my_view"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.tasks.run
* @memberOf! ()
*
diff --git a/src/apis/cloudtasks/v2beta3.ts b/src/apis/cloudtasks/v2beta3.ts
index a4bd1f2f9d7..0fa95e0b69a 100644
--- a/src/apis/cloudtasks/v2beta3.ts
+++ b/src/apis/cloudtasks/v2beta3.ts
@@ -618,51 +618,49 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.get
* @desc Gets information about a location.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
+ * const cloudtasks = google.cloudtasks('v2beta3');
*
- * authorize(function(authClient) {
- * var request = {
- * // Resource name for the location.
- * name: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudTasks.projects.locations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.get({
+ * // Resource name for the location.
+ * name: 'projects/my-project/locations/my-location',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "labels": {},
+ * // "locationId": "my_locationId",
+ * // "metadata": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.get
* @memberOf! ()
*
@@ -733,64 +731,52 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.list
* @desc Lists information about the supported locations for this service.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
+ * const cloudtasks = google.cloudtasks('v2beta3');
*
- * authorize(function(authClient) {
- * var request = {
- * // The resource that owns the locations collection, if applicable.
- * name: 'projects/my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var locationsPage = response['locations'];
- * if (!locationsPage) {
- * return;
- * }
- * for (var i = 0; i < locationsPage.length; i++) {
- * // TODO: Change code below to process each resource in `locationsPage`:
- * console.log(JSON.stringify(locationsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudTasks.projects.locations.list(request, handlePage);
- * }
- * };
- *
- * cloudTasks.projects.locations.list(request, handlePage);
- * });
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The resource that owns the locations collection, if applicable.
+ * name: 'projects/my-project',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "locations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtasks.projects.locations.list
* @memberOf! ()
*
@@ -917,60 +903,70 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.queues.create
* @desc Creates a queue. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
+ * const cloudtasks = google.cloudtasks('v2beta3');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The location name in which the queue will be created.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.create({
+ * // Required. The location name in which the queue will be created.
* // For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+ * //
* // The list of allowed locations can be obtained by calling Cloud
* // Tasks' implementation of
* // ListLocations.
- * parent: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "appEngineHttpQueue": {},
+ * // "name": "my_name",
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "stackdriverLoggingConfig": {},
+ * // "state": "my_state"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpQueue": {},
+ * // "name": "my_name",
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "stackdriverLoggingConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.create
* @memberOf! ()
*
@@ -1045,50 +1041,44 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.queues.delete
* @desc Deletes a queue. This command will delete the queue even if it has tasks in it. Note: If you delete a queue, a queue with the same name can't be created for 7 days. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
+ * const cloudtasks = google.cloudtasks('v2beta3');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudTasks.projects.locations.queues.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.delete({
+ * // Required. The queue name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {}
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtasks.projects.locations.queues.delete
* @memberOf! ()
*
@@ -1159,53 +1149,52 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.queues.get
* @desc Gets a queue.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The resource name of the queue. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
+ * const cloudtasks = google.cloudtasks('v2beta3');
*
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudTasks.projects.locations.queues.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.get({
+ * // Required. The resource name of the queue. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpQueue": {},
+ * // "name": "my_name",
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "stackdriverLoggingConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.get
* @memberOf! ()
*
@@ -1276,56 +1265,56 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.queues.getIamPolicy
* @desc Gets the access control policy for a Queue. Returns an empty policy if the resource exists and does not have a policy set. Authorization requires the following [Google IAM](https://cloud.google.com/iam) permission on the specified resource parent: * `cloudtasks.queues.getIamPolicy`
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
+ * const cloudtasks = google.cloudtasks('v2beta3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.getIamPolicy({
* // REQUIRED: The resource for which the policy is being requested.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'projects/my-project/locations/my-location/queues/my-queue',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.getIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.getIamPolicy
* @memberOf! ()
*
@@ -1400,66 +1389,76 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.queues.list
* @desc Lists queues. Queues are returned in lexicographical order.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
+ * const cloudtasks = google.cloudtasks('v2beta3');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The location name.
- * // For example: `projects/PROJECT_ID/locations/LOCATION_ID`
- * parent: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var queuesPage = response['queues'];
- * if (!queuesPage) {
- * return;
- * }
- * for (var i = 0; i < queuesPage.length; i++) {
- * // TODO: Change code below to process each resource in `queuesPage`:
- * console.log(JSON.stringify(queuesPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudTasks.projects.locations.queues.list(request, handlePage);
- * }
- * };
- *
- * cloudTasks.projects.locations.queues.list(request, handlePage);
- * });
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.list({
+ * // `filter` can be used to specify a subset of queues. Any Queue
+ * // field can be used as a filter and several operators as supported.
+ * // For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
+ * // described in
+ * // [Stackdriver's Advanced Logs
+ * // Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
+ * //
+ * // Sample filter "state: PAUSED".
+ * //
+ * // Note that using filters might cause fewer queues than the
+ * // requested page_size to be returned.
+ * filter: 'placeholder-value',
+ * // Requested page size.
+ * //
+ * // The maximum page size is 9800. If unspecified, the page size will
+ * // be the maximum. Fewer queues than requested might be returned,
+ * // even if more queues exist; use the
+ * // next_page_token in the
+ * // response to determine if more queues exist.
+ * pageSize: 'placeholder-value',
+ * // A token identifying the page of results to return.
+ * //
+ * // To request the first page results, page_token must be empty. To
+ * // request the next page of results, page_token must be the value of
+ * // next_page_token returned
+ * // from the previous call to ListQueues
+ * // method. It is an error to switch the value of the
+ * // filter while iterating through pages.
+ * pageToken: 'placeholder-value',
+ * // Required. The location name.
+ * // For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+ * parent: 'projects/my-project/locations/my-location',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "queues": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtasks.projects.locations.queues.list
* @memberOf! ()
*
@@ -1538,72 +1537,87 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.queues.patch
* @desc Updates a queue. This method creates the queue if it does not exist and updates the queue if it does exist. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
+ * const cloudtasks = google.cloudtasks('v2beta3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.patch({
* // Caller-specified and required in CreateQueue,
* // after which it becomes output only.
+ * //
* // The queue name.
+ * //
* // The queue name must have the following format:
* // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ * //
* // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
- * // hyphens (-), colons (:), or periods (.).
- * // For more information, see
- * // [Identifying
- * // projects]
- * // (https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
+ * // hyphens (-), colons (:), or periods (.).
+ * // For more information, see
+ * // [Identifying
+ * // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
* // * `LOCATION_ID` is the canonical ID for the queue's location.
- * // The list of available locations can be obtained by calling
- * // ListLocations.
- * // For more information, see https://cloud.google.com/about/locations/.
+ * // The list of available locations can be obtained by calling
+ * // ListLocations.
+ * // For more information, see https://cloud.google.com/about/locations/.
* // * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
- * // hyphens (-). The maximum length is 100 characters.
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * // hyphens (-). The maximum length is 100 characters.
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
+ * // A mask used to specify which fields of the queue are being updated.
+ * //
+ * // If empty, then all fields will be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "appEngineHttpQueue": {},
+ * // "name": "my_name",
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "stackdriverLoggingConfig": {},
+ * // "state": "my_state"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpQueue": {},
+ * // "name": "my_name",
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "stackdriverLoggingConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.patch
* @memberOf! ()
*
@@ -1676,57 +1690,58 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.queues.pause
* @desc Pauses the queue. If a queue is paused then the system will stop dispatching tasks until the queue is resumed via ResumeQueue. Tasks can still be added when the queue is paused. A queue is paused if its state is PAUSED.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
+ * const cloudtasks = google.cloudtasks('v2beta3');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
- * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudTasks.projects.locations.queues.pause(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.pause({
+ * // Required. The queue name. For example:
+ * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpQueue": {},
+ * // "name": "my_name",
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "stackdriverLoggingConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.pause
* @memberOf! ()
*
@@ -1801,57 +1816,58 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.queues.purge
* @desc Purges a queue by deleting all of its tasks. All tasks created before this method is called are permanently deleted. Purge operations can take up to one minute to take effect. Tasks might be dispatched before the purge takes effect. A purge is irreversible.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
- * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
+ * const cloudtasks = google.cloudtasks('v2beta3');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudTasks.projects.locations.queues.purge(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.purge({
+ * // Required. The queue name. For example:
+ * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpQueue": {},
+ * // "name": "my_name",
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "stackdriverLoggingConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.purge
* @memberOf! ()
*
@@ -1926,57 +1942,58 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.queues.resume
* @desc Resume a queue. This method resumes a queue after it has been PAUSED or DISABLED. The state of a queue is stored in the queue's state; after calling this method it will be set to RUNNING. WARNING: Resuming many high-QPS queues at the same time can lead to target overloading. If you are resuming high-QPS queues, follow the 500/50/5 pattern described in [Managing Cloud Tasks Scaling Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
- * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
+ * const cloudtasks = google.cloudtasks('v2beta3');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudTasks.projects.locations.queues.resume(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.resume({
+ * // Required. The queue name. For example:
+ * // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+ * name: 'projects/my-project/locations/my-location/queues/my-queue',
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpQueue": {},
+ * // "name": "my_name",
+ * // "purgeTime": "my_purgeTime",
+ * // "rateLimits": {},
+ * // "retryConfig": {},
+ * // "stackdriverLoggingConfig": {},
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.resume
* @memberOf! ()
*
@@ -2051,56 +2068,56 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.queues.setIamPolicy
* @desc Sets the access control policy for a Queue. Replaces any existing policy. Note: The Cloud Console does not check queue-level IAM permissions yet. Project-level permissions are required to use the Cloud Console. Authorization requires the following [Google IAM](https://cloud.google.com/iam) permission on the specified resource parent: * `cloudtasks.queues.setIamPolicy`
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
+ * const cloudtasks = google.cloudtasks('v2beta3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.setIamPolicy({
* // REQUIRED: The resource for which the policy is being specified.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'projects/my-project/locations/my-location/queues/my-queue',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.setIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.setIamPolicy
* @memberOf! ()
*
@@ -2175,56 +2192,54 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.queues.testIamPermissions
* @desc Returns permissions that a caller has on a Queue. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
+ * const cloudtasks = google.cloudtasks('v2beta3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.testIamPermissions({
* // REQUIRED: The resource for which the policy detail is being requested.
* // See the operation documentation for the appropriate value for this field.
- * resource_: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * resource: 'projects/my-project/locations/my-location/queues/my-queue',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.testIamPermissions
* @memberOf! ()
*
@@ -2504,58 +2519,67 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.queues.tasks.create
* @desc Creates a task and adds it to a queue. Tasks cannot be updated after creation; there is no UpdateTask command. * The maximum task size is 100KB.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
+ * const cloudtasks = google.cloudtasks('v2beta3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.create({
+ * // Required. The queue name. For example:
* // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ * //
* // The queue must already exist.
- * parent: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * parent: 'projects/my-project/locations/my-location/queues/my-queue',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "responseView": "my_responseView",
+ * // "task": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * cloudTasks.projects.locations.queues.tasks.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpRequest": {},
+ * // "createTime": "my_createTime",
+ * // "dispatchCount": 0,
+ * // "dispatchDeadline": "my_dispatchDeadline",
+ * // "firstAttempt": {},
+ * // "httpRequest": {},
+ * // "lastAttempt": {},
+ * // "name": "my_name",
+ * // "responseCount": 0,
+ * // "scheduleTime": "my_scheduleTime",
+ * // "view": "my_view"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.tasks.create
* @memberOf! ()
*
@@ -2630,50 +2654,45 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.queues.tasks.delete
* @desc Deletes a task. A task can be deleted if it is scheduled or dispatched. A task cannot be deleted if it has executed successfully or permanently failed.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
+ * const cloudtasks = google.cloudtasks('v2beta3');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The task name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * cloudTasks.projects.locations.queues.tasks.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.delete({
+ * // Required. The task name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ * name:
+ * 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task',
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {}
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtasks.projects.locations.queues.tasks.delete
* @memberOf! ()
*
@@ -2744,53 +2763,70 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.queues.tasks.get
* @desc Gets a task.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
+ * const cloudtasks = google.cloudtasks('v2beta3');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The task name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudTasks.projects.locations.queues.tasks.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.get({
+ * // Required. The task name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ * name:
+ * 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task',
+ * // The response_view specifies which subset of the Task will be
+ * // returned.
+ * //
+ * // By default response_view is BASIC; not all
+ * // information is retrieved by default because some data, such as
+ * // payloads, might be desirable to return only when needed because
+ * // of its large size or because of the sensitivity of data that it
+ * // contains.
+ * //
+ * // Authorization for FULL requires
+ * // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+ * // permission on the Task resource.
+ * responseView: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpRequest": {},
+ * // "createTime": "my_createTime",
+ * // "dispatchCount": 0,
+ * // "dispatchDeadline": "my_dispatchDeadline",
+ * // "firstAttempt": {},
+ * // "httpRequest": {},
+ * // "lastAttempt": {},
+ * // "name": "my_name",
+ * // "responseCount": 0,
+ * // "scheduleTime": "my_scheduleTime",
+ * // "view": "my_view"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.tasks.get
* @memberOf! ()
*
@@ -2862,66 +2898,79 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.queues.tasks.list
* @desc Lists the tasks in a queue. By default, only the BASIC view is retrieved due to performance considerations; response_view controls the subset of information which is returned. The tasks may be returned in any order. The ordering may change at any time.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
+ * const cloudtasks = google.cloudtasks('v2beta3');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The queue name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
- * parent: 'projects/my-project/locations/my-location/queues/my-queue', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var tasksPage = response['tasks'];
- * if (!tasksPage) {
- * return;
- * }
- * for (var i = 0; i < tasksPage.length; i++) {
- * // TODO: Change code below to process each resource in `tasksPage`:
- * console.log(JSON.stringify(tasksPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudTasks.projects.locations.queues.tasks.list(request, handlePage);
- * }
- * };
- *
- * cloudTasks.projects.locations.queues.tasks.list(request, handlePage);
- * });
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.list({
+ * // Maximum page size.
+ * //
+ * // Fewer tasks than requested might be returned, even if more tasks exist; use
+ * // next_page_token in the response to
+ * // determine if more tasks exist.
+ * //
+ * // The maximum page size is 1000. If unspecified, the page size will be the
+ * // maximum.
+ * pageSize: 'placeholder-value',
+ * // A token identifying the page of results to return.
+ * //
+ * // To request the first page results, page_token must be empty. To
+ * // request the next page of results, page_token must be the value of
+ * // next_page_token returned
+ * // from the previous call to ListTasks
+ * // method.
+ * //
+ * // The page token is valid for only 2 hours.
+ * pageToken: 'placeholder-value',
+ * // Required. The queue name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+ * parent: 'projects/my-project/locations/my-location/queues/my-queue',
+ * // The response_view specifies which subset of the Task will be
+ * // returned.
+ * //
+ * // By default response_view is BASIC; not all
+ * // information is retrieved by default because some data, such as
+ * // payloads, might be desirable to return only when needed because
+ * // of its large size or because of the sensitivity of data that it
+ * // contains.
+ * //
+ * // Authorization for FULL requires
+ * // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+ * // permission on the Task resource.
+ * responseView: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "tasks": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtasks.projects.locations.queues.tasks.list
* @memberOf! ()
*
@@ -3000,57 +3049,65 @@ export namespace cloudtasks_v2beta3 {
* cloudtasks.projects.locations.queues.tasks.run
* @desc Forces a task to run now. When this method is called, Cloud Tasks will dispatch the task, even if the task is already running, the queue has reached its RateLimits or is PAUSED. This command is meant to be used for manual debugging. For example, RunTask can be used to retry a failed task after a fix has been made or to manually force a task to be dispatched now. The dispatched task is returned. That is, the task that is returned contains the status after the task is dispatched but before the task is received by its target. If Cloud Tasks receives a successful response from the task's target, then the task will be deleted; otherwise the task's schedule_time will be reset to the time that RunTask was called plus the retry delay specified in the queue's RetryConfig. RunTask returns NOT_FOUND when it is called on a task that has already succeeded or permanently failed.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Tasks API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtasks
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtasks.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTasks = google.cloudtasks('v2beta3');
+ * const cloudtasks = google.cloudtasks('v2beta3');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required.
- * // The task name. For example:
- * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
- * name: 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * cloudTasks.projects.locations.queues.tasks.run(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await cloudtasks.projects.locations.queues.tasks.run({
+ * // Required. The task name. For example:
+ * // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+ * name:
+ * 'projects/my-project/locations/my-location/queues/my-queue/tasks/my-task',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "responseView": "my_responseView"
+ * // }
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "appEngineHttpRequest": {},
+ * // "createTime": "my_createTime",
+ * // "dispatchCount": 0,
+ * // "dispatchDeadline": "my_dispatchDeadline",
+ * // "firstAttempt": {},
+ * // "httpRequest": {},
+ * // "lastAttempt": {},
+ * // "name": "my_name",
+ * // "responseCount": 0,
+ * // "scheduleTime": "my_scheduleTime",
+ * // "view": "my_view"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtasks.projects.locations.queues.tasks.run
* @memberOf! ()
*
diff --git a/src/apis/cloudtrace/v1.ts b/src/apis/cloudtrace/v1.ts
index 7c9862efcb1..ec384a6e945 100644
--- a/src/apis/cloudtrace/v1.ts
+++ b/src/apis/cloudtrace/v1.ts
@@ -202,53 +202,54 @@ export namespace cloudtrace_v1 {
* cloudtrace.projects.patchTraces
* @desc Sends new traces to Stackdriver Trace or updates existing traces. If the ID of a trace that you send matches that of an existing trace, any fields in the existing trace and its spans are overwritten by the provided values, and any new fields provided are merged with the existing trace data. If the ID does not match, a new trace is created. In this case, writing traces is not considered an active developer method since traces are machine generated.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Stackdriver Trace API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtrace
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtrace.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTrace = google.cloudtrace('v1');
+ * const cloudtrace = google.cloudtrace('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // ID of the Cloud project where the trace data is stored.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/trace.append',
+ * ],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
- * },
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * auth: authClient,
- * };
+ * // Do the magic
+ * const res = await cloudtrace.projects.patchTraces({
+ * // Required. ID of the Cloud project where the trace data is stored.
+ * projectId: 'placeholder-value',
*
- * cloudTrace.projects.patchTraces(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "traces": []
+ * // }
+ * },
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {}
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtrace.projects.patchTraces
* @memberOf! ()
*
@@ -348,54 +349,52 @@ export namespace cloudtrace_v1 {
* cloudtrace.projects.traces.get
* @desc Gets a single trace by its ID. In this case, getting for traces is considered an active developer method, even though it is technically a read-only method.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Stackdriver Trace API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtrace
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtrace.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTrace = google.cloudtrace('v1');
+ * const cloudtrace = google.cloudtrace('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // ID of the Cloud project where the trace data is stored.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/trace.readonly',
+ * ],
+ * });
*
- * // ID of the trace to return.
- * traceId: 'my-trace-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * auth: authClient,
- * };
+ * // Do the magic
+ * const res = await cloudtrace.projects.traces.get({
+ * // Required. ID of the Cloud project where the trace data is stored.
+ * projectId: 'placeholder-value',
+ * // Required. ID of the trace to return.
+ * traceId: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * cloudTrace.projects.traces.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "projectId": "my_projectId",
+ * // "spans": [],
+ * // "traceId": "my_traceId"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtrace.projects.traces.get
* @memberOf! ()
*
@@ -469,64 +468,110 @@ export namespace cloudtrace_v1 {
* cloudtrace.projects.traces.list
* @desc Returns of a list of traces that match the specified filter conditions. In this case, listing for traces is considered an active developer method, even though it is technically a read-only method.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Stackdriver Trace API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/cloudtrace
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtrace.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var cloudTrace = google.cloudtrace('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // ID of the Cloud project where the trace data is stored.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * const cloudtrace = google.cloudtrace('v1');
*
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/trace.readonly',
+ * ],
+ * });
*
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * var tracesPage = response['traces'];
- * if (!tracesPage) {
- * return;
- * }
- * for (var i = 0; i < tracesPage.length; i++) {
- * // TODO: Change code below to process each resource in `tracesPage`:
- * console.log(JSON.stringify(tracesPage[i], null, 2));
- * }
+ * // Do the magic
+ * const res = await cloudtrace.projects.traces.list({
+ * // End of the time interval (inclusive) during which the trace data was
+ * // collected from the application.
+ * endTime: 'placeholder-value',
+ * // Optional. A filter against labels for the request.
+ * //
+ * // By default, searches use prefix matching. To specify exact match, prepend
+ * // a plus symbol (`+`) to the search term.
+ * // Multiple terms are ANDed. Syntax:
+ * //
+ * // * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root
+ * // span starts with `NAME_PREFIX`.
+ * // * `+root:NAME` or `+NAME`: Return traces where any root span's name is
+ * // exactly `NAME`.
+ * // * `span:NAME_PREFIX`: Return traces where any span starts with
+ * // `NAME_PREFIX`.
+ * // * `+span:NAME`: Return traces where any span's name is exactly
+ * // `NAME`.
+ * // * `latency:DURATION`: Return traces whose overall latency is
+ * // greater or equal to than `DURATION`. Accepted units are nanoseconds
+ * // (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For
+ * // example, `latency:24ms` returns traces whose overall latency
+ * // is greater than or equal to 24 milliseconds.
+ * // * `label:LABEL_KEY`: Return all traces containing the specified
+ * // label key (exact match, case-sensitive) regardless of the key:value
+ * // pair's value (including empty values).
+ * // * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified
+ * // label key (exact match, case-sensitive) whose value starts with
+ * // `VALUE_PREFIX`. Both a key and a value must be specified.
+ * // * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair
+ * // exactly matching the specified text. Both a key and a value must be
+ * // specified.
+ * // * `method:VALUE`: Equivalent to `/http/method:VALUE`.
+ * // * `url:VALUE`: Equivalent to `/http/url:VALUE`.
+ * filter: 'placeholder-value',
+ * // Optional. Field used to sort the returned traces.
+ * // Can be one of the following:
+ * //
+ * // * `trace_id`
+ * // * `name` (`name` field of root span in the trace)
+ * // * `duration` (difference between `end_time` and `start_time` fields of
+ * // the root span)
+ * // * `start` (`start_time` field of the root span)
+ * //
+ * // Descending order can be specified by appending `desc` to the sort field
+ * // (for example, `name desc`).
+ * //
+ * // Only one sort field is permitted.
+ * orderBy: 'placeholder-value',
+ * // Optional. Maximum number of traces to return. If not specified or <= 0, the
+ * // implementation selects a reasonable value. The implementation may
+ * // return fewer traces than the requested page size.
+ * pageSize: 'placeholder-value',
+ * // Token identifying the page of results to return. If provided, use the
+ * // value of the `next_page_token` field from a previous request.
+ * pageToken: 'placeholder-value',
+ * // Required. ID of the Cloud project where the trace data is stored.
+ * projectId: 'placeholder-value',
+ * // Start of the time interval (inclusive) during which the trace data was
+ * // collected from the application.
+ * startTime: 'placeholder-value',
+ * // Optional. Type of data returned for traces in the list. Default is
+ * // `MINIMAL`.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * cloudTrace.projects.traces.list(request, handlePage);
- * }
- * };
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "traces": []
+ * // }
+ * }
*
- * cloudTrace.projects.traces.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias cloudtrace.projects.traces.list
* @memberOf! ()
*
diff --git a/src/apis/cloudtrace/v2.ts b/src/apis/cloudtrace/v2.ts
index 690faf9a070..ecb834daa20 100644
--- a/src/apis/cloudtrace/v2.ts
+++ b/src/apis/cloudtrace/v2.ts
@@ -442,6 +442,56 @@ export namespace cloudtrace_v2 {
/**
* cloudtrace.projects.traces.batchWrite
* @desc Sends new spans to new or existing traces. You cannot update existing spans. In this case, writing traces is not considered an active developer method since traces are machine generated.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtrace.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtrace = google.cloudtrace('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/trace.append',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtrace.projects.traces.batchWrite({
+ * // Required. The name of the project where the spans belong. The format is
+ * // `projects/[PROJECT_ID]`.
+ * name: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "spans": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtrace.projects.traces.batchWrite
* @memberOf! ()
*
@@ -540,6 +590,89 @@ export namespace cloudtrace_v2 {
/**
* cloudtrace.projects.traces.spans.createSpan
* @desc Creates a new span. In this case, writing traces is not considered an active developer method since traces are machine generated.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtrace.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtrace = google.cloudtrace('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/trace.append',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtrace.projects.traces.spans.createSpan({
+ * // The resource name of the span in the following format:
+ * //
+ * // projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project;
+ * // it is a 32-character hexadecimal encoding of a 16-byte array.
+ * //
+ * // [SPAN_ID] is a unique identifier for a span within a trace; it
+ * // is a 16-character hexadecimal encoding of an 8-byte array.
+ * name: 'projects/my-project/traces/my-trace/spans/my-span',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attributes": {},
+ * // "childSpanCount": 0,
+ * // "displayName": {},
+ * // "endTime": "my_endTime",
+ * // "links": {},
+ * // "name": "my_name",
+ * // "parentSpanId": "my_parentSpanId",
+ * // "sameProcessAsParentSpan": false,
+ * // "spanId": "my_spanId",
+ * // "spanKind": "my_spanKind",
+ * // "stackTrace": {},
+ * // "startTime": "my_startTime",
+ * // "status": {},
+ * // "timeEvents": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attributes": {},
+ * // "childSpanCount": 0,
+ * // "displayName": {},
+ * // "endTime": "my_endTime",
+ * // "links": {},
+ * // "name": "my_name",
+ * // "parentSpanId": "my_parentSpanId",
+ * // "sameProcessAsParentSpan": false,
+ * // "spanId": "my_spanId",
+ * // "spanKind": "my_spanKind",
+ * // "stackTrace": {},
+ * // "startTime": "my_startTime",
+ * // "status": {},
+ * // "timeEvents": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtrace.projects.traces.spans.createSpan
* @memberOf! ()
*
diff --git a/src/apis/cloudtrace/v2beta1.ts b/src/apis/cloudtrace/v2beta1.ts
index 33d1dfa0595..fd496ed518c 100644
--- a/src/apis/cloudtrace/v2beta1.ts
+++ b/src/apis/cloudtrace/v2beta1.ts
@@ -175,6 +175,66 @@ export namespace cloudtrace_v2beta1 {
/**
* cloudtrace.projects.traceSinks.create
* @desc Creates a sink that exports trace spans to a destination. The export of newly-ingested traces begins immediately, unless the sink's `writer_identity` is not permitted to write to the destination. A sink can export traces only from the resource owning the sink (the 'parent').
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtrace.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtrace = google.cloudtrace('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/trace.append',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtrace.projects.traceSinks.create({
+ * // Required. The resource in which to create the sink (currently only project
+ * // sinks are supported):
+ * //
+ * // "projects/[PROJECT_ID]"
+ * //
+ * // Examples: `"projects/my-trace-project"`, `"projects/123456789"`.
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "name": "my_name",
+ * // "outputConfig": {},
+ * // "writerIdentity": "my_writerIdentity"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name",
+ * // "outputConfig": {},
+ * // "writerIdentity": "my_writerIdentity"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtrace.projects.traceSinks.create
* @memberOf! ()
*
@@ -250,6 +310,52 @@ export namespace cloudtrace_v2beta1 {
/**
* cloudtrace.projects.traceSinks.delete
* @desc Deletes a sink.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtrace.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtrace = google.cloudtrace('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/trace.append',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtrace.projects.traceSinks.delete({
+ * // Required. The full resource name of the sink to delete, including the
+ * // parent resource and the sink identifier:
+ * //
+ * // "projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]"
+ * //
+ * // Example: `"projects/12345/traceSinks/my-sink-id"`.
+ * name: 'projects/my-project/traceSinks/my-traceSink',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtrace.projects.traceSinks.delete
* @memberOf! ()
*
@@ -319,6 +425,55 @@ export namespace cloudtrace_v2beta1 {
/**
* cloudtrace.projects.traceSinks.get
* @desc Get a trace sink by name under the parent resource (GCP project).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtrace.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtrace = google.cloudtrace('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/trace.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtrace.projects.traceSinks.get({
+ * // Required. The resource name of the sink:
+ * //
+ * // "projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]"
+ * //
+ * // Example: `"projects/12345/traceSinks/my-sink-id"`.
+ * name: 'projects/my-project/traceSinks/my-traceSink',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name",
+ * // "outputConfig": {},
+ * // "writerIdentity": "my_writerIdentity"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtrace.projects.traceSinks.get
* @memberOf! ()
*
@@ -390,6 +545,62 @@ export namespace cloudtrace_v2beta1 {
/**
* cloudtrace.projects.traceSinks.list
* @desc List all sinks for the parent resource (GCP project).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtrace.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtrace = google.cloudtrace('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/trace.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtrace.projects.traceSinks.list({
+ * // Optional. The maximum number of results to return from this request.
+ * // Non-positive values are ignored. The presence of `nextPageToken` in the
+ * // response indicates that more results might be available.
+ * pageSize: 'placeholder-value',
+ * // Optional. If present, then retrieve the next batch of results from the
+ * // preceding call to this method. `pageToken` must be the value of
+ * // `nextPageToken` from the previous response. The values of other method
+ * // parameters should be identical to those in the previous call.
+ * pageToken: 'placeholder-value',
+ * // Required. The parent resource whose sinks are to be listed (currently only
+ * // project parent resources are supported):
+ * //
+ * // "projects/[PROJECT_ID]"
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "sinks": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtrace.projects.traceSinks.list
* @memberOf! ()
*
@@ -468,6 +679,77 @@ export namespace cloudtrace_v2beta1 {
/**
* cloudtrace.projects.traceSinks.patch
* @desc Updates a sink. This method updates fields in the existing sink according to the provided update mask. The sink's name cannot be changed nor any output-only fields (e.g. the writer_identity).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/cloudtrace.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const cloudtrace = google.cloudtrace('v2beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/trace.append',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await cloudtrace.projects.traceSinks.patch({
+ * // Required. The full resource name of the sink to update, including the
+ * // parent resource and the sink identifier:
+ * //
+ * // "projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]"
+ * //
+ * // Example: `"projects/12345/traceSinks/my-sink-id"`.
+ * name: 'projects/my-project/traceSinks/my-traceSink',
+ * // Required. Field mask that specifies the fields in `trace_sink` that are to
+ * // be updated. A sink field is overwritten if, and only if, it is
+ * // in the update mask. `name` and `writer_identity` fields cannot be updated.
+ * //
+ * // An empty updateMask is considered an error.
+ * //
+ * // For a detailed `FieldMask` definition, see
+ * // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
+ * //
+ * // Example: `updateMask=output_config`.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "name": "my_name",
+ * // "outputConfig": {},
+ * // "writerIdentity": "my_writerIdentity"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "name": "my_name",
+ * // "outputConfig": {},
+ * // "writerIdentity": "my_writerIdentity"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias cloudtrace.projects.traceSinks.patch
* @memberOf! ()
*
diff --git a/src/apis/commentanalyzer/v1alpha1.ts b/src/apis/commentanalyzer/v1alpha1.ts
index 699dfc52673..03728656ca9 100644
--- a/src/apis/commentanalyzer/v1alpha1.ts
+++ b/src/apis/commentanalyzer/v1alpha1.ts
@@ -327,6 +327,62 @@ export namespace commentanalyzer_v1alpha1 {
/**
* commentanalyzer.comments.analyze
* @desc Analyzes the provided text and returns scores for requested attributes.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/commentanalyzer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const commentanalyzer = google.commentanalyzer('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/userinfo.email'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await commentanalyzer.comments.analyze({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clientToken": "my_clientToken",
+ * // "comment": {},
+ * // "communityId": "my_communityId",
+ * // "context": {},
+ * // "doNotStore": false,
+ * // "languages": [],
+ * // "requestedAttributes": {},
+ * // "sessionId": "my_sessionId",
+ * // "spanAnnotations": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attributeScores": {},
+ * // "clientToken": "my_clientToken",
+ * // "detectedLanguages": [],
+ * // "languages": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias commentanalyzer.comments.analyze
* @memberOf! ()
*
@@ -405,6 +461,59 @@ export namespace commentanalyzer_v1alpha1 {
/**
* commentanalyzer.comments.suggestscore
* @desc Suggest comment scores as training data.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/commentanalyzer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const commentanalyzer = google.commentanalyzer('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/userinfo.email'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await commentanalyzer.comments.suggestscore({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attributeScores": {},
+ * // "clientToken": "my_clientToken",
+ * // "comment": {},
+ * // "communityId": "my_communityId",
+ * // "context": {},
+ * // "languages": [],
+ * // "sessionId": "my_sessionId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientToken": "my_clientToken",
+ * // "detectedLanguages": [],
+ * // "requestedLanguages": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias commentanalyzer.comments.suggestscore
* @memberOf! ()
*
diff --git a/src/apis/composer/v1.ts b/src/apis/composer/v1.ts
index 2ebc5323c1e..16609936afa 100644
--- a/src/apis/composer/v1.ts
+++ b/src/apis/composer/v1.ts
@@ -481,6 +481,65 @@ export namespace composer_v1 {
/**
* composer.projects.locations.environments.create
* @desc Create a new environment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.environments.create({
+ * // The parent must be of the form
+ * // "projects/{projectId}/locations/{locationId}".
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "config": {},
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "uuid": "my_uuid"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.environments.create
* @memberOf! ()
*
@@ -556,6 +615,52 @@ export namespace composer_v1 {
/**
* composer.projects.locations.environments.delete
* @desc Delete an environment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.environments.delete({
+ * // The environment to delete, in the form:
+ * // "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+ * name:
+ * 'projects/my-project/locations/my-location/environments/my-environment',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.environments.delete
* @memberOf! ()
*
@@ -627,6 +732,54 @@ export namespace composer_v1 {
/**
* composer.projects.locations.environments.get
* @desc Get an existing environment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.environments.get({
+ * // The resource name of the environment to get, in the form:
+ * // "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+ * name:
+ * 'projects/my-project/locations/my-location/environments/my-environment',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "config": {},
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "uuid": "my_uuid"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.environments.get
* @memberOf! ()
*
@@ -698,6 +851,52 @@ export namespace composer_v1 {
/**
* composer.projects.locations.environments.list
* @desc List environments.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.environments.list({
+ * // The maximum number of environments to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // List environments in the given project and location, in the form:
+ * // "projects/{projectId}/locations/{locationId}"
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "environments": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.environments.list
* @memberOf! ()
*
@@ -776,6 +975,200 @@ export namespace composer_v1 {
/**
* composer.projects.locations.environments.patch
* @desc Update an environment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.environments.patch({
+ * // The relative resource name of the environment to update, in the form:
+ * // "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+ * name:
+ * 'projects/my-project/locations/my-location/environments/my-environment',
+ * // Required. A comma-separated list of paths, relative to `Environment`, of
+ * // fields to update.
+ * // For example, to set the version of scikit-learn to install in the
+ * // environment to 0.19.0 and to remove an existing installation of
+ * // numpy, the `updateMask` parameter would include the following two
+ * // `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+ * // "config.softwareConfig.pypiPackages.numpy". The included patch
+ * // environment would specify the scikit-learn version as follows:
+ * //
+ * // {
+ * // "config":{
+ * // "softwareConfig":{
+ * // "pypiPackages":{
+ * // "scikit-learn":"==0.19.0"
+ * // }
+ * // }
+ * // }
+ * // }
+ * //
+ * // Note that in the above example, any existing PyPI packages
+ * // other than scikit-learn and numpy will be unaffected.
+ * //
+ * // Only one update type may be included in a single request's `updateMask`.
+ * // For example, one cannot update both the PyPI packages and
+ * // labels in the same request. However, it is possible to update multiple
+ * // members of a map field simultaneously in the same request. For example,
+ * // to set the labels "label1" and "label2" while clearing "label3" (assuming
+ * // it already exists), one can
+ * // provide the paths "labels.label1", "labels.label2", and "labels.label3"
+ * // and populate the patch environment as follows:
+ * //
+ * // {
+ * // "labels":{
+ * // "label1":"new-label1-value"
+ * // "label2":"new-label2-value"
+ * // }
+ * // }
+ * //
+ * // Note that in the above example, any existing labels that are not
+ * // included in the `updateMask` will be unaffected.
+ * //
+ * // It is also possible to replace an entire map field by providing the
+ * // map field's path in the `updateMask`. The new value of the field will
+ * // be that which is provided in the patch environment. For example, to
+ * // delete all pre-existing user-specified PyPI packages and
+ * // install botocore at version 1.7.14, the `updateMask` would contain
+ * // the path "config.softwareConfig.pypiPackages", and
+ * // the patch environment would be the following:
+ * //
+ * // {
+ * // "config":{
+ * // "softwareConfig":{
+ * // "pypiPackages":{
+ * // "botocore":"==1.7.14"
+ * // }
+ * // }
+ * // }
+ * // }
+ * //
+ * // **Note:** Only the following fields can be updated:
+ * //
+ * //
+ * //
+ * //
+ * // Mask |
+ * // Purpose |
+ * //
+ * //
+ * // config.softwareConfig.pypiPackages
+ * // |
+ * // Replace all custom custom PyPI packages. If a replacement
+ * // package map is not included in `environment`, all custom
+ * // PyPI packages are cleared. It is an error to provide both this mask and a
+ * // mask specifying an individual package. |
+ * //
+ * //
+ * // config.softwareConfig.pypiPackages.packagename |
+ * // Update the custom PyPI package packagename,
+ * // preserving other packages. To delete the package, include it in
+ * // `updateMask`, and omit the mapping for it in
+ * // `environment.config.softwareConfig.pypiPackages`. It is an error
+ * // to provide both a mask of this form and the
+ * // "config.softwareConfig.pypiPackages" mask. |
+ * //
+ * //
+ * // labels |
+ * // Replace all environment labels. If a replacement labels map is not
+ * // included in `environment`, all labels are cleared. It is an error to
+ * // provide both this mask and a mask specifying one or more individual
+ * // labels. |
+ * //
+ * //
+ * // labels.labelName |
+ * // Set the label named labelName, while preserving other
+ * // labels. To delete the label, include it in `updateMask` and omit its
+ * // mapping in `environment.labels`. It is an error to provide both a
+ * // mask of this form and the "labels" mask. |
+ * //
+ * //
+ * // config.nodeCount |
+ * // Horizontally scale the number of nodes in the environment. An integer
+ * // greater than or equal to 3 must be provided in the `config.nodeCount`
+ * // field.
+ * // |
+ * //
+ * //
+ * // config.softwareConfig.airflowConfigOverrides |
+ * // Replace all Apache Airflow config overrides. If a replacement config
+ * // overrides map is not included in `environment`, all config overrides
+ * // are cleared.
+ * // It is an error to provide both this mask and a mask specifying one or
+ * // more individual config overrides. |
+ * //
+ * //
+ * // config.softwareConfig.airflowConfigOverrides.section-name
+ * // |
+ * // Override the Apache Airflow config property name in the
+ * // section named section, preserving other properties. To delete
+ * // the property override, include it in `updateMask` and omit its mapping
+ * // in `environment.config.softwareConfig.airflowConfigOverrides`.
+ * // It is an error to provide both a mask of this form and the
+ * // "config.softwareConfig.airflowConfigOverrides" mask. |
+ * //
+ * //
+ * // config.softwareConfig.envVariables |
+ * // Replace all environment variables. If a replacement environment
+ * // variable map is not included in `environment`, all custom environment
+ * // variables are cleared.
+ * // It is an error to provide both this mask and a mask specifying one or
+ * // more individual environment variables. |
+ * //
+ * //
+ * //
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "config": {},
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "uuid": "my_uuid"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.environments.patch
* @memberOf! ()
*
@@ -939,6 +1332,52 @@ export namespace composer_v1 {
/**
* composer.projects.locations.imageVersions.list
* @desc List ImageVersions for provided location.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.imageVersions.list({
+ * // The maximum number of image_versions to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // List ImageVersions in the given project and location, in the form:
+ * // "projects/{projectId}/locations/{locationId}"
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "imageVersions": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.imageVersions.list
* @memberOf! ()
*
@@ -1050,6 +1489,44 @@ export namespace composer_v1 {
/**
* composer.projects.locations.operations.delete
* @desc Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.operations.delete({
+ * // The name of the operation resource to be deleted.
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.operations.delete
* @memberOf! ()
*
@@ -1119,6 +1596,50 @@ export namespace composer_v1 {
/**
* composer.projects.locations.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.operations.get({
+ * // The name of the operation resource.
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.operations.get
* @memberOf! ()
*
@@ -1190,6 +1711,53 @@ export namespace composer_v1 {
/**
* composer.projects.locations.operations.list
* @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.operations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The name of the operation's parent resource.
+ * name: 'projects/my-project/locations/my-location',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.operations.list
* @memberOf! ()
*
diff --git a/src/apis/composer/v1beta1.ts b/src/apis/composer/v1beta1.ts
index d2e49e48d2d..1eb379d75a5 100644
--- a/src/apis/composer/v1beta1.ts
+++ b/src/apis/composer/v1beta1.ts
@@ -507,6 +507,65 @@ export namespace composer_v1beta1 {
/**
* composer.projects.locations.environments.create
* @desc Create a new environment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.environments.create({
+ * // The parent must be of the form
+ * // "projects/{projectId}/locations/{locationId}".
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "config": {},
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "uuid": "my_uuid"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.environments.create
* @memberOf! ()
*
@@ -582,6 +641,52 @@ export namespace composer_v1beta1 {
/**
* composer.projects.locations.environments.delete
* @desc Delete an environment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.environments.delete({
+ * // The environment to delete, in the form:
+ * // "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+ * name:
+ * 'projects/my-project/locations/my-location/environments/my-environment',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.environments.delete
* @memberOf! ()
*
@@ -653,6 +758,54 @@ export namespace composer_v1beta1 {
/**
* composer.projects.locations.environments.get
* @desc Get an existing environment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.environments.get({
+ * // The resource name of the environment to get, in the form:
+ * // "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+ * name:
+ * 'projects/my-project/locations/my-location/environments/my-environment',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "config": {},
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "uuid": "my_uuid"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.environments.get
* @memberOf! ()
*
@@ -724,6 +877,52 @@ export namespace composer_v1beta1 {
/**
* composer.projects.locations.environments.list
* @desc List environments.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.environments.list({
+ * // The maximum number of environments to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // List environments in the given project and location, in the form:
+ * // "projects/{projectId}/locations/{locationId}"
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "environments": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.environments.list
* @memberOf! ()
*
@@ -802,6 +1001,210 @@ export namespace composer_v1beta1 {
/**
* composer.projects.locations.environments.patch
* @desc Update an environment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.environments.patch({
+ * // The relative resource name of the environment to update, in the form:
+ * // "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+ * name:
+ * 'projects/my-project/locations/my-location/environments/my-environment',
+ * // Required. A comma-separated list of paths, relative to `Environment`, of
+ * // fields to update.
+ * // For example, to set the version of scikit-learn to install in the
+ * // environment to 0.19.0 and to remove an existing installation of
+ * // argparse, the `updateMask` parameter would include the following two
+ * // `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+ * // "config.softwareConfig.pypiPackages.argparse". The included patch
+ * // environment would specify the scikit-learn version as follows:
+ * //
+ * // {
+ * // "config":{
+ * // "softwareConfig":{
+ * // "pypiPackages":{
+ * // "scikit-learn":"==0.19.0"
+ * // }
+ * // }
+ * // }
+ * // }
+ * //
+ * // Note that in the above example, any existing PyPI packages
+ * // other than scikit-learn and argparse will be unaffected.
+ * //
+ * // Only one update type may be included in a single request's `updateMask`.
+ * // For example, one cannot update both the PyPI packages and
+ * // labels in the same request. However, it is possible to update multiple
+ * // members of a map field simultaneously in the same request. For example,
+ * // to set the labels "label1" and "label2" while clearing "label3" (assuming
+ * // it already exists), one can
+ * // provide the paths "labels.label1", "labels.label2", and "labels.label3"
+ * // and populate the patch environment as follows:
+ * //
+ * // {
+ * // "labels":{
+ * // "label1":"new-label1-value"
+ * // "label2":"new-label2-value"
+ * // }
+ * // }
+ * //
+ * // Note that in the above example, any existing labels that are not
+ * // included in the `updateMask` will be unaffected.
+ * //
+ * // It is also possible to replace an entire map field by providing the
+ * // map field's path in the `updateMask`. The new value of the field will
+ * // be that which is provided in the patch environment. For example, to
+ * // delete all pre-existing user-specified PyPI packages and
+ * // install botocore at version 1.7.14, the `updateMask` would contain
+ * // the path "config.softwareConfig.pypiPackages", and
+ * // the patch environment would be the following:
+ * //
+ * // {
+ * // "config":{
+ * // "softwareConfig":{
+ * // "pypiPackages":{
+ * // "botocore":"==1.7.14"
+ * // }
+ * // }
+ * // }
+ * // }
+ * //
+ * // Note: Only the following fields can be updated:
+ * //
+ * //
+ * //
+ * //
+ * // Mask |
+ * // Purpose |
+ * //
+ * //
+ * // config.softwareConfig.pypiPackages
+ * // |
+ * // Replace all custom custom PyPI packages. If a replacement
+ * // package map is not included in `environment`, all custom
+ * // PyPI packages are cleared. It is an error to provide both this mask and a
+ * // mask specifying an individual package. |
+ * //
+ * //
+ * // config.softwareConfig.pypiPackages.packagename |
+ * // Update the custom PyPI package packagename,
+ * // preserving other packages. To delete the package, include it in
+ * // `updateMask`, and omit the mapping for it in
+ * // `environment.config.softwareConfig.pypiPackages`. It is an error
+ * // to provide both a mask of this form and the
+ * // "config.softwareConfig.pypiPackages" mask. |
+ * //
+ * //
+ * // labels |
+ * // Replace all environment labels. If a replacement labels map is not
+ * // included in `environment`, all labels are cleared. It is an error to
+ * // provide both this mask and a mask specifying one or more individual
+ * // labels. |
+ * //
+ * //
+ * // labels.labelName |
+ * // Set the label named labelName, while preserving other
+ * // labels. To delete the label, include it in `updateMask` and omit its
+ * // mapping in `environment.labels`. It is an error to provide both a
+ * // mask of this form and the "labels" mask. |
+ * //
+ * //
+ * // config.nodeCount |
+ * // Horizontally scale the number of nodes in the environment. An integer
+ * // greater than or equal to 3 must be provided in the `config.nodeCount`
+ * // field.
+ * // |
+ * //
+ * //
+ * // config.softwareConfig.airflowConfigOverrides |
+ * // Replace all Apache Airflow config overrides. If a replacement config
+ * // overrides map is not included in `environment`, all config overrides
+ * // are cleared.
+ * // It is an error to provide both this mask and a mask specifying one or
+ * // more individual config overrides. |
+ * //
+ * //
+ * // config.softwareConfig.airflowConfigOverrides.section-name
+ * // |
+ * // Override the Apache Airflow config property name in the
+ * // section named section, preserving other properties. To delete
+ * // the property override, include it in `updateMask` and omit its mapping
+ * // in `environment.config.softwareConfig.airflowConfigOverrides`.
+ * // It is an error to provide both a mask of this form and the
+ * // "config.softwareConfig.airflowConfigOverrides" mask. |
+ * //
+ * //
+ * // config.softwareConfig.envVariables |
+ * // Replace all environment variables. If a replacement environment
+ * // variable map is not included in `environment`, all custom environment
+ * // variables are cleared.
+ * // It is an error to provide both this mask and a mask specifying one or
+ * // more individual environment variables. |
+ * //
+ * //
+ * // config.softwareConfig.imageVersion |
+ * // Upgrade the version of the environment in-place. Refer to
+ * // `SoftwareConfig.image_version` for information on how to format the new
+ * // image version. Additionally, the new image version cannot effect a version
+ * // downgrade and must match the current image version's Composer major
+ * // version and Airflow major and minor versions. Consult the
+ * // Cloud
+ * // Composer Version List for valid values. |
+ * //
+ * //
+ * //
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "config": {},
+ * // "createTime": "my_createTime",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "state": "my_state",
+ * // "updateTime": "my_updateTime",
+ * // "uuid": "my_uuid"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.environments.patch
* @memberOf! ()
*
@@ -965,6 +1368,52 @@ export namespace composer_v1beta1 {
/**
* composer.projects.locations.imageVersions.list
* @desc List ImageVersions for provided location.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.imageVersions.list({
+ * // The maximum number of image_versions to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // List ImageVersions in the given project and location, in the form:
+ * // "projects/{projectId}/locations/{locationId}"
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "imageVersions": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.imageVersions.list
* @memberOf! ()
*
@@ -1076,6 +1525,44 @@ export namespace composer_v1beta1 {
/**
* composer.projects.locations.operations.delete
* @desc Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.operations.delete({
+ * // The name of the operation resource to be deleted.
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.operations.delete
* @memberOf! ()
*
@@ -1145,6 +1632,50 @@ export namespace composer_v1beta1 {
/**
* composer.projects.locations.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.operations.get({
+ * // The name of the operation resource.
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.operations.get
* @memberOf! ()
*
@@ -1216,6 +1747,53 @@ export namespace composer_v1beta1 {
/**
* composer.projects.locations.operations.list
* @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/composer.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const composer = google.composer('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await composer.projects.locations.operations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The name of the operation's parent resource.
+ * name: 'projects/my-project/locations/my-location',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias composer.projects.locations.operations.list
* @memberOf! ()
*
diff --git a/src/apis/compute/alpha.ts b/src/apis/compute/alpha.ts
index 173b992e055..b24e9afafe4 100644
--- a/src/apis/compute/alpha.ts
+++ b/src/apis/compute/alpha.ts
@@ -14798,6 +14798,79 @@ export namespace compute_alpha {
/**
* compute.acceleratorTypes.aggregatedList
* @desc Retrieves an aggregated list of accelerator types.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.acceleratorTypes.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.acceleratorTypes.aggregatedList
* @memberOf! ()
*
@@ -14887,6 +14960,64 @@ export namespace compute_alpha {
/**
* compute.acceleratorTypes.get
* @desc Returns the specified accelerator type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.acceleratorTypes.get({
+ * // Name of the accelerator type to return.
+ * acceleratorType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "maximumCardsPerInstance": 0,
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.acceleratorTypes.get
* @memberOf! ()
*
@@ -14963,6 +15094,78 @@ export namespace compute_alpha {
/**
* compute.acceleratorTypes.list
* @desc Retrieves a list of accelerator types available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.acceleratorTypes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.acceleratorTypes.list
* @memberOf! ()
*
@@ -15143,6 +15346,79 @@ export namespace compute_alpha {
/**
* compute.addresses.aggregatedList
* @desc Retrieves an aggregated list of addresses.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.addresses.aggregatedList
* @memberOf! ()
*
@@ -15226,6 +15502,83 @@ export namespace compute_alpha {
/**
* compute.addresses.delete
* @desc Deletes the specified address resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.delete({
+ * // Name of the address resource to delete.
+ * address: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.addresses.delete
* @memberOf! ()
*
@@ -15302,6 +15655,74 @@ export namespace compute_alpha {
/**
* compute.addresses.get
* @desc Returns the specified address resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.get({
+ * // Name of the address resource to return.
+ * address: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": "my_address",
+ * // "addressType": "my_addressType",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "prefixLength": 0,
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status",
+ * // "subnetwork": "my_subnetwork",
+ * // "users": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.addresses.get
* @memberOf! ()
*
@@ -15375,6 +15796,108 @@ export namespace compute_alpha {
/**
* compute.addresses.insert
* @desc Creates an address resource in the specified project by using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": "my_address",
+ * // "addressType": "my_addressType",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "prefixLength": 0,
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status",
+ * // "subnetwork": "my_subnetwork",
+ * // "users": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.addresses.insert
* @memberOf! ()
*
@@ -15451,6 +15974,78 @@ export namespace compute_alpha {
/**
* compute.addresses.list
* @desc Retrieves a list of addresses contained within the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.addresses.list
* @memberOf! ()
*
@@ -15530,6 +16125,92 @@ export namespace compute_alpha {
/**
* compute.addresses.setLabels
* @desc Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.addresses.setLabels
* @memberOf! ()
*
@@ -15608,6 +16289,63 @@ export namespace compute_alpha {
/**
* compute.addresses.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.addresses.testIamPermissions
* @memberOf! ()
*
@@ -15888,6 +16626,79 @@ export namespace compute_alpha {
/**
* compute.autoscalers.aggregatedList
* @desc Retrieves an aggregated list of autoscalers.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.autoscalers.aggregatedList
* @memberOf! ()
*
@@ -15972,6 +16783,83 @@ export namespace compute_alpha {
/**
* compute.autoscalers.delete
* @desc Deletes the specified autoscaler.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.delete({
+ * // Name of the autoscaler to delete.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.autoscalers.delete
* @memberOf! ()
*
@@ -16049,6 +16937,68 @@ export namespace compute_alpha {
/**
* compute.autoscalers.get
* @desc Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.get({
+ * // Name of the autoscaler to return.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.autoscalers.get
* @memberOf! ()
*
@@ -16124,6 +17074,102 @@ export namespace compute_alpha {
/**
* compute.autoscalers.insert
* @desc Creates an autoscaler in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.autoscalers.insert
* @memberOf! ()
*
@@ -16201,6 +17247,78 @@ export namespace compute_alpha {
/**
* compute.autoscalers.list
* @desc Retrieves a list of autoscalers contained within the specified zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.autoscalers.list
* @memberOf! ()
*
@@ -16280,6 +17398,104 @@ export namespace compute_alpha {
/**
* compute.autoscalers.patch
* @desc Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.patch({
+ * // Name of the autoscaler to patch.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.autoscalers.patch
* @memberOf! ()
*
@@ -16358,6 +17574,63 @@ export namespace compute_alpha {
/**
* compute.autoscalers.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.autoscalers.testIamPermissions
* @memberOf! ()
*
@@ -16439,6 +17712,104 @@ export namespace compute_alpha {
/**
* compute.autoscalers.update
* @desc Updates an autoscaler in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.update({
+ * // Name of the autoscaler to update.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.autoscalers.update
* @memberOf! ()
*
@@ -16747,6 +18118,90 @@ export namespace compute_alpha {
/**
* compute.backendBuckets.addSignedUrlKey
* @desc Adds a key for validating requests with signed URLs for this backend bucket.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.addSignedUrlKey({
+ * // Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.
+ * backendBucket: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "keyName": "my_keyName",
+ * // "keyValue": "my_keyValue"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendBuckets.addSignedUrlKey
* @memberOf! ()
*
@@ -16824,6 +18279,81 @@ export namespace compute_alpha {
/**
* compute.backendBuckets.delete
* @desc Deletes the specified BackendBucket resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.delete({
+ * // Name of the BackendBucket resource to delete.
+ * backendBucket: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendBuckets.delete
* @memberOf! ()
*
@@ -16900,6 +18430,83 @@ export namespace compute_alpha {
/**
* compute.backendBuckets.deleteSignedUrlKey
* @desc Deletes a key for validating requests with signed URLs for this backend bucket.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.deleteSignedUrlKey({
+ * // Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.
+ * backendBucket: 'placeholder-value',
+ * // The name of the Signed URL Key to delete.
+ * keyName: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendBuckets.deleteSignedUrlKey
* @memberOf! ()
*
@@ -16977,6 +18584,62 @@ export namespace compute_alpha {
/**
* compute.backendBuckets.get
* @desc Returns the specified BackendBucket resource. Gets a list of available backend buckets by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.get({
+ * // Name of the BackendBucket resource to return.
+ * backendBucket: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bucketName": "my_bucketName",
+ * // "cdnPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableCdn": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendBuckets.get
* @memberOf! ()
*
@@ -17052,6 +18715,60 @@ export namespace compute_alpha {
/**
* compute.backendBuckets.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendBuckets.getIamPolicy
* @memberOf! ()
*
@@ -17126,6 +18843,96 @@ export namespace compute_alpha {
/**
* compute.backendBuckets.insert
* @desc Creates a BackendBucket resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bucketName": "my_bucketName",
+ * // "cdnPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableCdn": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendBuckets.insert
* @memberOf! ()
*
@@ -17202,6 +19009,76 @@ export namespace compute_alpha {
/**
* compute.backendBuckets.list
* @desc Retrieves the list of BackendBucket resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendBuckets.list
* @memberOf! ()
*
@@ -17281,6 +19158,98 @@ export namespace compute_alpha {
/**
* compute.backendBuckets.patch
* @desc Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.patch({
+ * // Name of the BackendBucket resource to patch.
+ * backendBucket: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bucketName": "my_bucketName",
+ * // "cdnPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableCdn": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendBuckets.patch
* @memberOf! ()
*
@@ -17358,6 +19327,67 @@ export namespace compute_alpha {
/**
* compute.backendBuckets.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendBuckets.setIamPolicy
* @memberOf! ()
*
@@ -17432,6 +19462,61 @@ export namespace compute_alpha {
/**
* compute.backendBuckets.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendBuckets.testIamPermissions
* @memberOf! ()
*
@@ -17512,6 +19597,98 @@ export namespace compute_alpha {
/**
* compute.backendBuckets.update
* @desc Updates the specified BackendBucket resource with the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.update({
+ * // Name of the BackendBucket resource to update.
+ * backendBucket: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bucketName": "my_bucketName",
+ * // "cdnPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableCdn": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendBuckets.update
* @memberOf! ()
*
@@ -17847,6 +20024,90 @@ export namespace compute_alpha {
/**
* compute.backendServices.addSignedUrlKey
* @desc Adds a key for validating requests with signed URLs for this backend service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.addSignedUrlKey({
+ * // Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.
+ * backendService: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "keyName": "my_keyName",
+ * // "keyValue": "my_keyValue"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendServices.addSignedUrlKey
* @memberOf! ()
*
@@ -17924,6 +20185,79 @@ export namespace compute_alpha {
/**
* compute.backendServices.aggregatedList
* @desc Retrieves the list of all BackendService resources, regional and global, available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Name of the project scoping this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendServices.aggregatedList
* @memberOf! ()
*
@@ -18013,6 +20347,81 @@ export namespace compute_alpha {
/**
* compute.backendServices.delete
* @desc Deletes the specified BackendService resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.delete({
+ * // Name of the BackendService resource to delete.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendServices.delete
* @memberOf! ()
*
@@ -18089,6 +20498,83 @@ export namespace compute_alpha {
/**
* compute.backendServices.deleteSignedUrlKey
* @desc Deletes a key for validating requests with signed URLs for this backend service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.deleteSignedUrlKey({
+ * // Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.
+ * backendService: 'placeholder-value',
+ * // The name of the Signed URL Key to delete.
+ * keyName: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendServices.deleteSignedUrlKey
* @memberOf! ()
*
@@ -18166,6 +20652,84 @@ export namespace compute_alpha {
/**
* compute.backendServices.get
* @desc Returns the specified BackendService resource. Gets a list of available backend services.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.get({
+ * // Name of the BackendService resource to return.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "securitySettings": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendServices.get
* @memberOf! ()
*
@@ -18241,6 +20805,63 @@ export namespace compute_alpha {
/**
* compute.backendServices.getHealth
* @desc Gets the most recent health check results for this BackendService. Example request body: { "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" }
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.getHealth({
+ * // Name of the BackendService resource to which the queried instance belongs.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "group": "my_group"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "annotations": {},
+ * // "healthStatus": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendServices.getHealth
* @memberOf! ()
*
@@ -18324,6 +20945,118 @@ export namespace compute_alpha {
/**
* compute.backendServices.insert
* @desc Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Understanding backend services for more information.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "securitySettings": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendServices.insert
* @memberOf! ()
*
@@ -18400,6 +21133,76 @@ export namespace compute_alpha {
/**
* compute.backendServices.list
* @desc Retrieves the list of BackendService resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendServices.list
* @memberOf! ()
*
@@ -18479,6 +21282,120 @@ export namespace compute_alpha {
/**
* compute.backendServices.patch
* @desc Patches the specified BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.patch({
+ * // Name of the BackendService resource to patch.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "securitySettings": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendServices.patch
* @memberOf! ()
*
@@ -18556,6 +21473,89 @@ export namespace compute_alpha {
/**
* compute.backendServices.setSecurityPolicy
* @desc Sets the security policy for the specified backend service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.setSecurityPolicy({
+ * // Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.
+ * backendService: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "securityPolicy": "my_securityPolicy"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendServices.setSecurityPolicy
* @memberOf! ()
*
@@ -18633,6 +21633,61 @@ export namespace compute_alpha {
/**
* compute.backendServices.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendServices.testIamPermissions
* @memberOf! ()
*
@@ -18713,6 +21768,120 @@ export namespace compute_alpha {
/**
* compute.backendServices.update
* @desc Updates the specified BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.update({
+ * // Name of the BackendService resource to update.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "securitySettings": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendServices.update
* @memberOf! ()
*
@@ -19089,6 +22258,91 @@ export namespace compute_alpha {
/**
* compute.disks.addResourcePolicies
* @desc Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.addResourcePolicies({
+ * // The disk name for this request.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.addResourcePolicies
* @memberOf! ()
*
@@ -19167,6 +22421,79 @@ export namespace compute_alpha {
/**
* compute.disks.aggregatedList
* @desc Retrieves an aggregated list of persistent disks.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.aggregatedList
* @memberOf! ()
*
@@ -19248,6 +22575,115 @@ export namespace compute_alpha {
/**
* compute.disks.createSnapshot
* @desc Creates a snapshot of a specified persistent disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.createSnapshot({
+ * // Name of the persistent disk to snapshot.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // [Input Only] Specifies to create an application consistent snapshot by informing the OS to prepare for the snapshot process. Currently only supported on Windows instances using the Volume Shadow Copy Service (VSS).
+ * guestFlush: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoCreated": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "downloadBytes": "my_downloadBytes",
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "snapshotEncryptionKey": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "status": "my_status",
+ * // "storageBytes": "my_storageBytes",
+ * // "storageBytesStatus": "my_storageBytesStatus",
+ * // "storageLocations": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.createSnapshot
* @memberOf! ()
*
@@ -19327,6 +22763,83 @@ export namespace compute_alpha {
/**
* compute.disks.delete
* @desc Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.delete({
+ * // Name of the persistent disk to delete.
+ * disk: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.delete
* @memberOf! ()
*
@@ -19403,6 +22916,93 @@ export namespace compute_alpha {
/**
* compute.disks.get
* @desc Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.get({
+ * // Name of the persistent disk to return.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskEncryptionKey": {},
+ * // "eraseWindowsVssSignature": false,
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "lastAttachTimestamp": "my_lastAttachTimestamp",
+ * // "lastDetachTimestamp": "my_lastDetachTimestamp",
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "multiWriter": false,
+ * // "name": "my_name",
+ * // "options": "my_options",
+ * // "physicalBlockSizeBytes": "my_physicalBlockSizeBytes",
+ * // "region": "my_region",
+ * // "replicaZones": [],
+ * // "resourcePolicies": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sizeGb": "my_sizeGb",
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceInPlaceSnapshot": "my_sourceInPlaceSnapshot",
+ * // "sourceInPlaceSnapshotId": "my_sourceInPlaceSnapshotId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "sourceStorageObject": "my_sourceStorageObject",
+ * // "status": "my_status",
+ * // "storageType": "my_storageType",
+ * // "type": "my_type",
+ * // "users": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.get
* @memberOf! ()
*
@@ -19476,6 +23076,62 @@ export namespace compute_alpha {
/**
* compute.disks.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.getIamPolicy
* @memberOf! ()
*
@@ -19551,6 +23207,129 @@ export namespace compute_alpha {
/**
* compute.disks.insert
* @desc Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Optional. Source image to restore onto a disk.
+ * sourceImage: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskEncryptionKey": {},
+ * // "eraseWindowsVssSignature": false,
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "lastAttachTimestamp": "my_lastAttachTimestamp",
+ * // "lastDetachTimestamp": "my_lastDetachTimestamp",
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "multiWriter": false,
+ * // "name": "my_name",
+ * // "options": "my_options",
+ * // "physicalBlockSizeBytes": "my_physicalBlockSizeBytes",
+ * // "region": "my_region",
+ * // "replicaZones": [],
+ * // "resourcePolicies": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sizeGb": "my_sizeGb",
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceInPlaceSnapshot": "my_sourceInPlaceSnapshot",
+ * // "sourceInPlaceSnapshotId": "my_sourceInPlaceSnapshotId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "sourceStorageObject": "my_sourceStorageObject",
+ * // "status": "my_status",
+ * // "storageType": "my_storageType",
+ * // "type": "my_type",
+ * // "users": [],
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.insert
* @memberOf! ()
*
@@ -19627,6 +23406,78 @@ export namespace compute_alpha {
/**
* compute.disks.list
* @desc Retrieves a list of persistent disks contained within the specified zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.list
* @memberOf! ()
*
@@ -19703,6 +23554,91 @@ export namespace compute_alpha {
/**
* compute.disks.removeResourcePolicies
* @desc Removes resource policies from a disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.removeResourcePolicies({
+ * // The disk name for this request.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.removeResourcePolicies
* @memberOf! ()
*
@@ -19783,6 +23719,91 @@ export namespace compute_alpha {
/**
* compute.disks.resize
* @desc Resizes the specified persistent disk. You can only increase the size of the disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.resize({
+ * // The name of the persistent disk.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sizeGb": "my_sizeGb"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.resize
* @memberOf! ()
*
@@ -19860,6 +23881,69 @@ export namespace compute_alpha {
/**
* compute.disks.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.setIamPolicy
* @memberOf! ()
*
@@ -19935,6 +24019,92 @@ export namespace compute_alpha {
/**
* compute.disks.setLabels
* @desc Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.setLabels
* @memberOf! ()
*
@@ -20012,6 +24182,63 @@ export namespace compute_alpha {
/**
* compute.disks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.testIamPermissions
* @memberOf! ()
*
@@ -20463,6 +24690,79 @@ export namespace compute_alpha {
/**
* compute.diskTypes.aggregatedList
* @desc Retrieves an aggregated list of disk types.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.diskTypes.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.diskTypes.aggregatedList
* @memberOf! ()
*
@@ -20546,6 +24846,66 @@ export namespace compute_alpha {
/**
* compute.diskTypes.get
* @desc Returns the specified disk type. Gets a list of available disk types by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.diskTypes.get({
+ * // Name of the disk type to return.
+ * diskType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultDiskSizeGb": "my_defaultDiskSizeGb",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "validDiskSize": "my_validDiskSize",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.diskTypes.get
* @memberOf! ()
*
@@ -20619,6 +24979,78 @@ export namespace compute_alpha {
/**
* compute.diskTypes.list
* @desc Retrieves a list of disk types available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.diskTypes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.diskTypes.list
* @memberOf! ()
*
@@ -20796,6 +25228,81 @@ export namespace compute_alpha {
/**
* compute.externalVpnGateways.delete
* @desc Deletes the specified externalVpnGateway.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.delete({
+ * // Name of the externalVpnGateways to delete.
+ * externalVpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.delete
* @memberOf! ()
*
@@ -20872,6 +25379,62 @@ export namespace compute_alpha {
/**
* compute.externalVpnGateways.get
* @desc Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.get({
+ * // Name of the externalVpnGateway to return.
+ * externalVpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "redundancyType": "my_redundancyType",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.get
* @memberOf! ()
*
@@ -20947,6 +25510,96 @@ export namespace compute_alpha {
/**
* compute.externalVpnGateways.insert
* @desc Creates a ExternalVpnGateway in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "redundancyType": "my_redundancyType",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.insert
* @memberOf! ()
*
@@ -21023,6 +25676,77 @@ export namespace compute_alpha {
/**
* compute.externalVpnGateways.list
* @desc Retrieves the list of ExternalVpnGateway available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.list
* @memberOf! ()
*
@@ -21104,6 +25828,84 @@ export namespace compute_alpha {
/**
* compute.externalVpnGateways.setLabels
* @desc Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.setLabels
* @memberOf! ()
*
@@ -21180,6 +25982,61 @@ export namespace compute_alpha {
/**
* compute.externalVpnGateways.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.testIamPermissions
* @memberOf! ()
*
@@ -21399,6 +26256,81 @@ export namespace compute_alpha {
/**
* compute.firewalls.delete
* @desc Deletes the specified firewall.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.delete({
+ * // Name of the firewall rule to delete.
+ * firewall: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.firewalls.delete
* @memberOf! ()
*
@@ -21474,6 +26406,73 @@ export namespace compute_alpha {
/**
* compute.firewalls.get
* @desc Returns the specified firewall.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.get({
+ * // Name of the firewall rule to return.
+ * firewall: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "allowed": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "denied": [],
+ * // "description": "my_description",
+ * // "destinationRanges": [],
+ * // "direction": "my_direction",
+ * // "disabled": false,
+ * // "enableLogging": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sourceRanges": [],
+ * // "sourceServiceAccounts": [],
+ * // "sourceTags": [],
+ * // "targetServiceAccounts": [],
+ * // "targetTags": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.firewalls.get
* @memberOf! ()
*
@@ -21546,6 +26545,107 @@ export namespace compute_alpha {
/**
* compute.firewalls.insert
* @desc Creates a firewall rule in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "allowed": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "denied": [],
+ * // "description": "my_description",
+ * // "destinationRanges": [],
+ * // "direction": "my_direction",
+ * // "disabled": false,
+ * // "enableLogging": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sourceRanges": [],
+ * // "sourceServiceAccounts": [],
+ * // "sourceTags": [],
+ * // "targetServiceAccounts": [],
+ * // "targetTags": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.firewalls.insert
* @memberOf! ()
*
@@ -21620,6 +26720,76 @@ export namespace compute_alpha {
/**
* compute.firewalls.list
* @desc Retrieves the list of firewall rules available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.firewalls.list
* @memberOf! ()
*
@@ -21697,6 +26867,109 @@ export namespace compute_alpha {
/**
* compute.firewalls.patch
* @desc Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.patch({
+ * // Name of the firewall rule to patch.
+ * firewall: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "allowed": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "denied": [],
+ * // "description": "my_description",
+ * // "destinationRanges": [],
+ * // "direction": "my_direction",
+ * // "disabled": false,
+ * // "enableLogging": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sourceRanges": [],
+ * // "sourceServiceAccounts": [],
+ * // "sourceTags": [],
+ * // "targetServiceAccounts": [],
+ * // "targetTags": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.firewalls.patch
* @memberOf! ()
*
@@ -21773,6 +27046,61 @@ export namespace compute_alpha {
/**
* compute.firewalls.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.firewalls.testIamPermissions
* @memberOf! ()
*
@@ -21853,6 +27181,109 @@ export namespace compute_alpha {
/**
* compute.firewalls.update
* @desc Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.update({
+ * // Name of the firewall rule to update.
+ * firewall: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "allowed": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "denied": [],
+ * // "description": "my_description",
+ * // "destinationRanges": [],
+ * // "direction": "my_direction",
+ * // "disabled": false,
+ * // "enableLogging": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sourceRanges": [],
+ * // "sourceServiceAccounts": [],
+ * // "sourceTags": [],
+ * // "targetServiceAccounts": [],
+ * // "targetTags": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.firewalls.update
* @memberOf! ()
*
@@ -22091,6 +27522,79 @@ export namespace compute_alpha {
/**
* compute.forwardingRules.aggregatedList
* @desc Retrieves an aggregated list of forwarding rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.forwardingRules.aggregatedList
* @memberOf! ()
*
@@ -22180,6 +27684,83 @@ export namespace compute_alpha {
/**
* compute.forwardingRules.delete
* @desc Deletes the specified ForwardingRule resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.delete({
+ * // Name of the ForwardingRule resource to delete.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.forwardingRules.delete
* @memberOf! ()
*
@@ -22257,6 +27838,82 @@ export namespace compute_alpha {
/**
* compute.forwardingRules.get
* @desc Returns the specified ForwardingRule resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.get({
+ * // Name of the ForwardingRule resource to return.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.forwardingRules.get
* @memberOf! ()
*
@@ -22333,6 +27990,116 @@ export namespace compute_alpha {
/**
* compute.forwardingRules.insert
* @desc Creates a ForwardingRule resource in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.forwardingRules.insert
* @memberOf! ()
*
@@ -22410,6 +28177,78 @@ export namespace compute_alpha {
/**
* compute.forwardingRules.list
* @desc Retrieves a list of ForwardingRule resources available to the specified project and region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.forwardingRules.list
* @memberOf! ()
*
@@ -22490,6 +28329,118 @@ export namespace compute_alpha {
/**
* compute.forwardingRules.patch
* @desc Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.patch({
+ * // Name of the ForwardingRule resource to patch.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.forwardingRules.patch
* @memberOf! ()
*
@@ -22568,6 +28519,92 @@ export namespace compute_alpha {
/**
* compute.forwardingRules.setLabels
* @desc Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.forwardingRules.setLabels
* @memberOf! ()
*
@@ -22646,6 +28683,91 @@ export namespace compute_alpha {
/**
* compute.forwardingRules.setTarget
* @desc Changes target URL for forwarding rule. The new target should be of the same type as the old target.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.setTarget({
+ * // Name of the ForwardingRule resource in which target is to be set.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "target": "my_target"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.forwardingRules.setTarget
* @memberOf! ()
*
@@ -22724,6 +28846,63 @@ export namespace compute_alpha {
/**
* compute.forwardingRules.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.forwardingRules.testIamPermissions
* @memberOf! ()
*
@@ -23066,6 +29245,81 @@ export namespace compute_alpha {
/**
* compute.globalAddresses.delete
* @desc Deletes the specified address resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalAddresses.delete({
+ * // Name of the address resource to delete.
+ * address: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalAddresses.delete
* @memberOf! ()
*
@@ -23142,6 +29396,72 @@ export namespace compute_alpha {
/**
* compute.globalAddresses.get
* @desc Returns the specified address resource. Gets a list of available addresses by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalAddresses.get({
+ * // Name of the address resource to return.
+ * address: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": "my_address",
+ * // "addressType": "my_addressType",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "prefixLength": 0,
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status",
+ * // "subnetwork": "my_subnetwork",
+ * // "users": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalAddresses.get
* @memberOf! ()
*
@@ -23215,6 +29535,106 @@ export namespace compute_alpha {
/**
* compute.globalAddresses.insert
* @desc Creates an address resource in the specified project by using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalAddresses.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": "my_address",
+ * // "addressType": "my_addressType",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "prefixLength": 0,
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status",
+ * // "subnetwork": "my_subnetwork",
+ * // "users": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalAddresses.insert
* @memberOf! ()
*
@@ -23290,6 +29710,76 @@ export namespace compute_alpha {
/**
* compute.globalAddresses.list
* @desc Retrieves a list of global addresses.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalAddresses.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalAddresses.list
* @memberOf! ()
*
@@ -23368,6 +29858,84 @@ export namespace compute_alpha {
/**
* compute.globalAddresses.setLabels
* @desc Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalAddresses.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalAddresses.setLabels
* @memberOf! ()
*
@@ -23444,6 +30012,61 @@ export namespace compute_alpha {
/**
* compute.globalAddresses.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalAddresses.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalAddresses.testIamPermissions
* @memberOf! ()
*
@@ -23663,6 +30286,81 @@ export namespace compute_alpha {
/**
* compute.globalForwardingRules.delete
* @desc Deletes the specified GlobalForwardingRule resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.delete({
+ * // Name of the ForwardingRule resource to delete.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalForwardingRules.delete
* @memberOf! ()
*
@@ -23739,6 +30437,80 @@ export namespace compute_alpha {
/**
* compute.globalForwardingRules.get
* @desc Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.get({
+ * // Name of the ForwardingRule resource to return.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalForwardingRules.get
* @memberOf! ()
*
@@ -23814,6 +30586,114 @@ export namespace compute_alpha {
/**
* compute.globalForwardingRules.insert
* @desc Creates a GlobalForwardingRule resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalForwardingRules.insert
* @memberOf! ()
*
@@ -23890,6 +30770,76 @@ export namespace compute_alpha {
/**
* compute.globalForwardingRules.list
* @desc Retrieves a list of GlobalForwardingRule resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalForwardingRules.list
* @memberOf! ()
*
@@ -23969,6 +30919,116 @@ export namespace compute_alpha {
/**
* compute.globalForwardingRules.patch
* @desc Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.patch({
+ * // Name of the ForwardingRule resource to patch.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalForwardingRules.patch
* @memberOf! ()
*
@@ -24046,6 +31106,84 @@ export namespace compute_alpha {
/**
* compute.globalForwardingRules.setLabels
* @desc Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalForwardingRules.setLabels
* @memberOf! ()
*
@@ -24122,6 +31260,89 @@ export namespace compute_alpha {
/**
* compute.globalForwardingRules.setTarget
* @desc Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.setTarget({
+ * // Name of the ForwardingRule resource in which target is to be set.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "target": "my_target"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalForwardingRules.setTarget
* @memberOf! ()
*
@@ -24199,6 +31420,61 @@ export namespace compute_alpha {
/**
* compute.globalForwardingRules.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalForwardingRules.testIamPermissions
* @memberOf! ()
*
@@ -24468,6 +31744,89 @@ export namespace compute_alpha {
/**
* compute.globalNetworkEndpointGroups.attachNetworkEndpoints
* @desc Attach a network endpoint to the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.attachNetworkEndpoints({
+ * // The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkEndpoints": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.attachNetworkEndpoints
* @memberOf! ()
*
@@ -24547,6 +31906,81 @@ export namespace compute_alpha {
/**
* compute.globalNetworkEndpointGroups.delete
* @desc Deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are backend services referencing it.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.delete({
+ * // The name of the network endpoint group to delete. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.delete
* @memberOf! ()
*
@@ -24623,6 +32057,89 @@ export namespace compute_alpha {
/**
* compute.globalNetworkEndpointGroups.detachNetworkEndpoints
* @desc Detach the network endpoint from the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.detachNetworkEndpoints({
+ * // The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkEndpoints": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.detachNetworkEndpoints
* @memberOf! ()
*
@@ -24702,6 +32219,72 @@ export namespace compute_alpha {
/**
* compute.globalNetworkEndpointGroups.get
* @desc Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.get({
+ * // The name of the network endpoint group. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "annotations": {},
+ * // "appEngine": {},
+ * // "cloudFunction": {},
+ * // "cloudRun": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultPort": 0,
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancer": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkEndpointType": "my_networkEndpointType",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "type": "my_type",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.get
* @memberOf! ()
*
@@ -24779,6 +32362,106 @@ export namespace compute_alpha {
/**
* compute.globalNetworkEndpointGroups.insert
* @desc Creates a network endpoint group in the specified project using the parameters that are included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "annotations": {},
+ * // "appEngine": {},
+ * // "cloudFunction": {},
+ * // "cloudRun": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultPort": 0,
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancer": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkEndpointType": "my_networkEndpointType",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "type": "my_type",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.insert
* @memberOf! ()
*
@@ -24855,6 +32538,76 @@ export namespace compute_alpha {
/**
* compute.globalNetworkEndpointGroups.list
* @desc Retrieves the list of network endpoint groups that are located in the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.list
* @memberOf! ()
*
@@ -24936,6 +32689,77 @@ export namespace compute_alpha {
/**
* compute.globalNetworkEndpointGroups.listNetworkEndpoints
* @desc Lists the network endpoints in the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.listNetworkEndpoints({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.listNetworkEndpoints
* @memberOf! ()
*
@@ -25222,6 +33046,79 @@ export namespace compute_alpha {
/**
* compute.globalOperations.aggregatedList
* @desc Retrieves an aggregated list of all operations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOperations.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalOperations.aggregatedList
* @memberOf! ()
*
@@ -25306,6 +33203,47 @@ export namespace compute_alpha {
/**
* compute.globalOperations.delete
* @desc Deletes the specified Operations resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOperations.delete({
+ * // Name of the Operations resource to delete.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalOperations.delete
* @memberOf! ()
*
@@ -25379,6 +33317,76 @@ export namespace compute_alpha {
/**
* compute.globalOperations.get
* @desc Retrieves the specified Operations resource. Gets a list of operations by making a `list()` request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOperations.get({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalOperations.get
* @memberOf! ()
*
@@ -25454,6 +33462,76 @@ export namespace compute_alpha {
/**
* compute.globalOperations.list
* @desc Retrieves a list of Operation resources contained within the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOperations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalOperations.list
* @memberOf! ()
*
@@ -25532,6 +33610,76 @@ export namespace compute_alpha {
/**
* compute.globalOperations.wait
* @desc Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be `DONE` or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not `DONE`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOperations.wait({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalOperations.wait
* @memberOf! ()
*
@@ -25731,6 +33879,46 @@ export namespace compute_alpha {
/**
* compute.globalOrganizationOperations.delete
* @desc Deletes the specified Operations resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOrganizationOperations.delete({
+ * // Name of the Operations resource to delete.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Parent ID for this request.
+ * parentId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalOrganizationOperations.delete
* @memberOf! ()
*
@@ -25804,6 +33992,75 @@ export namespace compute_alpha {
/**
* compute.globalOrganizationOperations.get
* @desc Retrieves the specified Operations resource. Gets a list of operations by making a `list()` request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOrganizationOperations.get({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Parent ID for this request.
+ * parentId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalOrganizationOperations.get
* @memberOf! ()
*
@@ -25879,6 +34136,75 @@ export namespace compute_alpha {
/**
* compute.globalOrganizationOperations.list
* @desc Retrieves a list of Operation resources contained within the specified organization.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOrganizationOperations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Parent ID for this request.
+ * parentId: 'placeholder-value',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalOrganizationOperations.list
* @memberOf! ()
*
@@ -26029,6 +34355,81 @@ export namespace compute_alpha {
/**
* compute.globalPublicDelegatedPrefixes.delete
* @desc Deletes the specified global PublicDelegatedPrefix.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalPublicDelegatedPrefixes.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the PublicDelegatedPrefix resource to delete.
+ * publicDelegatedPrefix: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalPublicDelegatedPrefixes.delete
* @memberOf! ()
*
@@ -26105,6 +34506,65 @@ export namespace compute_alpha {
/**
* compute.globalPublicDelegatedPrefixes.get
* @desc Returns the specified global PublicDelegatedPrefix resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalPublicDelegatedPrefixes.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the PublicDelegatedPrefix resource to return.
+ * publicDelegatedPrefix: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentPrefix": "my_parentPrefix",
+ * // "publicDelegatedSubPrefixs": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalPublicDelegatedPrefixes.get
* @memberOf! ()
*
@@ -26182,6 +34642,99 @@ export namespace compute_alpha {
/**
* compute.globalPublicDelegatedPrefixes.insert
* @desc Creates a global PublicDelegatedPrefix in the specified project using the parameters that are included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalPublicDelegatedPrefixes.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentPrefix": "my_parentPrefix",
+ * // "publicDelegatedSubPrefixs": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalPublicDelegatedPrefixes.insert
* @memberOf! ()
*
@@ -26258,6 +34811,76 @@ export namespace compute_alpha {
/**
* compute.globalPublicDelegatedPrefixes.list
* @desc Lists the global PublicDelegatedPrefixes for a project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalPublicDelegatedPrefixes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalPublicDelegatedPrefixes.list
* @memberOf! ()
*
@@ -26344,6 +34967,101 @@ export namespace compute_alpha {
/**
* compute.globalPublicDelegatedPrefixes.patch
* @desc Patches the specified global PublicDelegatedPrefix resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalPublicDelegatedPrefixes.patch({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the PublicDelegatedPrefix resource to patch.
+ * publicDelegatedPrefix: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentPrefix": "my_parentPrefix",
+ * // "publicDelegatedSubPrefixs": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalPublicDelegatedPrefixes.patch
* @memberOf! ()
*
@@ -26543,6 +35261,79 @@ export namespace compute_alpha {
/**
* compute.healthChecks.aggregatedList
* @desc Retrieves the list of all HealthCheck resources, regional and global, available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Name of the project scoping this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.healthChecks.aggregatedList
* @memberOf! ()
*
@@ -26630,6 +35421,81 @@ export namespace compute_alpha {
/**
* compute.healthChecks.delete
* @desc Deletes the specified HealthCheck resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.delete({
+ * // Name of the HealthCheck resource to delete.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.healthChecks.delete
* @memberOf! ()
*
@@ -26706,6 +35572,73 @@ export namespace compute_alpha {
/**
* compute.healthChecks.get
* @desc Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.get({
+ * // Name of the HealthCheck resource to return.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "grpcHealthCheck": {},
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "udpHealthCheck": {},
+ * // "unhealthyThreshold": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.healthChecks.get
* @memberOf! ()
*
@@ -26780,6 +35713,107 @@ export namespace compute_alpha {
/**
* compute.healthChecks.insert
* @desc Creates a HealthCheck resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "grpcHealthCheck": {},
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "udpHealthCheck": {},
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.healthChecks.insert
* @memberOf! ()
*
@@ -26855,6 +35889,76 @@ export namespace compute_alpha {
/**
* compute.healthChecks.list
* @desc Retrieves the list of HealthCheck resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.healthChecks.list
* @memberOf! ()
*
@@ -26933,6 +36037,109 @@ export namespace compute_alpha {
/**
* compute.healthChecks.patch
* @desc Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.patch({
+ * // Name of the HealthCheck resource to patch.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "grpcHealthCheck": {},
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "udpHealthCheck": {},
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.healthChecks.patch
* @memberOf! ()
*
@@ -27010,6 +36217,61 @@ export namespace compute_alpha {
/**
* compute.healthChecks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.healthChecks.testIamPermissions
* @memberOf! ()
*
@@ -27090,6 +36352,109 @@ export namespace compute_alpha {
/**
* compute.healthChecks.update
* @desc Updates a HealthCheck resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.update({
+ * // Name of the HealthCheck resource to update.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "grpcHealthCheck": {},
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "udpHealthCheck": {},
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.healthChecks.update
* @memberOf! ()
*
@@ -27370,6 +36735,81 @@ export namespace compute_alpha {
/**
* compute.httpHealthChecks.delete
* @desc Deletes the specified HttpHealthCheck resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.delete({
+ * // Name of the HttpHealthCheck resource to delete.
+ * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.httpHealthChecks.delete
* @memberOf! ()
*
@@ -27446,6 +36886,66 @@ export namespace compute_alpha {
/**
* compute.httpHealthChecks.get
* @desc Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.get({
+ * // Name of the HttpHealthCheck resource to return.
+ * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.httpHealthChecks.get
* @memberOf! ()
*
@@ -27521,6 +37021,100 @@ export namespace compute_alpha {
/**
* compute.httpHealthChecks.insert
* @desc Creates a HttpHealthCheck resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.httpHealthChecks.insert
* @memberOf! ()
*
@@ -27597,6 +37191,76 @@ export namespace compute_alpha {
/**
* compute.httpHealthChecks.list
* @desc Retrieves the list of HttpHealthCheck resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.httpHealthChecks.list
* @memberOf! ()
*
@@ -27676,6 +37340,102 @@ export namespace compute_alpha {
/**
* compute.httpHealthChecks.patch
* @desc Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.patch({
+ * // Name of the HttpHealthCheck resource to patch.
+ * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.httpHealthChecks.patch
* @memberOf! ()
*
@@ -27753,6 +37513,61 @@ export namespace compute_alpha {
/**
* compute.httpHealthChecks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.httpHealthChecks.testIamPermissions
* @memberOf! ()
*
@@ -27833,6 +37648,102 @@ export namespace compute_alpha {
/**
* compute.httpHealthChecks.update
* @desc Updates a HttpHealthCheck resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.update({
+ * // Name of the HttpHealthCheck resource to update.
+ * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.httpHealthChecks.update
* @memberOf! ()
*
@@ -28078,6 +37989,81 @@ export namespace compute_alpha {
/**
* compute.httpsHealthChecks.delete
* @desc Deletes the specified HttpsHealthCheck resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.delete({
+ * // Name of the HttpsHealthCheck resource to delete.
+ * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.httpsHealthChecks.delete
* @memberOf! ()
*
@@ -28154,6 +38140,66 @@ export namespace compute_alpha {
/**
* compute.httpsHealthChecks.get
* @desc Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.get({
+ * // Name of the HttpsHealthCheck resource to return.
+ * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.httpsHealthChecks.get
* @memberOf! ()
*
@@ -28229,6 +38275,100 @@ export namespace compute_alpha {
/**
* compute.httpsHealthChecks.insert
* @desc Creates a HttpsHealthCheck resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.httpsHealthChecks.insert
* @memberOf! ()
*
@@ -28305,6 +38445,76 @@ export namespace compute_alpha {
/**
* compute.httpsHealthChecks.list
* @desc Retrieves the list of HttpsHealthCheck resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.httpsHealthChecks.list
* @memberOf! ()
*
@@ -28386,6 +38596,102 @@ export namespace compute_alpha {
/**
* compute.httpsHealthChecks.patch
* @desc Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.patch({
+ * // Name of the HttpsHealthCheck resource to patch.
+ * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.httpsHealthChecks.patch
* @memberOf! ()
*
@@ -28463,6 +38769,61 @@ export namespace compute_alpha {
/**
* compute.httpsHealthChecks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.httpsHealthChecks.testIamPermissions
* @memberOf! ()
*
@@ -28543,6 +38904,102 @@ export namespace compute_alpha {
/**
* compute.httpsHealthChecks.update
* @desc Updates a HttpsHealthCheck resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.update({
+ * // Name of the HttpsHealthCheck resource to update.
+ * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.httpsHealthChecks.update
* @memberOf! ()
*
@@ -28788,6 +39245,81 @@ export namespace compute_alpha {
/**
* compute.images.delete
* @desc Deletes the specified image.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.delete({
+ * // Name of the image resource to delete.
+ * image: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.images.delete
* @memberOf! ()
*
@@ -28863,6 +39395,93 @@ export namespace compute_alpha {
/**
* compute.images.deprecate
* @desc Sets the deprecation status of an image. If an empty request body is given, clears the deprecation status instead.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.deprecate({
+ * // Image name.
+ * image: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deleted": "my_deleted",
+ * // "deprecated": "my_deprecated",
+ * // "obsolete": "my_obsolete",
+ * // "replacement": "my_replacement",
+ * // "state": "my_state"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.images.deprecate
* @memberOf! ()
*
@@ -28939,6 +39558,83 @@ export namespace compute_alpha {
/**
* compute.images.get
* @desc Returns the specified image. Gets a list of available images by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.get({
+ * // Name of the image resource to return.
+ * image: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "archiveSizeBytes": "my_archiveSizeBytes",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "family": "my_family",
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "imageEncryptionKey": {},
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "rawDisk": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "shieldedInstanceInitialState": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "sourceType": "my_sourceType",
+ * // "status": "my_status",
+ * // "storageLocations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.images.get
* @memberOf! ()
*
@@ -29011,6 +39707,83 @@ export namespace compute_alpha {
/**
* compute.images.getFromFamily
* @desc Returns the latest image that is part of an image family and is not deprecated.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.getFromFamily({
+ * // Name of the image family to search for.
+ * family: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "archiveSizeBytes": "my_archiveSizeBytes",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "family": "my_family",
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "imageEncryptionKey": {},
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "rawDisk": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "shieldedInstanceInitialState": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "sourceType": "my_sourceType",
+ * // "status": "my_status",
+ * // "storageLocations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.images.getFromFamily
* @memberOf! ()
*
@@ -29084,6 +39857,60 @@ export namespace compute_alpha {
/**
* compute.images.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.images.getIamPolicy
* @memberOf! ()
*
@@ -29158,6 +39985,122 @@ export namespace compute_alpha {
/**
* compute.images.insert
* @desc Creates an image in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/devstorage.full_control',
+ * 'https://www.googleapis.com/auth/devstorage.read_only',
+ * 'https://www.googleapis.com/auth/devstorage.read_write',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.insert({
+ * // Force image creation if true.
+ * forceCreate: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "archiveSizeBytes": "my_archiveSizeBytes",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "family": "my_family",
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "imageEncryptionKey": {},
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "rawDisk": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "shieldedInstanceInitialState": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "sourceType": "my_sourceType",
+ * // "status": "my_status",
+ * // "storageLocations": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.images.insert
* @memberOf! ()
*
@@ -29233,6 +40176,76 @@ export namespace compute_alpha {
/**
* compute.images.list
* @desc Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.images.list
* @memberOf! ()
*
@@ -29310,6 +40323,119 @@ export namespace compute_alpha {
/**
* compute.images.patch
* @desc Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.patch({
+ * // Name of the image resource to patch.
+ * image: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "archiveSizeBytes": "my_archiveSizeBytes",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "family": "my_family",
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "imageEncryptionKey": {},
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "rawDisk": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "shieldedInstanceInitialState": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "sourceType": "my_sourceType",
+ * // "status": "my_status",
+ * // "storageLocations": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.images.patch
* @memberOf! ()
*
@@ -29386,6 +40512,67 @@ export namespace compute_alpha {
/**
* compute.images.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.images.setIamPolicy
* @memberOf! ()
*
@@ -29460,6 +40647,84 @@ export namespace compute_alpha {
/**
* compute.images.setLabels
* @desc Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.images.setLabels
* @memberOf! ()
*
@@ -29535,6 +40800,61 @@ export namespace compute_alpha {
/**
* compute.images.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.images.testIamPermissions
* @memberOf! ()
*
@@ -29858,6 +41178,91 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.abandonInstances
* @desc Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.abandonInstances({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.abandonInstances
* @memberOf! ()
*
@@ -29936,6 +41341,79 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.aggregatedList
* @desc Retrieves the list of managed instance groups and groups them by zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.aggregatedList
* @memberOf! ()
*
@@ -30025,6 +41503,88 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.applyUpdatesToInstances
* @desc Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.applyUpdatesToInstances({
+ * // The name of the managed instance group, should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the managed instance group is located. Should conform to RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": [],
+ * // "maximalAction": "my_maximalAction",
+ * // "minimalAction": "my_minimalAction",
+ * // "mostDisruptiveAllowedAction": "my_mostDisruptiveAllowedAction"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.applyUpdatesToInstances
* @memberOf! ()
*
@@ -30104,6 +41664,91 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.createInstances
* @desc Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.createInstances({
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located. It should conform to RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.createInstances
* @memberOf! ()
*
@@ -30182,6 +41827,83 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.delete
* @desc Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.delete({
+ * // The name of the managed instance group to delete.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.delete
* @memberOf! ()
*
@@ -30259,6 +41981,91 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.deleteInstances
* @desc Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.deleteInstances({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.deleteInstances
* @memberOf! ()
*
@@ -30337,6 +42144,85 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.deletePerInstanceConfigs
* @desc Deletes selected per-instance configs for the managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.deletePerInstanceConfigs({
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the managed instance group is located. It should conform to RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "names": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.deletePerInstanceConfigs
* @memberOf! ()
*
@@ -30416,6 +42302,80 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.get
* @desc Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.get({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the managed instance group is located.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "failoverAction": "my_failoverAction",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "pendingActions": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "statefulPolicy": {},
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.get
* @memberOf! ()
*
@@ -30494,6 +42454,114 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.insert
* @desc Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where you want to create the managed instance group.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "failoverAction": "my_failoverAction",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "pendingActions": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "statefulPolicy": {},
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.insert
* @memberOf! ()
*
@@ -30571,6 +42639,78 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.list
* @desc Retrieves a list of managed instance groups that are contained within the specified project and zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.list
* @memberOf! ()
*
@@ -30653,6 +42793,76 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.listErrors
* @desc Lists all errors thrown by actions on instances for a given managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.listErrors({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}.
+ * instanceGroupManager: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located. It should conform to RFC1035.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.listErrors
* @memberOf! ()
*
@@ -30751,6 +42961,74 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.listManagedInstances
* @desc Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.listManagedInstances({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the managed instance group is located.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "managedInstances": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.listManagedInstances
* @memberOf! ()
*
@@ -30855,6 +43133,77 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.listPerInstanceConfigs
* @desc Lists all of the per-instance configs defined for the managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.listPerInstanceConfigs({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located. It should conform to RFC1035.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.listPerInstanceConfigs
* @memberOf! ()
*
@@ -30960,6 +43309,116 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.patch
* @desc Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.patch({
+ * // The name of the instance group manager.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where you want to create the managed instance group.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "failoverAction": "my_failoverAction",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "pendingActions": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "statefulPolicy": {},
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.patch
* @memberOf! ()
*
@@ -31038,6 +43497,91 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.patchPerInstanceConfigs
* @desc Inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.patchPerInstanceConfigs({
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located. It should conform to RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "perInstanceConfigs": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.patchPerInstanceConfigs
* @memberOf! ()
*
@@ -31118,6 +43662,91 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.recreateInstances
* @desc Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.recreateInstances({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.recreateInstances
* @memberOf! ()
*
@@ -31196,6 +43825,85 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.resize
* @desc Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including: + The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance. This list is subject to change. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.resize({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.
+ * size: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.resize
* @memberOf! ()
*
@@ -31274,6 +43982,92 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.resizeAdvanced
* @desc Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method. If you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.resizeAdvanced({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "noCreationRetries": false,
+ * // "targetSize": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.resizeAdvanced
* @memberOf! ()
*
@@ -31352,6 +44146,91 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.setAutoHealingPolicies
* @desc Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.setAutoHealingPolicies({
+ * // The name of the instance group manager.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.setAutoHealingPolicies
* @memberOf! ()
*
@@ -31432,6 +44311,91 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.setInstanceTemplate
* @desc Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.setInstanceTemplate({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instanceTemplate": "my_instanceTemplate"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.setInstanceTemplate
* @memberOf! ()
*
@@ -31510,6 +44474,92 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.setTargetPools
* @desc Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.setTargetPools({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "targetPools": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.setTargetPools
* @memberOf! ()
*
@@ -31588,6 +44638,63 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.testIamPermissions
* @memberOf! ()
*
@@ -31669,6 +44776,116 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.update
* @desc Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.update({
+ * // The name of the instance group manager.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where you want to create the managed instance group.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "failoverAction": "my_failoverAction",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "pendingActions": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "statefulPolicy": {},
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.update
* @memberOf! ()
*
@@ -31747,6 +44964,91 @@ export namespace compute_alpha {
/**
* compute.instanceGroupManagers.updatePerInstanceConfigs
* @desc Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.updatePerInstanceConfigs({
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located. It should conform to RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "perInstanceConfigs": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.updatePerInstanceConfigs
* @memberOf! ()
*
@@ -32543,6 +45845,91 @@ export namespace compute_alpha {
/**
* compute.instanceGroups.addInstances
* @desc Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.addInstances({
+ * // The name of the instance group where you are adding instances.
+ * instanceGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the instance group is located.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroups.addInstances
* @memberOf! ()
*
@@ -32621,6 +46008,79 @@ export namespace compute_alpha {
/**
* compute.instanceGroups.aggregatedList
* @desc Retrieves the list of instance groups and sorts them by zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroups.aggregatedList
* @memberOf! ()
*
@@ -32708,6 +46168,83 @@ export namespace compute_alpha {
/**
* compute.instanceGroups.delete
* @desc Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.delete({
+ * // The name of the instance group to delete.
+ * instanceGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the instance group is located.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroups.delete
* @memberOf! ()
*
@@ -32785,6 +46322,68 @@ export namespace compute_alpha {
/**
* compute.instanceGroups.get
* @desc Returns the specified instance group. Gets a list of available instance groups by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.get({
+ * // The name of the instance group.
+ * instanceGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the instance group is located.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroups.get
* @memberOf! ()
*
@@ -32861,6 +46460,102 @@ export namespace compute_alpha {
/**
* compute.instanceGroups.insert
* @desc Creates an instance group in the specified project using the parameters that are included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where you want to create the instance group.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroups.insert
* @memberOf! ()
*
@@ -32938,6 +46633,78 @@ export namespace compute_alpha {
/**
* compute.instanceGroups.list
* @desc Retrieves the list of instance groups that are located in the specified project and zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // The name of the zone where the instance group is located.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroups.list
* @memberOf! ()
*
@@ -33018,6 +46785,88 @@ export namespace compute_alpha {
/**
* compute.instanceGroups.listInstances
* @desc Lists the instances in the specified instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.listInstances({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the instance group from which you want to generate a list of included instances.
+ * instanceGroup: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // The name of the zone where the instance group is located.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instanceState": "my_instanceState"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroups.listInstances
* @memberOf! ()
*
@@ -33107,6 +46956,91 @@ export namespace compute_alpha {
/**
* compute.instanceGroups.removeInstances
* @desc Removes one or more instances from the specified instance group, but does not delete those instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.removeInstances({
+ * // The name of the instance group where the specified instances will be removed.
+ * instanceGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the instance group is located.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroups.removeInstances
* @memberOf! ()
*
@@ -33185,6 +47119,92 @@ export namespace compute_alpha {
/**
* compute.instanceGroups.setNamedPorts
* @desc Sets the named ports for the specified instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.setNamedPorts({
+ * // The name of the instance group where the named ports are updated.
+ * instanceGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the instance group is located.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "namedPorts": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroups.setNamedPorts
* @memberOf! ()
*
@@ -33263,6 +47283,63 @@ export namespace compute_alpha {
/**
* compute.instanceGroups.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroups.testIamPermissions
* @memberOf! ()
*
@@ -33650,6 +47727,101 @@ export namespace compute_alpha {
/**
* compute.instances.addAccessConfig
* @desc Adds an access config to an instance's network interface.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.addAccessConfig({
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the network interface to add to this instance.
+ * networkInterface: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "natIP": "my_natIP",
+ * // "networkTier": "my_networkTier",
+ * // "publicDnsName": "my_publicDnsName",
+ * // "publicPtrDomainName": "my_publicPtrDomainName",
+ * // "setPublicDns": false,
+ * // "setPublicPtr": false,
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.addAccessConfig
* @memberOf! ()
*
@@ -33729,6 +47901,91 @@ export namespace compute_alpha {
/**
* compute.instances.addResourcePolicies
* @desc Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.addResourcePolicies({
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.addResourcePolicies
* @memberOf! ()
*
@@ -33807,6 +48064,79 @@ export namespace compute_alpha {
/**
* compute.instances.aggregatedList
* @desc Retrieves aggregated list of all of the instances in your project across all regions and zones.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.aggregatedList
* @memberOf! ()
*
@@ -33890,6 +48220,108 @@ export namespace compute_alpha {
/**
* compute.instances.attachDisk
* @desc Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.attachDisk({
+ * // Whether to force attach the disk even if it's currently attached to another instance.
+ * forceAttach: 'placeholder-value',
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoDelete": false,
+ * // "boot": false,
+ * // "deviceName": "my_deviceName",
+ * // "diskEncryptionKey": {},
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "guestOsFeatures": [],
+ * // "index": 0,
+ * // "initializeParams": {},
+ * // "interface": "my_interface",
+ * // "kind": "my_kind",
+ * // "licenses": [],
+ * // "mode": "my_mode",
+ * // "savedState": "my_savedState",
+ * // "shieldedInstanceInitialState": {},
+ * // "source": "my_source",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.attachDisk
* @memberOf! ()
*
@@ -33969,6 +48401,94 @@ export namespace compute_alpha {
/**
* compute.instances.bulkInsert
* @desc Creates multiple instances. Count specifies the number of instances to create.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.bulkInsert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "count": "my_count",
+ * // "excludedZones": [],
+ * // "instance": {},
+ * // "minCount": "my_minCount",
+ * // "predefinedNames": [],
+ * // "sourceInstanceTemplate": "my_sourceInstanceTemplate"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.bulkInsert
* @memberOf! ()
*
@@ -34046,6 +48566,83 @@ export namespace compute_alpha {
/**
* compute.instances.delete
* @desc Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.delete({
+ * // Name of the instance resource to delete.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.delete
* @memberOf! ()
*
@@ -34122,6 +48719,87 @@ export namespace compute_alpha {
/**
* compute.instances.deleteAccessConfig
* @desc Deletes an access config from an instance's network interface.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.deleteAccessConfig({
+ * // The name of the access config to delete.
+ * accessConfig: 'placeholder-value',
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the network interface.
+ * networkInterface: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.deleteAccessConfig
* @memberOf! ()
*
@@ -34207,6 +48885,85 @@ export namespace compute_alpha {
/**
* compute.instances.detachDisk
* @desc Detaches a disk from an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.detachDisk({
+ * // The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.
+ * deviceName: 'placeholder-value',
+ * // Instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.detachDisk
* @memberOf! ()
*
@@ -34285,6 +49042,97 @@ export namespace compute_alpha {
/**
* compute.instances.get
* @desc Returns the specified Instance resource. Gets a list of available instances by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.get({
+ * // Name of the instance resource to return.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "canIpForward": false,
+ * // "confidentialInstanceConfig": {},
+ * // "cpuPlatform": "my_cpuPlatform",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deletionProtection": false,
+ * // "description": "my_description",
+ * // "disks": [],
+ * // "displayDevice": {},
+ * // "eraseWindowsVssSignature": false,
+ * // "fingerprint": "my_fingerprint",
+ * // "guestAccelerators": [],
+ * // "hostname": "my_hostname",
+ * // "id": "my_id",
+ * // "instanceEncryptionKey": {},
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "machineType": "my_machineType",
+ * // "metadata": {},
+ * // "minCpuPlatform": "my_minCpuPlatform",
+ * // "name": "my_name",
+ * // "networkInterfaces": [],
+ * // "postKeyRevocationActionType": "my_postKeyRevocationActionType",
+ * // "preservedStateSizeGb": "my_preservedStateSizeGb",
+ * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess",
+ * // "reservationAffinity": {},
+ * // "resourcePolicies": [],
+ * // "scheduling": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serviceAccounts": [],
+ * // "shieldedInstanceConfig": {},
+ * // "shieldedInstanceIntegrityPolicy": {},
+ * // "shieldedVmConfig": {},
+ * // "shieldedVmIntegrityPolicy": {},
+ * // "sourceMachineImage": "my_sourceMachineImage",
+ * // "sourceMachineImageEncryptionKey": {},
+ * // "startRestricted": false,
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "tags": {},
+ * // "upcomingMaintenance": {},
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.get
* @memberOf! ()
*
@@ -34358,6 +49206,58 @@ export namespace compute_alpha {
/**
* compute.instances.getEffectiveFirewalls
* @desc Returns effective firewalls applied to an interface of the instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getEffectiveFirewalls({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The name of the network interface to get the effective firewalls.
+ * networkInterface: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "firewalls": [],
+ * // "organizationFirewalls": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.getEffectiveFirewalls
* @memberOf! ()
*
@@ -34452,6 +49352,64 @@ export namespace compute_alpha {
/**
* compute.instances.getGuestAttributes
* @desc Returns the specified guest attributes entry.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getGuestAttributes({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Specifies the guest attributes path to be queried.
+ * queryPath: 'placeholder-value',
+ * // Specifies the key for the guest attributes entry.
+ * variableKey: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "queryPath": "my_queryPath",
+ * // "queryValue": {},
+ * // "selfLink": "my_selfLink",
+ * // "variableKey": "my_variableKey",
+ * // "variableValue": "my_variableValue"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.getGuestAttributes
* @memberOf! ()
*
@@ -34532,6 +49490,62 @@ export namespace compute_alpha {
/**
* compute.instances.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.getIamPolicy
* @memberOf! ()
*
@@ -34607,6 +49621,56 @@ export namespace compute_alpha {
/**
* compute.instances.getScreenshot
* @desc Returns the screenshot from the specified instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getScreenshot({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "contents": "my_contents",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.getScreenshot
* @memberOf! ()
*
@@ -34683,6 +49747,63 @@ export namespace compute_alpha {
/**
* compute.instances.getSerialPortOutput
* @desc Returns the last 1 MB of serial port output from the specified instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getSerialPortOutput({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Specifies which COM or serial port to retrieve data from.
+ * port: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.
+ * start: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "contents": "my_contents",
+ * // "kind": "my_kind",
+ * // "next": "my_next",
+ * // "selfLink": "my_selfLink",
+ * // "start": "my_start"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.getSerialPortOutput
* @memberOf! ()
*
@@ -34763,6 +49884,57 @@ export namespace compute_alpha {
/**
* compute.instances.getShieldedInstanceIdentity
* @desc Returns the Shielded Instance Identity of an instance
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getShieldedInstanceIdentity({
+ * // Name or id of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "encryptionKey": {},
+ * // "kind": "my_kind",
+ * // "signingKey": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.getShieldedInstanceIdentity
* @memberOf! ()
*
@@ -34843,6 +50015,57 @@ export namespace compute_alpha {
/**
* compute.instances.getShieldedVmIdentity
* @desc Returns the Shielded VM Identity of an instance
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getShieldedVmIdentity({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "encryptionKey": {},
+ * // "kind": "my_kind",
+ * // "signingKey": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.getShieldedVmIdentity
* @memberOf! ()
*
@@ -34921,6 +50144,145 @@ export namespace compute_alpha {
/**
* compute.instances.insert
* @desc Creates an instance resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Specifies instance template to create the instance.
+ * //
+ * // This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
+ * // - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
+ * // - projects/project/global/instanceTemplates/instanceTemplate
+ * // - global/instanceTemplates/instanceTemplate
+ * sourceInstanceTemplate: 'placeholder-value',
+ * // Specifies instance machine to create the instance.
+ * //
+ * // This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
+ * // - https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage
+ * // - projects/project/global/global/machineImages/machineImage
+ * // - global/machineImages/machineImage
+ * sourceMachineImage: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "canIpForward": false,
+ * // "confidentialInstanceConfig": {},
+ * // "cpuPlatform": "my_cpuPlatform",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deletionProtection": false,
+ * // "description": "my_description",
+ * // "disks": [],
+ * // "displayDevice": {},
+ * // "eraseWindowsVssSignature": false,
+ * // "fingerprint": "my_fingerprint",
+ * // "guestAccelerators": [],
+ * // "hostname": "my_hostname",
+ * // "id": "my_id",
+ * // "instanceEncryptionKey": {},
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "machineType": "my_machineType",
+ * // "metadata": {},
+ * // "minCpuPlatform": "my_minCpuPlatform",
+ * // "name": "my_name",
+ * // "networkInterfaces": [],
+ * // "postKeyRevocationActionType": "my_postKeyRevocationActionType",
+ * // "preservedStateSizeGb": "my_preservedStateSizeGb",
+ * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess",
+ * // "reservationAffinity": {},
+ * // "resourcePolicies": [],
+ * // "scheduling": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serviceAccounts": [],
+ * // "shieldedInstanceConfig": {},
+ * // "shieldedInstanceIntegrityPolicy": {},
+ * // "shieldedVmConfig": {},
+ * // "shieldedVmIntegrityPolicy": {},
+ * // "sourceMachineImage": "my_sourceMachineImage",
+ * // "sourceMachineImageEncryptionKey": {},
+ * // "startRestricted": false,
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "tags": {},
+ * // "upcomingMaintenance": {},
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.insert
* @memberOf! ()
*
@@ -34999,6 +50361,78 @@ export namespace compute_alpha {
/**
* compute.instances.list
* @desc Retrieves the list of instances contained within the specified zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.list
* @memberOf! ()
*
@@ -35078,6 +50512,80 @@ export namespace compute_alpha {
/**
* compute.instances.listReferrers
* @desc Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.listReferrers({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.
+ * instance: '-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.listReferrers
* @memberOf! ()
*
@@ -35163,6 +50671,91 @@ export namespace compute_alpha {
/**
* compute.instances.removeResourcePolicies
* @desc Removes resource policies from an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.removeResourcePolicies({
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.removeResourcePolicies
* @memberOf! ()
*
@@ -35243,6 +50836,83 @@ export namespace compute_alpha {
/**
* compute.instances.reset
* @desc Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.reset({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.reset
* @memberOf! ()
*
@@ -35319,6 +50989,92 @@ export namespace compute_alpha {
/**
* compute.instances.resume
* @desc Resumes an instance that was suspended using the instances().suspend method.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.resume({
+ * // Name of the instance resource to resume.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "disks": [],
+ * // "instanceEncryptionKey": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.resume
* @memberOf! ()
*
@@ -35396,6 +51152,85 @@ export namespace compute_alpha {
/**
* compute.instances.setDeletionProtection
* @desc Sets deletion protection on the instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setDeletionProtection({
+ * // Whether the resource should be protected against deletion.
+ * deletionProtection: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setDeletionProtection
* @memberOf! ()
*
@@ -35476,6 +51311,87 @@ export namespace compute_alpha {
/**
* compute.instances.setDiskAutoDelete
* @desc Sets the auto-delete flag for a disk attached to an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setDiskAutoDelete({
+ * // Whether to auto-delete the disk when the instance is deleted.
+ * autoDelete: 'placeholder-value',
+ * // The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.
+ * deviceName: 'w[w.-]{0,254}',
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setDiskAutoDelete
* @memberOf! ()
*
@@ -35561,6 +51477,69 @@ export namespace compute_alpha {
/**
* compute.instances.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setIamPolicy
* @memberOf! ()
*
@@ -35636,6 +51615,92 @@ export namespace compute_alpha {
/**
* compute.instances.setLabels
* @desc Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setLabels({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setLabels
* @memberOf! ()
*
@@ -35714,6 +51779,91 @@ export namespace compute_alpha {
/**
* compute.instances.setMachineResources
* @desc Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setMachineResources({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "guestAccelerators": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setMachineResources
* @memberOf! ()
*
@@ -35792,6 +51942,91 @@ export namespace compute_alpha {
/**
* compute.instances.setMachineType
* @desc Changes the machine type for a stopped instance to the machine type specified in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setMachineType({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "machineType": "my_machineType"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setMachineType
* @memberOf! ()
*
@@ -35870,6 +52105,93 @@ export namespace compute_alpha {
/**
* compute.instances.setMetadata
* @desc Sets metadata for the specified instance to the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setMetadata({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setMetadata
* @memberOf! ()
*
@@ -35948,6 +52270,91 @@ export namespace compute_alpha {
/**
* compute.instances.setMinCpuPlatform
* @desc Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setMinCpuPlatform({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "minCpuPlatform": "my_minCpuPlatform"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setMinCpuPlatform
* @memberOf! ()
*
@@ -36026,6 +52433,92 @@ export namespace compute_alpha {
/**
* compute.instances.setName
* @desc Sets name of an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setName({
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "currentName": "my_currentName",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setName
* @memberOf! ()
*
@@ -36104,6 +52597,98 @@ export namespace compute_alpha {
/**
* compute.instances.setScheduling
* @desc Sets an instance's scheduling options.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setScheduling({
+ * // Instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "automaticRestart": false,
+ * // "latencyTolerant": false,
+ * // "locationHint": "my_locationHint",
+ * // "longTermRelease": false,
+ * // "minNodeCpus": 0,
+ * // "nodeAffinities": [],
+ * // "onHostMaintenance": "my_onHostMaintenance",
+ * // "preemptible": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setScheduling
* @memberOf! ()
*
@@ -36182,6 +52767,92 @@ export namespace compute_alpha {
/**
* compute.instances.setServiceAccount
* @desc Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setServiceAccount({
+ * // Name of the instance resource to start.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "email": "my_email",
+ * // "scopes": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setServiceAccount
* @memberOf! ()
*
@@ -36260,6 +52931,91 @@ export namespace compute_alpha {
/**
* compute.instances.setShieldedInstanceIntegrityPolicy
* @desc Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setShieldedInstanceIntegrityPolicy({
+ * // Name or id of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "updateAutoLearnPolicy": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setShieldedInstanceIntegrityPolicy
* @memberOf! ()
*
@@ -36340,6 +53096,91 @@ export namespace compute_alpha {
/**
* compute.instances.setShieldedVmIntegrityPolicy
* @desc Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setShieldedVmIntegrityPolicy({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "updateAutoLearnPolicy": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setShieldedVmIntegrityPolicy
* @memberOf! ()
*
@@ -36420,6 +53261,92 @@ export namespace compute_alpha {
/**
* compute.instances.setTags
* @desc Sets network tags for the specified instance to the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setTags({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "items": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setTags
* @memberOf! ()
*
@@ -36498,6 +53425,77 @@ export namespace compute_alpha {
/**
* compute.instances.simulateMaintenanceEvent
* @desc Simulates a maintenance event on the instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.simulateMaintenanceEvent({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.simulateMaintenanceEvent
* @memberOf! ()
*
@@ -36576,6 +53574,83 @@ export namespace compute_alpha {
/**
* compute.instances.start
* @desc Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.start({
+ * // Name of the instance resource to start.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.start
* @memberOf! ()
*
@@ -36652,6 +53727,92 @@ export namespace compute_alpha {
/**
* compute.instances.startWithEncryptionKey
* @desc Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.startWithEncryptionKey({
+ * // Name of the instance resource to start.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "disks": [],
+ * // "instanceEncryptionKey": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.startWithEncryptionKey
* @memberOf! ()
*
@@ -36732,6 +53893,85 @@ export namespace compute_alpha {
/**
* compute.instances.stop
* @desc Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.stop({
+ * // If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).
+ * discardLocalSsd: 'placeholder-value',
+ * // Name of the instance resource to stop.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.stop
* @memberOf! ()
*
@@ -36809,6 +54049,85 @@ export namespace compute_alpha {
/**
* compute.instances.suspend
* @desc This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.suspend({
+ * // If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).
+ * discardLocalSsd: 'placeholder-value',
+ * // Name of the instance resource to suspend.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.suspend
* @memberOf! ()
*
@@ -36887,6 +54206,63 @@ export namespace compute_alpha {
/**
* compute.instances.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.testIamPermissions
* @memberOf! ()
*
@@ -36968,6 +54344,137 @@ export namespace compute_alpha {
/**
* compute.instances.update
* @desc Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.update({
+ * // Name of the instance resource to update.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Specifies the action to take when updating an instance even if the updated properties do not require it. If not specified, then Compute Engine acts based on the minimum action that the updated properties require.
+ * minimalAction: 'placeholder-value',
+ * // Specifies the most disruptive action that can be taken on the instance as part of the update. Compute Engine returns an error if the instance properties require a more disruptive action as part of the instance update. Valid options from lowest to highest are NO_EFFECT, REFRESH, and RESTART.
+ * mostDisruptiveAllowedAction: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "canIpForward": false,
+ * // "confidentialInstanceConfig": {},
+ * // "cpuPlatform": "my_cpuPlatform",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deletionProtection": false,
+ * // "description": "my_description",
+ * // "disks": [],
+ * // "displayDevice": {},
+ * // "eraseWindowsVssSignature": false,
+ * // "fingerprint": "my_fingerprint",
+ * // "guestAccelerators": [],
+ * // "hostname": "my_hostname",
+ * // "id": "my_id",
+ * // "instanceEncryptionKey": {},
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "machineType": "my_machineType",
+ * // "metadata": {},
+ * // "minCpuPlatform": "my_minCpuPlatform",
+ * // "name": "my_name",
+ * // "networkInterfaces": [],
+ * // "postKeyRevocationActionType": "my_postKeyRevocationActionType",
+ * // "preservedStateSizeGb": "my_preservedStateSizeGb",
+ * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess",
+ * // "reservationAffinity": {},
+ * // "resourcePolicies": [],
+ * // "scheduling": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serviceAccounts": [],
+ * // "shieldedInstanceConfig": {},
+ * // "shieldedInstanceIntegrityPolicy": {},
+ * // "shieldedVmConfig": {},
+ * // "shieldedVmIntegrityPolicy": {},
+ * // "sourceMachineImage": "my_sourceMachineImage",
+ * // "sourceMachineImageEncryptionKey": {},
+ * // "startRestricted": false,
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "tags": {},
+ * // "upcomingMaintenance": {},
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.update
* @memberOf! ()
*
@@ -37047,6 +54554,101 @@ export namespace compute_alpha {
/**
* compute.instances.updateAccessConfig
* @desc Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.updateAccessConfig({
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the network interface where the access config is attached.
+ * networkInterface: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "natIP": "my_natIP",
+ * // "networkTier": "my_networkTier",
+ * // "publicDnsName": "my_publicDnsName",
+ * // "publicPtrDomainName": "my_publicPtrDomainName",
+ * // "setPublicDns": false,
+ * // "setPublicPtr": false,
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.updateAccessConfig
* @memberOf! ()
*
@@ -37126,6 +54728,91 @@ export namespace compute_alpha {
/**
* compute.instances.updateDisplayDevice
* @desc Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.updateDisplayDevice({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "enableDisplay": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.updateDisplayDevice
* @memberOf! ()
*
@@ -37204,6 +54891,101 @@ export namespace compute_alpha {
/**
* compute.instances.updateNetworkInterface
* @desc Updates an instance's network interface. This method follows PATCH semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.updateNetworkInterface({
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the network interface to update.
+ * networkInterface: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accessConfigs": [],
+ * // "aliasIpRanges": [],
+ * // "fingerprint": "my_fingerprint",
+ * // "ipv6Address": "my_ipv6Address",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkIP": "my_networkIP",
+ * // "subnetwork": "my_subnetwork"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.updateNetworkInterface
* @memberOf! ()
*
@@ -37285,6 +55067,93 @@ export namespace compute_alpha {
/**
* compute.instances.updateShieldedInstanceConfig
* @desc Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.updateShieldedInstanceConfig({
+ * // Name or id of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "enableIntegrityMonitoring": false,
+ * // "enableSecureBoot": false,
+ * // "enableVtpm": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.updateShieldedInstanceConfig
* @memberOf! ()
*
@@ -37365,6 +55234,93 @@ export namespace compute_alpha {
/**
* compute.instances.updateShieldedVmConfig
* @desc Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.updateShieldedVmConfig({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "enableIntegrityMonitoring": false,
+ * // "enableSecureBoot": false,
+ * // "enableVtpm": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.updateShieldedVmConfig
* @memberOf! ()
*
@@ -38807,6 +56763,81 @@ export namespace compute_alpha {
/**
* compute.instanceTemplates.delete
* @desc Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.delete({
+ * // The name of the instance template to delete.
+ * instanceTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceTemplates.delete
* @memberOf! ()
*
@@ -38883,6 +56914,62 @@ export namespace compute_alpha {
/**
* compute.instanceTemplates.get
* @desc Returns the specified instance template. Gets a list of available instance templates by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.get({
+ * // The name of the instance template.
+ * instanceTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "properties": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sourceInstance": "my_sourceInstance",
+ * // "sourceInstanceParams": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceTemplates.get
* @memberOf! ()
*
@@ -38958,6 +57045,60 @@ export namespace compute_alpha {
/**
* compute.instanceTemplates.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceTemplates.getIamPolicy
* @memberOf! ()
*
@@ -39032,6 +57173,96 @@ export namespace compute_alpha {
/**
* compute.instanceTemplates.insert
* @desc Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "properties": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sourceInstance": "my_sourceInstance",
+ * // "sourceInstanceParams": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceTemplates.insert
* @memberOf! ()
*
@@ -39108,6 +57339,76 @@ export namespace compute_alpha {
/**
* compute.instanceTemplates.list
* @desc Retrieves a list of instance templates that are contained within the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceTemplates.list
* @memberOf! ()
*
@@ -39189,6 +57490,67 @@ export namespace compute_alpha {
/**
* compute.instanceTemplates.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceTemplates.setIamPolicy
* @memberOf! ()
*
@@ -39263,6 +57625,61 @@ export namespace compute_alpha {
/**
* compute.instanceTemplates.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceTemplates.testIamPermissions
* @memberOf! ()
*
@@ -39502,6 +57919,79 @@ export namespace compute_alpha {
/**
* compute.interconnectAttachments.aggregatedList
* @desc Retrieves an aggregated list of interconnect attachments.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnectAttachments.aggregatedList
* @memberOf! ()
*
@@ -39599,6 +58089,84 @@ export namespace compute_alpha {
/**
* compute.interconnectAttachments.delete
* @desc Deletes the specified interconnect attachment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.delete({
+ * // Name of the interconnect attachment to delete.
+ * interconnectAttachment:
+ * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnectAttachments.delete
* @memberOf! ()
*
@@ -39676,6 +58244,83 @@ export namespace compute_alpha {
/**
* compute.interconnectAttachments.get
* @desc Returns the specified interconnect attachment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.get({
+ * // Name of the interconnect attachment to return.
+ * interconnectAttachment:
+ * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adminEnabled": false,
+ * // "bandwidth": "my_bandwidth",
+ * // "candidateSubnets": [],
+ * // "cloudRouterIpAddress": "my_cloudRouterIpAddress",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerRouterIpAddress": "my_customerRouterIpAddress",
+ * // "description": "my_description",
+ * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnect": "my_interconnect",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "mtu": 0,
+ * // "name": "my_name",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "pairingKey": "my_pairingKey",
+ * // "partnerAsn": "my_partnerAsn",
+ * // "partnerMetadata": {},
+ * // "privateInterconnectInfo": {},
+ * // "region": "my_region",
+ * // "router": "my_router",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "state": "my_state",
+ * // "type": "my_type",
+ * // "vlanTag8021q": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnectAttachments.get
* @memberOf! ()
*
@@ -39754,6 +58399,62 @@ export namespace compute_alpha {
/**
* compute.interconnectAttachments.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnectAttachments.getIamPolicy
* @memberOf! ()
*
@@ -39829,6 +58530,118 @@ export namespace compute_alpha {
/**
* compute.interconnectAttachments.insert
* @desc Creates an InterconnectAttachment in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // If true, the request will not be committed.
+ * validateOnly: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adminEnabled": false,
+ * // "bandwidth": "my_bandwidth",
+ * // "candidateSubnets": [],
+ * // "cloudRouterIpAddress": "my_cloudRouterIpAddress",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerRouterIpAddress": "my_customerRouterIpAddress",
+ * // "description": "my_description",
+ * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnect": "my_interconnect",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "mtu": 0,
+ * // "name": "my_name",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "pairingKey": "my_pairingKey",
+ * // "partnerAsn": "my_partnerAsn",
+ * // "partnerMetadata": {},
+ * // "privateInterconnectInfo": {},
+ * // "region": "my_region",
+ * // "router": "my_router",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "state": "my_state",
+ * // "type": "my_type",
+ * // "vlanTag8021q": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnectAttachments.insert
* @memberOf! ()
*
@@ -39907,6 +58720,78 @@ export namespace compute_alpha {
/**
* compute.interconnectAttachments.list
* @desc Retrieves the list of interconnect attachments contained within the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnectAttachments.list
* @memberOf! ()
*
@@ -39994,6 +58879,119 @@ export namespace compute_alpha {
/**
* compute.interconnectAttachments.patch
* @desc Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.patch({
+ * // Name of the interconnect attachment to patch.
+ * interconnectAttachment:
+ * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adminEnabled": false,
+ * // "bandwidth": "my_bandwidth",
+ * // "candidateSubnets": [],
+ * // "cloudRouterIpAddress": "my_cloudRouterIpAddress",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerRouterIpAddress": "my_customerRouterIpAddress",
+ * // "description": "my_description",
+ * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnect": "my_interconnect",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "mtu": 0,
+ * // "name": "my_name",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "pairingKey": "my_pairingKey",
+ * // "partnerAsn": "my_partnerAsn",
+ * // "partnerMetadata": {},
+ * // "privateInterconnectInfo": {},
+ * // "region": "my_region",
+ * // "router": "my_router",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "state": "my_state",
+ * // "type": "my_type",
+ * // "vlanTag8021q": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnectAttachments.patch
* @memberOf! ()
*
@@ -40072,6 +59070,69 @@ export namespace compute_alpha {
/**
* compute.interconnectAttachments.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnectAttachments.setIamPolicy
* @memberOf! ()
*
@@ -40147,6 +59208,92 @@ export namespace compute_alpha {
/**
* compute.interconnectAttachments.setLabels
* @desc Sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnectAttachments.setLabels
* @memberOf! ()
*
@@ -40225,6 +59372,63 @@ export namespace compute_alpha {
/**
* compute.interconnectAttachments.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnectAttachments.testIamPermissions
* @memberOf! ()
*
@@ -40591,6 +59795,68 @@ export namespace compute_alpha {
/**
* compute.interconnectLocations.get
* @desc Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectLocations.get({
+ * // Name of the interconnect location to return.
+ * interconnectLocation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": "my_address",
+ * // "availabilityZone": "my_availabilityZone",
+ * // "city": "my_city",
+ * // "continent": "my_continent",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "facilityProvider": "my_facilityProvider",
+ * // "facilityProviderFacilityId": "my_facilityProviderFacilityId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "peeringdbFacilityId": "my_peeringdbFacilityId",
+ * // "regionInfos": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnectLocations.get
* @memberOf! ()
*
@@ -40668,6 +59934,76 @@ export namespace compute_alpha {
/**
* compute.interconnectLocations.list
* @desc Retrieves the list of interconnect locations available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectLocations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnectLocations.list
* @memberOf! ()
*
@@ -40749,6 +60085,61 @@ export namespace compute_alpha {
/**
* compute.interconnectLocations.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectLocations.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnectLocations.testIamPermissions
* @memberOf! ()
*
@@ -40906,6 +60297,81 @@ export namespace compute_alpha {
/**
* compute.interconnects.delete
* @desc Deletes the specified interconnect.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.delete({
+ * // Name of the interconnect to delete.
+ * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnects.delete
* @memberOf! ()
*
@@ -40982,6 +60448,77 @@ export namespace compute_alpha {
/**
* compute.interconnects.get
* @desc Returns the specified interconnect. Get a list of available interconnects by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.get({
+ * // Name of the interconnect to return.
+ * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adminEnabled": false,
+ * // "circuitInfos": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerName": "my_customerName",
+ * // "description": "my_description",
+ * // "expectedOutages": [],
+ * // "googleIpAddress": "my_googleIpAddress",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnectAttachments": [],
+ * // "interconnectType": "my_interconnectType",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "linkType": "my_linkType",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nocContactEmail": "my_nocContactEmail",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "peerIpAddress": "my_peerIpAddress",
+ * // "provisionedLinkCount": 0,
+ * // "requestedLinkCount": 0,
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnects.get
* @memberOf! ()
*
@@ -41057,6 +60594,53 @@ export namespace compute_alpha {
/**
* compute.interconnects.getDiagnostics
* @desc Returns the interconnectDiagnostics for the specified interconnect.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.getDiagnostics({
+ * // Name of the interconnect resource to query.
+ * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "result": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnects.getDiagnostics
* @memberOf! ()
*
@@ -41143,6 +60727,60 @@ export namespace compute_alpha {
/**
* compute.interconnects.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnects.getIamPolicy
* @memberOf! ()
*
@@ -41217,6 +60855,111 @@ export namespace compute_alpha {
/**
* compute.interconnects.insert
* @desc Creates a Interconnect in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adminEnabled": false,
+ * // "circuitInfos": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerName": "my_customerName",
+ * // "description": "my_description",
+ * // "expectedOutages": [],
+ * // "googleIpAddress": "my_googleIpAddress",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnectAttachments": [],
+ * // "interconnectType": "my_interconnectType",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "linkType": "my_linkType",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nocContactEmail": "my_nocContactEmail",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "peerIpAddress": "my_peerIpAddress",
+ * // "provisionedLinkCount": 0,
+ * // "requestedLinkCount": 0,
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "state": "my_state"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnects.insert
* @memberOf! ()
*
@@ -41292,6 +61035,76 @@ export namespace compute_alpha {
/**
* compute.interconnects.list
* @desc Retrieves the list of interconnect available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnects.list
* @memberOf! ()
*
@@ -41370,6 +61183,113 @@ export namespace compute_alpha {
/**
* compute.interconnects.patch
* @desc Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.patch({
+ * // Name of the interconnect to update.
+ * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adminEnabled": false,
+ * // "circuitInfos": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerName": "my_customerName",
+ * // "description": "my_description",
+ * // "expectedOutages": [],
+ * // "googleIpAddress": "my_googleIpAddress",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnectAttachments": [],
+ * // "interconnectType": "my_interconnectType",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "linkType": "my_linkType",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nocContactEmail": "my_nocContactEmail",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "peerIpAddress": "my_peerIpAddress",
+ * // "provisionedLinkCount": 0,
+ * // "requestedLinkCount": 0,
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "state": "my_state"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnects.patch
* @memberOf! ()
*
@@ -41447,6 +61367,67 @@ export namespace compute_alpha {
/**
* compute.interconnects.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnects.setIamPolicy
* @memberOf! ()
*
@@ -41521,6 +61502,84 @@ export namespace compute_alpha {
/**
* compute.interconnects.setLabels
* @desc Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnects.setLabels
* @memberOf! ()
*
@@ -41597,6 +61656,61 @@ export namespace compute_alpha {
/**
* compute.interconnects.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnects.testIamPermissions
* @memberOf! ()
*
@@ -41898,6 +62012,61 @@ export namespace compute_alpha {
/**
* compute.licenseCodes.get
* @desc Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenseCodes.get({
+ * // Number corresponding to the License code resource to return.
+ * licenseCode: '[0-9]{0,61}?',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "licenseAlias": [],
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state",
+ * // "transferable": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenseCodes.get
* @memberOf! ()
*
@@ -41972,6 +62141,60 @@ export namespace compute_alpha {
/**
* compute.licenseCodes.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenseCodes.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenseCodes.getIamPolicy
* @memberOf! ()
*
@@ -42046,6 +62269,67 @@ export namespace compute_alpha {
/**
* compute.licenseCodes.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenseCodes.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenseCodes.setIamPolicy
* @memberOf! ()
*
@@ -42120,6 +62404,61 @@ export namespace compute_alpha {
/**
* compute.licenseCodes.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenseCodes.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenseCodes.testIamPermissions
* @memberOf! ()
*
@@ -42285,6 +62624,81 @@ export namespace compute_alpha {
/**
* compute.licenses.delete
* @desc Deletes the specified license. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.delete({
+ * // Name of the license resource to delete.
+ * license: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.delete
* @memberOf! ()
*
@@ -42360,6 +62774,63 @@ export namespace compute_alpha {
/**
* compute.licenses.get
* @desc Returns the specified License resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.get({
+ * // Name of the License resource to return.
+ * license: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "chargesUseFee": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "licenseCode": "my_licenseCode",
+ * // "name": "my_name",
+ * // "resourceRequirements": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "transferable": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.get
* @memberOf! ()
*
@@ -42432,6 +62903,60 @@ export namespace compute_alpha {
/**
* compute.licenses.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.getIamPolicy
* @memberOf! ()
*
@@ -42506,6 +63031,100 @@ export namespace compute_alpha {
/**
* compute.licenses.insert
* @desc Create a License resource in the specified project. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/devstorage.full_control',
+ * 'https://www.googleapis.com/auth/devstorage.read_only',
+ * 'https://www.googleapis.com/auth/devstorage.read_write',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "chargesUseFee": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "licenseCode": "my_licenseCode",
+ * // "name": "my_name",
+ * // "resourceRequirements": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "transferable": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.insert
* @memberOf! ()
*
@@ -42580,6 +63199,75 @@ export namespace compute_alpha {
/**
* compute.licenses.list
* @desc Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.list
* @memberOf! ()
*
@@ -42659,6 +63347,67 @@ export namespace compute_alpha {
/**
* compute.licenses.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.setIamPolicy
* @memberOf! ()
*
@@ -42733,6 +63482,61 @@ export namespace compute_alpha {
/**
* compute.licenses.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.testIamPermissions
* @memberOf! ()
*
@@ -42968,6 +63772,81 @@ export namespace compute_alpha {
/**
* compute.machineImages.delete
* @desc Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineImages.delete({
+ * // The name of the machine image to delete.
+ * machineImage: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.machineImages.delete
* @memberOf! ()
*
@@ -43044,6 +63923,67 @@ export namespace compute_alpha {
/**
* compute.machineImages.get
* @desc Returns the specified machine image. Gets a list of available machine images by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineImages.get({
+ * // The name of the machine image.
+ * machineImage: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "guestFlush": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "machineImageEncryptionKey": {},
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sourceDiskEncryptionKeys": [],
+ * // "sourceInstance": "my_sourceInstance",
+ * // "sourceInstanceProperties": {},
+ * // "status": "my_status",
+ * // "storageLocations": [],
+ * // "totalStorageBytes": "my_totalStorageBytes"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.machineImages.get
* @memberOf! ()
*
@@ -43119,6 +64059,60 @@ export namespace compute_alpha {
/**
* compute.machineImages.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineImages.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.machineImages.getIamPolicy
* @memberOf! ()
*
@@ -43193,6 +64187,103 @@ export namespace compute_alpha {
/**
* compute.machineImages.insert
* @desc Creates a machine image in the specified project using the data that is included in the request. If you are creating a new machine image to update an existing instance, your new machine image should use the same network or, if applicable, the same subnetwork as the original instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineImages.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Required. Source instance that is used to create the machine image from.
+ * sourceInstance: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "guestFlush": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "machineImageEncryptionKey": {},
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sourceDiskEncryptionKeys": [],
+ * // "sourceInstance": "my_sourceInstance",
+ * // "sourceInstanceProperties": {},
+ * // "status": "my_status",
+ * // "storageLocations": [],
+ * // "totalStorageBytes": "my_totalStorageBytes"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.machineImages.insert
* @memberOf! ()
*
@@ -43269,6 +64360,76 @@ export namespace compute_alpha {
/**
* compute.machineImages.list
* @desc Retrieves a list of machine images that are contained within the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineImages.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.machineImages.list
* @memberOf! ()
*
@@ -43347,6 +64508,67 @@ export namespace compute_alpha {
/**
* compute.machineImages.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineImages.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.machineImages.setIamPolicy
* @memberOf! ()
*
@@ -43421,6 +64643,61 @@ export namespace compute_alpha {
/**
* compute.machineImages.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineImages.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.machineImages.testIamPermissions
* @memberOf! ()
*
@@ -43664,6 +64941,79 @@ export namespace compute_alpha {
/**
* compute.machineTypes.aggregatedList
* @desc Retrieves an aggregated list of machine types.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineTypes.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.machineTypes.aggregatedList
* @memberOf! ()
*
@@ -43751,6 +65101,69 @@ export namespace compute_alpha {
/**
* compute.machineTypes.get
* @desc Returns the specified machine type. Gets a list of available machine types by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineTypes.get({
+ * // Name of the machine type to return.
+ * machineType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accelerators": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "guestCpus": 0,
+ * // "id": "my_id",
+ * // "isSharedCpu": false,
+ * // "kind": "my_kind",
+ * // "maximumPersistentDisks": 0,
+ * // "maximumPersistentDisksSizeGb": "my_maximumPersistentDisksSizeGb",
+ * // "memoryMb": 0,
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.machineTypes.get
* @memberOf! ()
*
@@ -43826,6 +65239,78 @@ export namespace compute_alpha {
/**
* compute.machineTypes.list
* @desc Retrieves a list of machine types available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineTypes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.machineTypes.list
* @memberOf! ()
*
@@ -44005,6 +65490,79 @@ export namespace compute_alpha {
/**
* compute.networkEndpointGroups.aggregatedList
* @desc Retrieves the list of network endpoint groups and sorts them by zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.aggregatedList
* @memberOf! ()
*
@@ -44094,6 +65652,91 @@ export namespace compute_alpha {
/**
* compute.networkEndpointGroups.attachNetworkEndpoints
* @desc Attach a list of network endpoints to the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.attachNetworkEndpoints({
+ * // The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkEndpoints": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.attachNetworkEndpoints
* @memberOf! ()
*
@@ -44174,6 +65817,83 @@ export namespace compute_alpha {
/**
* compute.networkEndpointGroups.delete
* @desc Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.delete({
+ * // The name of the network endpoint group to delete. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.delete
* @memberOf! ()
*
@@ -44251,6 +65971,91 @@ export namespace compute_alpha {
/**
* compute.networkEndpointGroups.detachNetworkEndpoints
* @desc Detach a list of network endpoints from the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.detachNetworkEndpoints({
+ * // The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkEndpoints": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.detachNetworkEndpoints
* @memberOf! ()
*
@@ -44331,6 +66136,74 @@ export namespace compute_alpha {
/**
* compute.networkEndpointGroups.get
* @desc Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.get({
+ * // The name of the network endpoint group. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "annotations": {},
+ * // "appEngine": {},
+ * // "cloudFunction": {},
+ * // "cloudRun": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultPort": 0,
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancer": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkEndpointType": "my_networkEndpointType",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "type": "my_type",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.get
* @memberOf! ()
*
@@ -44409,6 +66282,108 @@ export namespace compute_alpha {
/**
* compute.networkEndpointGroups.insert
* @desc Creates a network endpoint group in the specified project using the parameters that are included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where you want to create the network endpoint group. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "annotations": {},
+ * // "appEngine": {},
+ * // "cloudFunction": {},
+ * // "cloudRun": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultPort": 0,
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancer": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkEndpointType": "my_networkEndpointType",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "type": "my_type",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.insert
* @memberOf! ()
*
@@ -44486,6 +66461,78 @@ export namespace compute_alpha {
/**
* compute.networkEndpointGroups.list
* @desc Retrieves the list of network endpoint groups that are located in the specified project and zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.list
* @memberOf! ()
*
@@ -44568,6 +66615,88 @@ export namespace compute_alpha {
/**
* compute.networkEndpointGroups.listNetworkEndpoints
* @desc Lists the network endpoints in the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.listNetworkEndpoints({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "endpointFilters": [],
+ * // "healthStatus": "my_healthStatus"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.listNetworkEndpoints
* @memberOf! ()
*
@@ -44673,6 +66802,63 @@ export namespace compute_alpha {
/**
* compute.networkEndpointGroups.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.testIamPermissions
* @memberOf! ()
*
@@ -45031,6 +67217,94 @@ export namespace compute_alpha {
/**
* compute.networks.addPeering
* @desc Adds a peering to the specified network.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.addPeering({
+ * // Name of the network resource to add peering to.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoCreateRoutes": false,
+ * // "exportCustomRoutes": false,
+ * // "importCustomRoutes": false,
+ * // "name": "my_name",
+ * // "networkPeering": {},
+ * // "peerNetwork": "my_peerNetwork"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.addPeering
* @memberOf! ()
*
@@ -45108,6 +67382,81 @@ export namespace compute_alpha {
/**
* compute.networks.delete
* @desc Deletes the specified network.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.delete({
+ * // Name of the network to delete.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.delete
* @memberOf! ()
*
@@ -45183,6 +67532,66 @@ export namespace compute_alpha {
/**
* compute.networks.get
* @desc Returns the specified network. Gets a list of available networks by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.get({
+ * // Name of the network to return.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "IPv4Range": "my_IPv4Range",
+ * // "autoCreateSubnetworks": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "gatewayIPv4": "my_gatewayIPv4",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mtu": 0,
+ * // "name": "my_name",
+ * // "peerings": [],
+ * // "routingConfig": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "subnetworks": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.get
* @memberOf! ()
*
@@ -45255,6 +67664,54 @@ export namespace compute_alpha {
/**
* compute.networks.getEffectiveFirewalls
* @desc Returns the effective firewalls on a given network.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.getEffectiveFirewalls({
+ * // Name of the network for this request.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "firewalls": [],
+ * // "organizationFirewalls": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.getEffectiveFirewalls
* @memberOf! ()
*
@@ -45347,6 +67804,100 @@ export namespace compute_alpha {
/**
* compute.networks.insert
* @desc Creates a network in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPv4Range": "my_IPv4Range",
+ * // "autoCreateSubnetworks": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "gatewayIPv4": "my_gatewayIPv4",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mtu": 0,
+ * // "name": "my_name",
+ * // "peerings": [],
+ * // "routingConfig": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "subnetworks": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.insert
* @memberOf! ()
*
@@ -45421,6 +67972,76 @@ export namespace compute_alpha {
/**
* compute.networks.list
* @desc Retrieves the list of networks available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.list
* @memberOf! ()
*
@@ -45498,6 +68119,80 @@ export namespace compute_alpha {
/**
* compute.networks.listIpAddresses
* @desc Lists the internal IP addresses in the specified network.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.listIpAddresses({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Name of the network for this request.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // (Optional) types filter separate by comma, valid values are: SUBNETWORK, RESERVED, PEER_USED, PEER_RESERVED, REMOTE_USED, REMOTE_RESERVED.
+ * types: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.listIpAddresses
* @memberOf! ()
*
@@ -45581,6 +68276,88 @@ export namespace compute_alpha {
/**
* compute.networks.listIpOwners
* @desc Lists the internal IP owners in the specified network.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.listIpOwners({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // (Optional) IP CIDR range filter, example: "10.128.10.0/30".
+ * ipCidrRange: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Name of the network to return.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // (Optional) Project IDs filter, example: "project-1,project-2".
+ * ownerProjects: 'placeholder-value',
+ * // (Optional) Owner types filter, example: "instance,forwardingRule".
+ * ownerTypes: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // (Optional) Subnetwork name filter.
+ * subnetName: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // (Optional) Subnetwork region filter.
+ * subnetRegion: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.listIpOwners
* @memberOf! ()
*
@@ -45666,6 +68443,84 @@ export namespace compute_alpha {
/**
* compute.networks.listPeeringRoutes
* @desc Lists the peering routes exchanged over peering connection.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.listPeeringRoutes({
+ * // The direction of the exchanged routes.
+ * direction: 'placeholder-value',
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Name of the network for this request.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The response will show routes exchanged over the given peering connection.
+ * peeringName: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region of the request. The response will include all subnet routes, static routes and dynamic routes in the region.
+ * region: 'placeholder-value',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.listPeeringRoutes
* @memberOf! ()
*
@@ -45756,6 +68611,102 @@ export namespace compute_alpha {
/**
* compute.networks.patch
* @desc Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.patch({
+ * // Name of the network to update.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPv4Range": "my_IPv4Range",
+ * // "autoCreateSubnetworks": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "gatewayIPv4": "my_gatewayIPv4",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mtu": 0,
+ * // "name": "my_name",
+ * // "peerings": [],
+ * // "routingConfig": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "subnetworks": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.patch
* @memberOf! ()
*
@@ -45832,6 +68783,89 @@ export namespace compute_alpha {
/**
* compute.networks.removePeering
* @desc Removes a peering from the specified network.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.removePeering({
+ * // Name of the network resource to remove peering from.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.removePeering
* @memberOf! ()
*
@@ -45909,6 +68943,81 @@ export namespace compute_alpha {
/**
* compute.networks.switchToCustomMode
* @desc Switches the network mode from auto subnet mode to custom subnet mode.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.switchToCustomMode({
+ * // Name of the network to be updated.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.switchToCustomMode
* @memberOf! ()
*
@@ -45985,6 +69094,61 @@ export namespace compute_alpha {
/**
* compute.networks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.testIamPermissions
* @memberOf! ()
*
@@ -46065,6 +69229,89 @@ export namespace compute_alpha {
/**
* compute.networks.updatePeering
* @desc Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.updatePeering({
+ * // Name of the network resource which the updated peering is belonging to.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkPeering": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.updatePeering
* @memberOf! ()
*
@@ -46535,6 +69782,91 @@ export namespace compute_alpha {
/**
* compute.nodeGroups.addNodes
* @desc Adds specified number of nodes to the node group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.addNodes({
+ * // Name of the NodeGroup resource.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "additionalNodeCount": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.addNodes
* @memberOf! ()
*
@@ -46613,6 +69945,79 @@ export namespace compute_alpha {
/**
* compute.nodeGroups.aggregatedList
* @desc Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.aggregatedList
* @memberOf! ()
*
@@ -46697,6 +70102,83 @@ export namespace compute_alpha {
/**
* compute.nodeGroups.delete
* @desc Deletes the specified NodeGroup resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.delete({
+ * // Name of the NodeGroup resource to delete.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.delete
* @memberOf! ()
*
@@ -46774,6 +70256,91 @@ export namespace compute_alpha {
/**
* compute.nodeGroups.deleteNodes
* @desc Deletes specified nodes from the node group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.deleteNodes({
+ * // Name of the NodeGroup resource whose nodes will be deleted.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "nodes": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.deleteNodes
* @memberOf! ()
*
@@ -46852,6 +70419,70 @@ export namespace compute_alpha {
/**
* compute.nodeGroups.get
* @desc Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the "nodes" field should not be used. Use nodeGroups.listNodes instead.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.get({
+ * // Name of the node group to return.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locationHint": "my_locationHint",
+ * // "maintenancePolicy": "my_maintenancePolicy",
+ * // "maintenanceWindow": {},
+ * // "name": "my_name",
+ * // "nodeTemplate": "my_nodeTemplate",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "size": 0,
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.get
* @memberOf! ()
*
@@ -46927,6 +70558,62 @@ export namespace compute_alpha {
/**
* compute.nodeGroups.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.getIamPolicy
* @memberOf! ()
*
@@ -47002,6 +70689,106 @@ export namespace compute_alpha {
/**
* compute.nodeGroups.insert
* @desc Creates a NodeGroup resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.insert({
+ * // Initial count of nodes in the node group.
+ * initialNodeCount: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locationHint": "my_locationHint",
+ * // "maintenancePolicy": "my_maintenancePolicy",
+ * // "maintenanceWindow": {},
+ * // "name": "my_name",
+ * // "nodeTemplate": "my_nodeTemplate",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "size": 0,
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.insert
* @memberOf! ()
*
@@ -47080,6 +70867,78 @@ export namespace compute_alpha {
/**
* compute.nodeGroups.list
* @desc Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.list
* @memberOf! ()
*
@@ -47159,6 +71018,80 @@ export namespace compute_alpha {
/**
* compute.nodeGroups.listNodes
* @desc Lists nodes in the node group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.listNodes({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Name of the NodeGroup resource whose nodes you want to list.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.listNodes
* @memberOf! ()
*
@@ -47240,6 +71173,106 @@ export namespace compute_alpha {
/**
* compute.nodeGroups.patch
* @desc Updates the specified node group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.patch({
+ * // Name of the NodeGroup resource to update.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locationHint": "my_locationHint",
+ * // "maintenancePolicy": "my_maintenancePolicy",
+ * // "maintenanceWindow": {},
+ * // "name": "my_name",
+ * // "nodeTemplate": "my_nodeTemplate",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "size": 0,
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.patch
* @memberOf! ()
*
@@ -47317,6 +71350,69 @@ export namespace compute_alpha {
/**
* compute.nodeGroups.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.setIamPolicy
* @memberOf! ()
*
@@ -47392,6 +71488,91 @@ export namespace compute_alpha {
/**
* compute.nodeGroups.setNodeTemplate
* @desc Updates the node template of the node group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.setNodeTemplate({
+ * // Name of the NodeGroup resource to update.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "nodeTemplate": "my_nodeTemplate"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.setNodeTemplate
* @memberOf! ()
*
@@ -47470,6 +71651,63 @@ export namespace compute_alpha {
/**
* compute.nodeGroups.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.testIamPermissions
* @memberOf! ()
*
@@ -47931,6 +72169,79 @@ export namespace compute_alpha {
/**
* compute.nodeTemplates.aggregatedList
* @desc Retrieves an aggregated list of node templates.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.aggregatedList
* @memberOf! ()
*
@@ -48018,6 +72329,83 @@ export namespace compute_alpha {
/**
* compute.nodeTemplates.delete
* @desc Deletes the specified NodeTemplate resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.delete({
+ * // Name of the NodeTemplate resource to delete.
+ * nodeTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.delete
* @memberOf! ()
*
@@ -48095,6 +72483,71 @@ export namespace compute_alpha {
/**
* compute.nodeTemplates.get
* @desc Returns the specified node template. Gets a list of available node templates by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.get({
+ * // Name of the node template to return.
+ * nodeTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accelerators": [],
+ * // "cpuOvercommitType": "my_cpuOvercommitType",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "disks": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nodeAffinityLabels": {},
+ * // "nodeType": "my_nodeType",
+ * // "nodeTypeFlexibility": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serverBinding": {},
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.get
* @memberOf! ()
*
@@ -48171,6 +72624,62 @@ export namespace compute_alpha {
/**
* compute.nodeTemplates.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.getIamPolicy
* @memberOf! ()
*
@@ -48246,6 +72755,105 @@ export namespace compute_alpha {
/**
* compute.nodeTemplates.insert
* @desc Creates a NodeTemplate resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accelerators": [],
+ * // "cpuOvercommitType": "my_cpuOvercommitType",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "disks": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nodeAffinityLabels": {},
+ * // "nodeType": "my_nodeType",
+ * // "nodeTypeFlexibility": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serverBinding": {},
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.insert
* @memberOf! ()
*
@@ -48323,6 +72931,78 @@ export namespace compute_alpha {
/**
* compute.nodeTemplates.list
* @desc Retrieves a list of node templates available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.list
* @memberOf! ()
*
@@ -48403,6 +73083,69 @@ export namespace compute_alpha {
/**
* compute.nodeTemplates.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.setIamPolicy
* @memberOf! ()
*
@@ -48478,6 +73221,63 @@ export namespace compute_alpha {
/**
* compute.nodeTemplates.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.testIamPermissions
* @memberOf! ()
*
@@ -48782,6 +73582,79 @@ export namespace compute_alpha {
/**
* compute.nodeTypes.aggregatedList
* @desc Retrieves an aggregated list of node types.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTypes.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTypes.aggregatedList
* @memberOf! ()
*
@@ -48865,6 +73738,67 @@ export namespace compute_alpha {
/**
* compute.nodeTypes.get
* @desc Returns the specified node type. Gets a list of available node types by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTypes.get({
+ * // Name of the node type to return.
+ * nodeType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cpuPlatform": "my_cpuPlatform",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "guestCpus": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "localSsdGb": 0,
+ * // "memoryMb": 0,
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTypes.get
* @memberOf! ()
*
@@ -48938,6 +73872,78 @@ export namespace compute_alpha {
/**
* compute.nodeTypes.list
* @desc Retrieves a list of node types available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTypes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTypes.list
* @memberOf! ()
*
@@ -49115,6 +74121,91 @@ export namespace compute_alpha {
/**
* compute.organizationSecurityPolicies.addAssociation
* @desc Inserts an association for the specified security policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.addAssociation({
+ * // Indicates whether or not to replace it if an association of the attachment already exists. This is false by default, in which case an error will be returned if an assocation already exists.
+ * replaceExistingAssociation: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attachmentId": "my_attachmentId",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name",
+ * // "securityPolicyId": "my_securityPolicyId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.addAssociation
* @memberOf! ()
*
@@ -49192,6 +74283,97 @@ export namespace compute_alpha {
/**
* compute.organizationSecurityPolicies.addRule
* @desc Inserts a rule into a security policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.addRule({
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "direction": "my_direction",
+ * // "enableLogging": false,
+ * // "kind": "my_kind",
+ * // "match": {},
+ * // "preview": false,
+ * // "priority": 0,
+ * // "rateLimitOptions": {},
+ * // "ruleTupleCount": 0,
+ * // "targetResources": [],
+ * // "targetServiceAccounts": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.addRule
* @memberOf! ()
*
@@ -49268,6 +74450,80 @@ export namespace compute_alpha {
/**
* compute.organizationSecurityPolicies.copyRules
* @desc Copies rules to the specified security policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.copyRules({
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ * // The security policy from which to copy rules.
+ * sourceSecurityPolicy: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.copyRules
* @memberOf! ()
*
@@ -49344,6 +74600,78 @@ export namespace compute_alpha {
/**
* compute.organizationSecurityPolicies.delete
* @desc Deletes the specified policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.delete({
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to delete.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.delete
* @memberOf! ()
*
@@ -49419,6 +74747,66 @@ export namespace compute_alpha {
/**
* compute.organizationSecurityPolicies.get
* @desc List all of the ordered rules present in a single specified policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.get({
+ * // Name of the security policy to get.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "associations": [],
+ * // "cloudArmorConfig": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "ruleTupleCount": 0,
+ * // "rules": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.get
* @memberOf! ()
*
@@ -49493,6 +74881,55 @@ export namespace compute_alpha {
/**
* compute.organizationSecurityPolicies.getAssociation
* @desc Gets an association with the specified name.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.getAssociation({
+ * // The name of the association to get from the security policy.
+ * name: 'placeholder-value',
+ * // Name of the security policy to which the queried rule belongs.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attachmentId": "my_attachmentId",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name",
+ * // "securityPolicyId": "my_securityPolicyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.getAssociation
* @memberOf! ()
*
@@ -49575,6 +75012,63 @@ export namespace compute_alpha {
/**
* compute.organizationSecurityPolicies.getRule
* @desc Gets a rule at the specified priority.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.getRule({
+ * // The priority of the rule to get from the security policy.
+ * priority: 'placeholder-value',
+ * // Name of the security policy to which the queried rule belongs.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "direction": "my_direction",
+ * // "enableLogging": false,
+ * // "kind": "my_kind",
+ * // "match": {},
+ * // "preview": false,
+ * // "priority": 0,
+ * // "rateLimitOptions": {},
+ * // "ruleTupleCount": 0,
+ * // "targetResources": [],
+ * // "targetServiceAccounts": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.getRule
* @memberOf! ()
*
@@ -49650,6 +75144,102 @@ export namespace compute_alpha {
/**
* compute.organizationSecurityPolicies.insert
* @desc Creates a new policy in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.insert({
+ * // Parent ID for this request.
+ * parentId: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "associations": [],
+ * // "cloudArmorConfig": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "ruleTupleCount": 0,
+ * // "rules": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.insert
* @memberOf! ()
*
@@ -49726,6 +75316,74 @@ export namespace compute_alpha {
/**
* compute.organizationSecurityPolicies.list
* @desc List all the policies that have been configured for the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Parent ID for this request.
+ * parentId: 'placeholder-value',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.list
* @memberOf! ()
*
@@ -49805,6 +75463,50 @@ export namespace compute_alpha {
/**
* compute.organizationSecurityPolicies.listAssociations
* @desc Lists associations of a specified target, i.e., organization or folder.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.listAssociations({
+ * // The target resource to list associations. It is an organization, or a folder.
+ * targetResource: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "associations": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.listAssociations
* @memberOf! ()
*
@@ -49905,6 +75607,80 @@ export namespace compute_alpha {
/**
* compute.organizationSecurityPolicies.move
* @desc Moves the specified security policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.move({
+ * // The new parent of the security policy.
+ * parentId: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.move
* @memberOf! ()
*
@@ -49981,6 +75757,102 @@ export namespace compute_alpha {
/**
* compute.organizationSecurityPolicies.patch
* @desc Patches the specified policy with the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.patch({
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "associations": [],
+ * // "cloudArmorConfig": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "ruleTupleCount": 0,
+ * // "rules": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.patch
* @memberOf! ()
*
@@ -50057,6 +75929,99 @@ export namespace compute_alpha {
/**
* compute.organizationSecurityPolicies.patchRule
* @desc Patches a rule at the specified priority.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.patchRule({
+ * // The priority of the rule to patch.
+ * priority: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "direction": "my_direction",
+ * // "enableLogging": false,
+ * // "kind": "my_kind",
+ * // "match": {},
+ * // "preview": false,
+ * // "priority": 0,
+ * // "rateLimitOptions": {},
+ * // "ruleTupleCount": 0,
+ * // "targetResources": [],
+ * // "targetServiceAccounts": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.patchRule
* @memberOf! ()
*
@@ -50134,6 +76099,80 @@ export namespace compute_alpha {
/**
* compute.organizationSecurityPolicies.removeAssociation
* @desc Removes an association for the specified security policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.removeAssociation({
+ * // Name for the attachment that will be removed.
+ * name: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.removeAssociation
* @memberOf! ()
*
@@ -50210,6 +76249,80 @@ export namespace compute_alpha {
/**
* compute.organizationSecurityPolicies.removeRule
* @desc Deletes a rule at the specified priority.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.removeRule({
+ * // The priority of the rule to remove from the security policy.
+ * priority: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.removeRule
* @memberOf! ()
*
@@ -50591,6 +76704,79 @@ export namespace compute_alpha {
/**
* compute.packetMirrorings.aggregatedList
* @desc Retrieves an aggregated list of packetMirrorings.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.aggregatedList
* @memberOf! ()
*
@@ -50680,6 +76866,83 @@ export namespace compute_alpha {
/**
* compute.packetMirrorings.delete
* @desc Deletes the specified PacketMirroring resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.delete({
+ * // Name of the PacketMirroring resource to delete.
+ * packetMirroring: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.delete
* @memberOf! ()
*
@@ -50757,6 +77020,68 @@ export namespace compute_alpha {
/**
* compute.packetMirrorings.get
* @desc Returns the specified PacketMirroring resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.get({
+ * // Name of the PacketMirroring resource to return.
+ * packetMirroring: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "collectorIlb": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enable": "my_enable",
+ * // "filter": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mirroredResources": {},
+ * // "name": "my_name",
+ * // "network": {},
+ * // "priority": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.get
* @memberOf! ()
*
@@ -50833,6 +77158,102 @@ export namespace compute_alpha {
/**
* compute.packetMirrorings.insert
* @desc Creates a PacketMirroring resource in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "collectorIlb": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enable": "my_enable",
+ * // "filter": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mirroredResources": {},
+ * // "name": "my_name",
+ * // "network": {},
+ * // "priority": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.insert
* @memberOf! ()
*
@@ -50910,6 +77331,78 @@ export namespace compute_alpha {
/**
* compute.packetMirrorings.list
* @desc Retrieves a list of PacketMirroring resources available to the specified project and region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.list
* @memberOf! ()
*
@@ -50990,6 +77483,104 @@ export namespace compute_alpha {
/**
* compute.packetMirrorings.patch
* @desc Patches the specified PacketMirroring resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.patch({
+ * // Name of the PacketMirroring resource to patch.
+ * packetMirroring: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "collectorIlb": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enable": "my_enable",
+ * // "filter": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mirroredResources": {},
+ * // "name": "my_name",
+ * // "network": {},
+ * // "priority": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.patch
* @memberOf! ()
*
@@ -51068,6 +77659,63 @@ export namespace compute_alpha {
/**
* compute.packetMirrorings.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.testIamPermissions
* @memberOf! ()
*
@@ -51352,6 +78000,79 @@ export namespace compute_alpha {
/**
* compute.projects.disableXpnHost
* @desc Disable this project as a shared VPC host project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.disableXpnHost({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.projects.disableXpnHost
* @memberOf! ()
*
@@ -51426,6 +78147,87 @@ export namespace compute_alpha {
/**
* compute.projects.disableXpnResource
* @desc Disable a service resource (also known as service project) associated with this host project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.disableXpnResource({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "xpnResource": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.projects.disableXpnResource
* @memberOf! ()
*
@@ -51501,6 +78303,79 @@ export namespace compute_alpha {
/**
* compute.projects.enableXpnHost
* @desc Enable this project as a shared VPC host project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.enableXpnHost({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.projects.enableXpnHost
* @memberOf! ()
*
@@ -51575,6 +78450,87 @@ export namespace compute_alpha {
/**
* compute.projects.enableXpnResource
* @desc Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.enableXpnResource({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "xpnResource": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.projects.enableXpnResource
* @memberOf! ()
*
@@ -51650,6 +78606,63 @@ export namespace compute_alpha {
/**
* compute.projects.get
* @desc Returns the specified Project resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commonInstanceMetadata": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultNetworkTier": "my_defaultNetworkTier",
+ * // "defaultServiceAccount": "my_defaultServiceAccount",
+ * // "description": "my_description",
+ * // "enabledFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "quotas": [],
+ * // "selfLink": "my_selfLink",
+ * // "usageExportLocation": {},
+ * // "xpnProjectStatus": "my_xpnProjectStatus"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.projects.get
* @memberOf! ()
*
@@ -51721,6 +78734,62 @@ export namespace compute_alpha {
/**
* compute.projects.getXpnHost
* @desc Gets the shared VPC host project that this project links to. May be empty if no link exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.getXpnHost({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commonInstanceMetadata": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultNetworkTier": "my_defaultNetworkTier",
+ * // "defaultServiceAccount": "my_defaultServiceAccount",
+ * // "description": "my_description",
+ * // "enabledFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "quotas": [],
+ * // "selfLink": "my_selfLink",
+ * // "usageExportLocation": {},
+ * // "xpnProjectStatus": "my_xpnProjectStatus"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.projects.getXpnHost
* @memberOf! ()
*
@@ -51792,6 +78861,70 @@ export namespace compute_alpha {
/**
* compute.projects.getXpnResources
* @desc Gets service resources (a.k.a service project) associated with this host project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.getXpnResources({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.projects.getXpnResources
* @memberOf! ()
*
@@ -51873,6 +79006,81 @@ export namespace compute_alpha {
/**
* compute.projects.listXpnHosts
* @desc Lists all shared VPC host projects visible to the user in an organization.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.listXpnHosts({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "organization": "my_organization"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.projects.listXpnHosts
* @memberOf! ()
*
@@ -51951,6 +79159,88 @@ export namespace compute_alpha {
/**
* compute.projects.moveDisk
* @desc Moves a persistent disk from one zone to another.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.moveDisk({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "destinationZone": "my_destinationZone",
+ * // "targetDisk": "my_targetDisk"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.projects.moveDisk
* @memberOf! ()
*
@@ -52026,6 +79316,88 @@ export namespace compute_alpha {
/**
* compute.projects.moveInstance
* @desc Moves an instance and its attached persistent disks from one zone to another.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.moveInstance({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "destinationZone": "my_destinationZone",
+ * // "targetInstance": "my_targetInstance"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.projects.moveInstance
* @memberOf! ()
*
@@ -52101,6 +79473,89 @@ export namespace compute_alpha {
/**
* compute.projects.setCommonInstanceMetadata
* @desc Sets metadata common to all instances within the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.setCommonInstanceMetadata({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.projects.setCommonInstanceMetadata
* @memberOf! ()
*
@@ -52179,6 +79634,87 @@ export namespace compute_alpha {
/**
* compute.projects.setDefaultNetworkTier
* @desc Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.setDefaultNetworkTier({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkTier": "my_networkTier"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.projects.setDefaultNetworkTier
* @memberOf! ()
*
@@ -52257,6 +79793,87 @@ export namespace compute_alpha {
/**
* compute.projects.setDefaultServiceAccount
* @desc Sets the default service account of the project. The default service account is used when a VM instance is created with the service account email address set to "default".
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.setDefaultServiceAccount({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "email": "my_email"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.projects.setDefaultServiceAccount
* @memberOf! ()
*
@@ -52335,6 +79952,91 @@ export namespace compute_alpha {
/**
* compute.projects.setUsageExportBucket
* @desc Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/devstorage.full_control',
+ * 'https://www.googleapis.com/auth/devstorage.read_only',
+ * 'https://www.googleapis.com/auth/devstorage.read_write',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.setUsageExportBucket({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bucketName": "my_bucketName",
+ * // "reportNamePrefix": "my_reportNamePrefix"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.projects.setUsageExportBucket
* @memberOf! ()
*
@@ -52704,6 +80406,82 @@ export namespace compute_alpha {
/**
* compute.publicAdvertisedPrefixes.delete
* @desc Deletes the specified PublicAdvertisedPrefix
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.publicAdvertisedPrefixes.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the PublicAdvertisedPrefix resource to delete.
+ * publicAdvertisedPrefix:
+ * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.publicAdvertisedPrefixes.delete
* @memberOf! ()
*
@@ -52780,6 +80558,66 @@ export namespace compute_alpha {
/**
* compute.publicAdvertisedPrefixes.get
* @desc Returns the specified PublicAdvertisedPrefix resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.publicAdvertisedPrefixes.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the PublicAdvertisedPrefix resource to return.
+ * publicAdvertisedPrefix:
+ * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "dnsVerificationIp": "my_dnsVerificationIp",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "publicDelegatedPrefixs": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sharedSecret": "my_sharedSecret",
+ * // "status": "my_status"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.publicAdvertisedPrefixes.get
* @memberOf! ()
*
@@ -52857,6 +80695,99 @@ export namespace compute_alpha {
/**
* compute.publicAdvertisedPrefixes.insert
* @desc Creates a PublicAdvertisedPrefix in the specified project using the parameters that are included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.publicAdvertisedPrefixes.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "dnsVerificationIp": "my_dnsVerificationIp",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "publicDelegatedPrefixs": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sharedSecret": "my_sharedSecret",
+ * // "status": "my_status"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.publicAdvertisedPrefixes.insert
* @memberOf! ()
*
@@ -52933,6 +80864,76 @@ export namespace compute_alpha {
/**
* compute.publicAdvertisedPrefixes.list
* @desc Lists the PublicAdvertisedPrefixes for a project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.publicAdvertisedPrefixes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.publicAdvertisedPrefixes.list
* @memberOf! ()
*
@@ -53019,6 +81020,102 @@ export namespace compute_alpha {
/**
* compute.publicAdvertisedPrefixes.patch
* @desc Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.publicAdvertisedPrefixes.patch({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the PublicAdvertisedPrefix resource to patch.
+ * publicAdvertisedPrefix:
+ * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "dnsVerificationIp": "my_dnsVerificationIp",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "publicDelegatedPrefixs": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sharedSecret": "my_sharedSecret",
+ * // "status": "my_status"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.publicAdvertisedPrefixes.patch
* @memberOf! ()
*
@@ -53218,6 +81315,79 @@ export namespace compute_alpha {
/**
* compute.publicDelegatedPrefixes.aggregatedList
* @desc Lists all PublicDelegatedPrefix resources owned by the specific project across all scopes.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.publicDelegatedPrefixes.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Name of the project scoping this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.publicDelegatedPrefixes.aggregatedList
* @memberOf! ()
*
@@ -53309,6 +81479,83 @@ export namespace compute_alpha {
/**
* compute.publicDelegatedPrefixes.delete
* @desc Deletes the specified PublicDelegatedPrefix in the given region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.publicDelegatedPrefixes.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the PublicDelegatedPrefix resource to delete.
+ * publicDelegatedPrefix: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Name of the region of this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.publicDelegatedPrefixes.delete
* @memberOf! ()
*
@@ -53386,6 +81633,67 @@ export namespace compute_alpha {
/**
* compute.publicDelegatedPrefixes.get
* @desc Returns the specified PublicDelegatedPrefix resource in the given region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.publicDelegatedPrefixes.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the PublicDelegatedPrefix resource to return.
+ * publicDelegatedPrefix: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Name of the region of this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentPrefix": "my_parentPrefix",
+ * // "publicDelegatedSubPrefixs": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.publicDelegatedPrefixes.get
* @memberOf! ()
*
@@ -53464,6 +81772,101 @@ export namespace compute_alpha {
/**
* compute.publicDelegatedPrefixes.insert
* @desc Creates a PublicDelegatedPrefix in the specified project in the given region using the parameters that are included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.publicDelegatedPrefixes.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region of this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentPrefix": "my_parentPrefix",
+ * // "publicDelegatedSubPrefixs": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.publicDelegatedPrefixes.insert
* @memberOf! ()
*
@@ -53541,6 +81944,78 @@ export namespace compute_alpha {
/**
* compute.publicDelegatedPrefixes.list
* @desc Lists the PublicDelegatedPrefixes for a project in the given region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.publicDelegatedPrefixes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region of this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.publicDelegatedPrefixes.list
* @memberOf! ()
*
@@ -53628,6 +82103,103 @@ export namespace compute_alpha {
/**
* compute.publicDelegatedPrefixes.patch
* @desc Patches the specified PublicDelegatedPrefix resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.publicDelegatedPrefixes.patch({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the PublicDelegatedPrefix resource to patch.
+ * publicDelegatedPrefix: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentPrefix": "my_parentPrefix",
+ * // "publicDelegatedSubPrefixs": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.publicDelegatedPrefixes.patch
* @memberOf! ()
*
@@ -53884,6 +82456,83 @@ export namespace compute_alpha {
/**
* compute.regionAutoscalers.delete
* @desc Deletes the specified autoscaler.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.delete({
+ * // Name of the autoscaler to delete.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionAutoscalers.delete
* @memberOf! ()
*
@@ -53961,6 +82610,68 @@ export namespace compute_alpha {
/**
* compute.regionAutoscalers.get
* @desc Returns the specified autoscaler.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.get({
+ * // Name of the autoscaler to return.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionAutoscalers.get
* @memberOf! ()
*
@@ -54037,6 +82748,102 @@ export namespace compute_alpha {
/**
* compute.regionAutoscalers.insert
* @desc Creates an autoscaler in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionAutoscalers.insert
* @memberOf! ()
*
@@ -54114,6 +82921,78 @@ export namespace compute_alpha {
/**
* compute.regionAutoscalers.list
* @desc Retrieves a list of autoscalers contained within the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionAutoscalers.list
* @memberOf! ()
*
@@ -54196,6 +83075,104 @@ export namespace compute_alpha {
/**
* compute.regionAutoscalers.patch
* @desc Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.patch({
+ * // Name of the autoscaler to patch.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionAutoscalers.patch
* @memberOf! ()
*
@@ -54274,6 +83251,63 @@ export namespace compute_alpha {
/**
* compute.regionAutoscalers.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionAutoscalers.testIamPermissions
* @memberOf! ()
*
@@ -54355,6 +83389,104 @@ export namespace compute_alpha {
/**
* compute.regionAutoscalers.update
* @desc Updates an autoscaler in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.update({
+ * // Name of the autoscaler to update.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionAutoscalers.update
* @memberOf! ()
*
@@ -54629,6 +83761,83 @@ export namespace compute_alpha {
/**
* compute.regionBackendServices.delete
* @desc Deletes the specified regional BackendService resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.delete({
+ * // Name of the BackendService resource to delete.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionBackendServices.delete
* @memberOf! ()
*
@@ -54706,6 +83915,86 @@ export namespace compute_alpha {
/**
* compute.regionBackendServices.get
* @desc Returns the specified regional BackendService resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.get({
+ * // Name of the BackendService resource to return.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "securitySettings": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionBackendServices.get
* @memberOf! ()
*
@@ -54782,6 +84071,65 @@ export namespace compute_alpha {
/**
* compute.regionBackendServices.getHealth
* @desc Gets the most recent health check results for this regional BackendService.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.getHealth({
+ * // Name of the BackendService resource for which to get health.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "group": "my_group"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "annotations": {},
+ * // "healthStatus": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionBackendServices.getHealth
* @memberOf! ()
*
@@ -54866,6 +84214,120 @@ export namespace compute_alpha {
/**
* compute.regionBackendServices.insert
* @desc Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Understanding backend services for more information.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "securitySettings": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionBackendServices.insert
* @memberOf! ()
*
@@ -54943,6 +84405,78 @@ export namespace compute_alpha {
/**
* compute.regionBackendServices.list
* @desc Retrieves the list of regional BackendService resources available to the specified project in the given region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionBackendServices.list
* @memberOf! ()
*
@@ -55023,6 +84557,122 @@ export namespace compute_alpha {
/**
* compute.regionBackendServices.patch
* @desc Updates the specified regional BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.patch({
+ * // Name of the BackendService resource to patch.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "securitySettings": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionBackendServices.patch
* @memberOf! ()
*
@@ -55101,6 +84751,63 @@ export namespace compute_alpha {
/**
* compute.regionBackendServices.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionBackendServices.testIamPermissions
* @memberOf! ()
*
@@ -55182,6 +84889,122 @@ export namespace compute_alpha {
/**
* compute.regionBackendServices.update
* @desc Updates the specified regional BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.update({
+ * // Name of the BackendService resource to update.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "securitySettings": {},
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionBackendServices.update
* @memberOf! ()
*
@@ -55481,6 +85304,79 @@ export namespace compute_alpha {
/**
* compute.regionCommitments.aggregatedList
* @desc Retrieves an aggregated list of commitments.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionCommitments.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionCommitments.aggregatedList
* @memberOf! ()
*
@@ -55565,6 +85461,72 @@ export namespace compute_alpha {
/**
* compute.regionCommitments.get
* @desc Returns the specified commitment resource. Gets a list of available commitments by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionCommitments.get({
+ * // Name of the commitment to return.
+ * commitment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "category": "my_category",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTimestamp": "my_endTimestamp",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "licenseResource": {},
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "region": "my_region",
+ * // "reservations": [],
+ * // "resources": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTimestamp": "my_startTimestamp",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionCommitments.get
* @memberOf! ()
*
@@ -55641,6 +85603,106 @@ export namespace compute_alpha {
/**
* compute.regionCommitments.insert
* @desc Creates a commitment in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionCommitments.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "category": "my_category",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTimestamp": "my_endTimestamp",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "licenseResource": {},
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "region": "my_region",
+ * // "reservations": [],
+ * // "resources": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTimestamp": "my_startTimestamp",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionCommitments.insert
* @memberOf! ()
*
@@ -55718,6 +85780,78 @@ export namespace compute_alpha {
/**
* compute.regionCommitments.list
* @desc Retrieves a list of commitments contained within the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionCommitments.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionCommitments.list
* @memberOf! ()
*
@@ -55798,6 +85932,63 @@ export namespace compute_alpha {
/**
* compute.regionCommitments.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionCommitments.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionCommitments.testIamPermissions
* @memberOf! ()
*
@@ -55879,6 +86070,91 @@ export namespace compute_alpha {
/**
* compute.regionCommitments.updateReservations
* @desc Transfers GPUs or local SSDs between reservations within commitments.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionCommitments.updateReservations({
+ * // Name of the commitment for which the reservation is being updated.
+ * commitment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "reservations": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionCommitments.updateReservations
* @memberOf! ()
*
@@ -56136,6 +86412,91 @@ export namespace compute_alpha {
/**
* compute.regionDisks.addResourcePolicies
* @desc Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.addResourcePolicies({
+ * // The disk name for this request.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.addResourcePolicies
* @memberOf! ()
*
@@ -56214,6 +86575,115 @@ export namespace compute_alpha {
/**
* compute.regionDisks.createSnapshot
* @desc Creates a snapshot of this regional disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.createSnapshot({
+ * // Name of the regional persistent disk to snapshot.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // [Input Only] Specifies to create an application consistent snapshot by informing the OS to prepare for the snapshot process. Currently only supported on Windows instances using the Volume Shadow Copy Service (VSS).
+ * guestFlush: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoCreated": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "downloadBytes": "my_downloadBytes",
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "snapshotEncryptionKey": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "status": "my_status",
+ * // "storageBytes": "my_storageBytes",
+ * // "storageBytesStatus": "my_storageBytesStatus",
+ * // "storageLocations": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.createSnapshot
* @memberOf! ()
*
@@ -56293,6 +86763,83 @@ export namespace compute_alpha {
/**
* compute.regionDisks.delete
* @desc Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.delete({
+ * // Name of the regional persistent disk to delete.
+ * disk: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.delete
* @memberOf! ()
*
@@ -56370,6 +86917,93 @@ export namespace compute_alpha {
/**
* compute.regionDisks.get
* @desc Returns a specified regional persistent disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.get({
+ * // Name of the regional persistent disk to return.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskEncryptionKey": {},
+ * // "eraseWindowsVssSignature": false,
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "lastAttachTimestamp": "my_lastAttachTimestamp",
+ * // "lastDetachTimestamp": "my_lastDetachTimestamp",
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "multiWriter": false,
+ * // "name": "my_name",
+ * // "options": "my_options",
+ * // "physicalBlockSizeBytes": "my_physicalBlockSizeBytes",
+ * // "region": "my_region",
+ * // "replicaZones": [],
+ * // "resourcePolicies": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sizeGb": "my_sizeGb",
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceInPlaceSnapshot": "my_sourceInPlaceSnapshot",
+ * // "sourceInPlaceSnapshotId": "my_sourceInPlaceSnapshotId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "sourceStorageObject": "my_sourceStorageObject",
+ * // "status": "my_status",
+ * // "storageType": "my_storageType",
+ * // "type": "my_type",
+ * // "users": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.get
* @memberOf! ()
*
@@ -56443,6 +87077,62 @@ export namespace compute_alpha {
/**
* compute.regionDisks.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.getIamPolicy
* @memberOf! ()
*
@@ -56518,6 +87208,129 @@ export namespace compute_alpha {
/**
* compute.regionDisks.insert
* @desc Creates a persistent regional disk in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Optional. Source image to restore onto a disk.
+ * sourceImage: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskEncryptionKey": {},
+ * // "eraseWindowsVssSignature": false,
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "lastAttachTimestamp": "my_lastAttachTimestamp",
+ * // "lastDetachTimestamp": "my_lastDetachTimestamp",
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "multiWriter": false,
+ * // "name": "my_name",
+ * // "options": "my_options",
+ * // "physicalBlockSizeBytes": "my_physicalBlockSizeBytes",
+ * // "region": "my_region",
+ * // "replicaZones": [],
+ * // "resourcePolicies": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sizeGb": "my_sizeGb",
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceInPlaceSnapshot": "my_sourceInPlaceSnapshot",
+ * // "sourceInPlaceSnapshotId": "my_sourceInPlaceSnapshotId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "sourceStorageObject": "my_sourceStorageObject",
+ * // "status": "my_status",
+ * // "storageType": "my_storageType",
+ * // "type": "my_type",
+ * // "users": [],
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.insert
* @memberOf! ()
*
@@ -56596,6 +87409,78 @@ export namespace compute_alpha {
/**
* compute.regionDisks.list
* @desc Retrieves the list of persistent disks contained within the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.list
* @memberOf! ()
*
@@ -56673,6 +87558,91 @@ export namespace compute_alpha {
/**
* compute.regionDisks.removeResourcePolicies
* @desc Removes resource policies from a regional disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.removeResourcePolicies({
+ * // The disk name for this request.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.removeResourcePolicies
* @memberOf! ()
*
@@ -56753,6 +87723,91 @@ export namespace compute_alpha {
/**
* compute.regionDisks.resize
* @desc Resizes the specified regional persistent disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.resize({
+ * // Name of the regional persistent disk.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sizeGb": "my_sizeGb"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.resize
* @memberOf! ()
*
@@ -56831,6 +87886,69 @@ export namespace compute_alpha {
/**
* compute.regionDisks.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.setIamPolicy
* @memberOf! ()
*
@@ -56906,6 +88024,92 @@ export namespace compute_alpha {
/**
* compute.regionDisks.setLabels
* @desc Sets the labels on the target regional disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.setLabels
* @memberOf! ()
*
@@ -56984,6 +88188,63 @@ export namespace compute_alpha {
/**
* compute.regionDisks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.testIamPermissions
* @memberOf! ()
*
@@ -57403,6 +88664,66 @@ export namespace compute_alpha {
/**
* compute.regionDiskTypes.get
* @desc Returns the specified regional disk type. Gets a list of available disk types by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDiskTypes.get({
+ * // Name of the disk type to return.
+ * diskType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultDiskSizeGb": "my_defaultDiskSizeGb",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "validDiskSize": "my_validDiskSize",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDiskTypes.get
* @memberOf! ()
*
@@ -57477,6 +88798,78 @@ export namespace compute_alpha {
/**
* compute.regionDiskTypes.list
* @desc Retrieves a list of regional disk types available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDiskTypes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDiskTypes.list
* @memberOf! ()
*
@@ -57621,6 +89014,83 @@ export namespace compute_alpha {
/**
* compute.regionHealthChecks.delete
* @desc Deletes the specified HealthCheck resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.delete({
+ * // Name of the HealthCheck resource to delete.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.delete
* @memberOf! ()
*
@@ -57698,6 +89168,75 @@ export namespace compute_alpha {
/**
* compute.regionHealthChecks.get
* @desc Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.get({
+ * // Name of the HealthCheck resource to return.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "grpcHealthCheck": {},
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "udpHealthCheck": {},
+ * // "unhealthyThreshold": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.get
* @memberOf! ()
*
@@ -57774,6 +89313,109 @@ export namespace compute_alpha {
/**
* compute.regionHealthChecks.insert
* @desc Creates a HealthCheck resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "grpcHealthCheck": {},
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "udpHealthCheck": {},
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.insert
* @memberOf! ()
*
@@ -57851,6 +89493,78 @@ export namespace compute_alpha {
/**
* compute.regionHealthChecks.list
* @desc Retrieves the list of HealthCheck resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.list
* @memberOf! ()
*
@@ -57931,6 +89645,111 @@ export namespace compute_alpha {
/**
* compute.regionHealthChecks.patch
* @desc Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.patch({
+ * // Name of the HealthCheck resource to patch.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "grpcHealthCheck": {},
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "udpHealthCheck": {},
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.patch
* @memberOf! ()
*
@@ -58009,6 +89828,63 @@ export namespace compute_alpha {
/**
* compute.regionHealthChecks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.testIamPermissions
* @memberOf! ()
*
@@ -58090,6 +89966,111 @@ export namespace compute_alpha {
/**
* compute.regionHealthChecks.update
* @desc Updates a HealthCheck resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.update({
+ * // Name of the HealthCheck resource to update.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "grpcHealthCheck": {},
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "udpHealthCheck": {},
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.update
* @memberOf! ()
*
@@ -58364,6 +90345,83 @@ export namespace compute_alpha {
/**
* compute.regionHealthCheckServices.delete
* @desc Deletes the specified regional HealthCheckService.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthCheckServices.delete({
+ * // Name of the HealthCheckService to delete. The name must be 1-63 characters long, and comply with RFC1035.
+ * healthCheckService: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthCheckServices.delete
* @memberOf! ()
*
@@ -58441,6 +90499,68 @@ export namespace compute_alpha {
/**
* compute.regionHealthCheckServices.get
* @desc Returns the specified regional HealthCheckService resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthCheckServices.get({
+ * // Name of the HealthCheckService to update. The name must be 1-63 characters long, and comply with RFC1035.
+ * healthCheckService: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "healthStatusAggregationPolicy": "my_healthStatusAggregationPolicy",
+ * // "healthStatusAggregationStrategy": "my_healthStatusAggregationStrategy",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "networkEndpointGroups": [],
+ * // "notificationEndpoints": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthCheckServices.get
* @memberOf! ()
*
@@ -58517,6 +90637,102 @@ export namespace compute_alpha {
/**
* compute.regionHealthCheckServices.insert
* @desc Creates a regional HealthCheckService resource in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthCheckServices.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "healthStatusAggregationPolicy": "my_healthStatusAggregationPolicy",
+ * // "healthStatusAggregationStrategy": "my_healthStatusAggregationStrategy",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "networkEndpointGroups": [],
+ * // "notificationEndpoints": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthCheckServices.insert
* @memberOf! ()
*
@@ -58594,6 +90810,78 @@ export namespace compute_alpha {
/**
* compute.regionHealthCheckServices.list
* @desc Lists all the HealthCheckService resources that have been configured for the specified project in the given region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthCheckServices.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthCheckServices.list
* @memberOf! ()
*
@@ -58676,6 +90964,104 @@ export namespace compute_alpha {
/**
* compute.regionHealthCheckServices.patch
* @desc Updates the specified regional HealthCheckService resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthCheckServices.patch({
+ * // Name of the HealthCheckService to update. The name must be 1-63 characters long, and comply with RFC1035.
+ * healthCheckService: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "healthStatusAggregationPolicy": "my_healthStatusAggregationPolicy",
+ * // "healthStatusAggregationStrategy": "my_healthStatusAggregationStrategy",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "networkEndpointGroups": [],
+ * // "notificationEndpoints": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthCheckServices.patch
* @memberOf! ()
*
@@ -58754,6 +91140,63 @@ export namespace compute_alpha {
/**
* compute.regionHealthCheckServices.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthCheckServices.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthCheckServices.testIamPermissions
* @memberOf! ()
*
@@ -59002,6 +91445,83 @@ export namespace compute_alpha {
/**
* compute.regionInPlaceSnapshots.delete
* @desc Deletes the specified InPlaceSnapshot resource. Keep in mind that deleting a single inPlaceSnapshot might not necessarily delete all the data on that inPlaceSnapshot. If any data on the inPlaceSnapshot that is marked for deletion is needed for subsequent inPlaceSnapshots, the data will be moved to the next corresponding inPlaceSnapshot. For more information, see Deleting inPlaceSnapshots.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInPlaceSnapshots.delete({
+ * // Name of the InPlaceSnapshot resource to delete.
+ * inPlaceSnapshot: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInPlaceSnapshots.delete
* @memberOf! ()
*
@@ -59079,6 +91599,70 @@ export namespace compute_alpha {
/**
* compute.regionInPlaceSnapshots.get
* @desc Returns the specified InPlaceSnapshot resource in the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInPlaceSnapshots.get({
+ * // Name of the InPlaceSnapshot resource to return.
+ * inPlaceSnapshot: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "guestFlush": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInPlaceSnapshots.get
* @memberOf! ()
*
@@ -59155,6 +91739,62 @@ export namespace compute_alpha {
/**
* compute.regionInPlaceSnapshots.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInPlaceSnapshots.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInPlaceSnapshots.getIamPolicy
* @memberOf! ()
*
@@ -59230,6 +91870,104 @@ export namespace compute_alpha {
/**
* compute.regionInPlaceSnapshots.insert
* @desc Creates an in-place snapshot in the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInPlaceSnapshots.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "guestFlush": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInPlaceSnapshots.insert
* @memberOf! ()
*
@@ -59307,6 +92045,78 @@ export namespace compute_alpha {
/**
* compute.regionInPlaceSnapshots.list
* @desc Retrieves the list of InPlaceSnapshot resources contained within the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInPlaceSnapshots.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInPlaceSnapshots.list
* @memberOf! ()
*
@@ -59387,6 +92197,69 @@ export namespace compute_alpha {
/**
* compute.regionInPlaceSnapshots.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInPlaceSnapshots.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInPlaceSnapshots.setIamPolicy
* @memberOf! ()
*
@@ -59462,6 +92335,92 @@ export namespace compute_alpha {
/**
* compute.regionInPlaceSnapshots.setLabels
* @desc Sets the labels on a inPlaceSnapshot in the given region. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInPlaceSnapshots.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInPlaceSnapshots.setLabels
* @memberOf! ()
*
@@ -59540,6 +92499,63 @@ export namespace compute_alpha {
/**
* compute.regionInPlaceSnapshots.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInPlaceSnapshots.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInPlaceSnapshots.testIamPermissions
* @memberOf! ()
*
@@ -59837,6 +92853,91 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.abandonInstances
* @desc Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.abandonInstances({
+ * // Name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.abandonInstances
* @memberOf! ()
*
@@ -59915,6 +93016,90 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.applyUpdatesToInstances
* @desc Apply updates to selected instances the managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.applyUpdatesToInstances(
+ * {
+ * // The name of the managed instance group, should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request, should conform to RFC1035.
+ * region: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": [],
+ * // "maximalAction": "my_maximalAction",
+ * // "minimalAction": "my_minimalAction",
+ * // "mostDisruptiveAllowedAction": "my_mostDisruptiveAllowedAction"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.applyUpdatesToInstances
* @memberOf! ()
*
@@ -59994,6 +93179,91 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.createInstances
* @desc Creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.createInstances({
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region where the managed instance group is located. It should conform to RFC1035.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.createInstances
* @memberOf! ()
*
@@ -60072,6 +93342,83 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.delete
* @desc Deletes the specified managed instance group and all of the instances in that group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.delete({
+ * // Name of the managed instance group to delete.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.delete
* @memberOf! ()
*
@@ -60149,6 +93496,91 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.deleteInstances
* @desc Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.deleteInstances({
+ * // Name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.deleteInstances
* @memberOf! ()
*
@@ -60227,6 +93659,87 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.deletePerInstanceConfigs
* @desc Deletes selected per-instance configs for the managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.deletePerInstanceConfigs(
+ * {
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request, should conform to RFC1035.
+ * region: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "names": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.deletePerInstanceConfigs
* @memberOf! ()
*
@@ -60306,6 +93819,80 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.get
* @desc Returns all of the details about the specified managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.get({
+ * // Name of the managed instance group to return.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "failoverAction": "my_failoverAction",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "pendingActions": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "statefulPolicy": {},
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.get
* @memberOf! ()
*
@@ -60384,6 +93971,114 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.insert
* @desc Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A regional managed instance group can contain up to 2000 instances.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "failoverAction": "my_failoverAction",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "pendingActions": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "statefulPolicy": {},
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.insert
* @memberOf! ()
*
@@ -60461,6 +94156,78 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.list
* @desc Retrieves the list of managed instance groups that are contained within the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.list
* @memberOf! ()
*
@@ -60550,6 +94317,76 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.listErrors
* @desc Lists all errors thrown by actions on instances for a given regional managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.listErrors({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}.
+ * instanceGroupManager: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request. This should conform to RFC1035.
+ * region: 'placeholder-value',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.listErrors
* @memberOf! ()
*
@@ -60656,6 +94493,74 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.listManagedInstances
* @desc Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.listManagedInstances({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "managedInstances": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.listManagedInstances
* @memberOf! ()
*
@@ -60760,6 +94665,77 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.listPerInstanceConfigs
* @desc Lists all of the per-instance configs defined for the managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.listPerInstanceConfigs({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request, should conform to RFC1035.
+ * region: 'placeholder-value',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.listPerInstanceConfigs
* @memberOf! ()
*
@@ -60865,6 +94841,116 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.patch
* @desc Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.patch({
+ * // The name of the instance group manager.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "failoverAction": "my_failoverAction",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "pendingActions": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "statefulPolicy": {},
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.patch
* @memberOf! ()
*
@@ -60943,6 +95029,93 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.patchPerInstanceConfigs
* @desc Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.patchPerInstanceConfigs(
+ * {
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request, should conform to RFC1035.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "perInstanceConfigs": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.patchPerInstanceConfigs
* @memberOf! ()
*
@@ -61023,6 +95196,91 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.recreateInstances
* @desc Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.recreateInstances({
+ * // Name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.recreateInstances
* @memberOf! ()
*
@@ -61101,6 +95359,85 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.resize
* @desc Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.resize({
+ * // Name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Number of instances that should exist in this instance group manager.
+ * size: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.resize
* @memberOf! ()
*
@@ -61179,6 +95516,91 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.setAutoHealingPolicies
* @desc Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Please use Patch instead.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.setAutoHealingPolicies({
+ * // Name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.setAutoHealingPolicies
* @memberOf! ()
*
@@ -61259,6 +95681,91 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.setInstanceTemplate
* @desc Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.setInstanceTemplate({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instanceTemplate": "my_instanceTemplate"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.setInstanceTemplate
* @memberOf! ()
*
@@ -61337,6 +95844,92 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.setTargetPools
* @desc Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.setTargetPools({
+ * // Name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "targetPools": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.setTargetPools
* @memberOf! ()
*
@@ -61415,6 +96008,63 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.testIamPermissions
* @memberOf! ()
*
@@ -61496,6 +96146,116 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.update
* @desc Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.update({
+ * // The name of the instance group manager.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "failoverAction": "my_failoverAction",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "pendingActions": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "statefulPolicy": {},
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.update
* @memberOf! ()
*
@@ -61574,6 +96334,93 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroupManagers.updatePerInstanceConfigs
* @desc Insert or update (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.updatePerInstanceConfigs(
+ * {
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request, should conform to RFC1035.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "perInstanceConfigs": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.updatePerInstanceConfigs
* @memberOf! ()
*
@@ -62305,6 +97152,68 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroups.get
* @desc Returns the specified instance group resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroups.get({
+ * // Name of the instance group resource to return.
+ * instanceGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroups.get
* @memberOf! ()
*
@@ -62381,6 +97290,78 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroups.list
* @desc Retrieves the list of instance group resources contained within the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroups.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroups.list
* @memberOf! ()
*
@@ -62463,6 +97444,89 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroups.listInstances
* @desc Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroups.listInstances({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Name of the regional instance group for which we want to list the instances.
+ * instanceGroup: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instanceState": "my_instanceState",
+ * // "portName": "my_portName"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroups.listInstances
* @memberOf! ()
*
@@ -62554,6 +97618,92 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroups.setNamedPorts
* @desc Sets the named ports for the specified regional instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroups.setNamedPorts({
+ * // The name of the regional instance group where the named ports are updated.
+ * instanceGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "namedPorts": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroups.setNamedPorts
* @memberOf! ()
*
@@ -62632,6 +97782,63 @@ export namespace compute_alpha {
/**
* compute.regionInstanceGroups.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroups.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroups.testIamPermissions
* @memberOf! ()
*
@@ -62876,6 +98083,94 @@ export namespace compute_alpha {
/**
* compute.regionInstances.bulkInsert
* @desc Creates multiple instances in a given region. Count specifies the number of instances to create.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstances.bulkInsert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "count": "my_count",
+ * // "excludedZones": [],
+ * // "instance": {},
+ * // "minCount": "my_minCount",
+ * // "predefinedNames": [],
+ * // "sourceInstanceTemplate": "my_sourceInstanceTemplate"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstances.bulkInsert
* @memberOf! ()
*
@@ -62986,6 +98281,83 @@ export namespace compute_alpha {
/**
* compute.regionNetworkEndpointGroups.delete
* @desc Deletes the specified network endpoint group. Note that the NEG cannot be deleted if it is configured as a backend of a backend service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionNetworkEndpointGroups.delete({
+ * // The name of the network endpoint group to delete. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region where the network endpoint group is located. It should comply with RFC1035.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionNetworkEndpointGroups.delete
* @memberOf! ()
*
@@ -63063,6 +98435,74 @@ export namespace compute_alpha {
/**
* compute.regionNetworkEndpointGroups.get
* @desc Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionNetworkEndpointGroups.get({
+ * // The name of the network endpoint group. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region where the network endpoint group is located. It should comply with RFC1035.
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "annotations": {},
+ * // "appEngine": {},
+ * // "cloudFunction": {},
+ * // "cloudRun": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultPort": 0,
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancer": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkEndpointType": "my_networkEndpointType",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "type": "my_type",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionNetworkEndpointGroups.get
* @memberOf! ()
*
@@ -63141,6 +98581,108 @@ export namespace compute_alpha {
/**
* compute.regionNetworkEndpointGroups.insert
* @desc Creates a network endpoint group in the specified project using the parameters that are included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionNetworkEndpointGroups.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region where you want to create the network endpoint group. It should comply with RFC1035.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "annotations": {},
+ * // "appEngine": {},
+ * // "cloudFunction": {},
+ * // "cloudRun": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultPort": 0,
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancer": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkEndpointType": "my_networkEndpointType",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "type": "my_type",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionNetworkEndpointGroups.insert
* @memberOf! ()
*
@@ -63218,6 +98760,78 @@ export namespace compute_alpha {
/**
* compute.regionNetworkEndpointGroups.list
* @desc Retrieves the list of regional network endpoint groups available to the specified project in the given region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionNetworkEndpointGroups.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region where the network endpoint group is located. It should comply with RFC1035.
+ * region: 'placeholder-value',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionNetworkEndpointGroups.list
* @memberOf! ()
*
@@ -63413,6 +99027,83 @@ export namespace compute_alpha {
/**
* compute.regionNotificationEndpoints.delete
* @desc Deletes the specified NotificationEndpoint in the given region
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionNotificationEndpoints.delete({
+ * // Name of the NotificationEndpoint resource to delete.
+ * notificationEndpoint: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionNotificationEndpoints.delete
* @memberOf! ()
*
@@ -63490,6 +99181,62 @@ export namespace compute_alpha {
/**
* compute.regionNotificationEndpoints.get
* @desc Returns the specified NotificationEndpoint resource in the given region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionNotificationEndpoints.get({
+ * // Name of the NotificationEndpoint resource to return.
+ * notificationEndpoint: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "grpcSettings": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionNotificationEndpoints.get
* @memberOf! ()
*
@@ -63568,6 +99315,96 @@ export namespace compute_alpha {
/**
* compute.regionNotificationEndpoints.insert
* @desc Create a NotificationEndpoint in the specified project in the given region using the parameters that are included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionNotificationEndpoints.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "grpcSettings": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionNotificationEndpoints.insert
* @memberOf! ()
*
@@ -63645,6 +99482,78 @@ export namespace compute_alpha {
/**
* compute.regionNotificationEndpoints.list
* @desc Lists the NotificationEndpoints for a project in the given region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionNotificationEndpoints.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionNotificationEndpoints.list
* @memberOf! ()
*
@@ -63727,6 +99636,63 @@ export namespace compute_alpha {
/**
* compute.regionNotificationEndpoints.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionNotificationEndpoints.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionNotificationEndpoints.testIamPermissions
* @memberOf! ()
*
@@ -63946,6 +99912,49 @@ export namespace compute_alpha {
/**
* compute.regionOperations.delete
* @desc Deletes the specified region-specific Operations resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionOperations.delete({
+ * // Name of the Operations resource to delete.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionOperations.delete
* @memberOf! ()
*
@@ -64020,6 +100029,78 @@ export namespace compute_alpha {
/**
* compute.regionOperations.get
* @desc Retrieves the specified region-specific Operations resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionOperations.get({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionOperations.get
* @memberOf! ()
*
@@ -64096,6 +100177,78 @@ export namespace compute_alpha {
/**
* compute.regionOperations.list
* @desc Retrieves a list of Operation resources contained within the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionOperations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionOperations.list
* @memberOf! ()
*
@@ -64176,6 +100329,78 @@ export namespace compute_alpha {
/**
* compute.regionOperations.wait
* @desc Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be `DONE` or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not `DONE`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionOperations.wait({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionOperations.wait
* @memberOf! ()
*
@@ -64356,6 +100581,63 @@ export namespace compute_alpha {
/**
* compute.regions.get
* @desc Returns the specified Region resource. Gets a list of available regions by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regions.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region resource to return.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "quotas": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "status": "my_status",
+ * // "zones": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regions.get
* @memberOf! ()
*
@@ -64427,6 +100709,76 @@ export namespace compute_alpha {
/**
* compute.regions.list
* @desc Retrieves the list of region resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regions.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regions.list
* @memberOf! ()
*
@@ -64558,6 +100910,83 @@ export namespace compute_alpha {
/**
* compute.regionSslCertificates.delete
* @desc Deletes the specified SslCertificate resource in the region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionSslCertificates.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the SslCertificate resource to delete.
+ * sslCertificate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionSslCertificates.delete
* @memberOf! ()
*
@@ -64635,6 +101064,69 @@ export namespace compute_alpha {
/**
* compute.regionSslCertificates.get
* @desc Returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionSslCertificates.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the SslCertificate resource to return.
+ * sslCertificate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificate": "my_certificate",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "managed": {},
+ * // "name": "my_name",
+ * // "privateKey": "my_privateKey",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "selfManaged": {},
+ * // "subjectAlternativeNames": [],
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionSslCertificates.get
* @memberOf! ()
*
@@ -64711,6 +101203,103 @@ export namespace compute_alpha {
/**
* compute.regionSslCertificates.insert
* @desc Creates a SslCertificate resource in the specified project and region using the data included in the request
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionSslCertificates.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "certificate": "my_certificate",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "managed": {},
+ * // "name": "my_name",
+ * // "privateKey": "my_privateKey",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "selfManaged": {},
+ * // "subjectAlternativeNames": [],
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionSslCertificates.insert
* @memberOf! ()
*
@@ -64788,6 +101377,78 @@ export namespace compute_alpha {
/**
* compute.regionSslCertificates.list
* @desc Retrieves the list of SslCertificate resources available to the specified project in the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionSslCertificates.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionSslCertificates.list
* @memberOf! ()
*
@@ -64868,6 +101529,63 @@ export namespace compute_alpha {
/**
* compute.regionSslCertificates.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource and region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionSslCertificates.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionSslCertificates.testIamPermissions
* @memberOf! ()
*
@@ -65087,6 +101805,83 @@ export namespace compute_alpha {
/**
* compute.regionTargetHttpProxies.delete
* @desc Deletes the specified TargetHttpProxy resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpProxies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpProxy resource to delete.
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpProxies.delete
* @memberOf! ()
*
@@ -65164,6 +101959,65 @@ export namespace compute_alpha {
/**
* compute.regionTargetHttpProxies.get
* @desc Returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpProxies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the TargetHttpProxy resource to return.
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "httpFilters": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyBind": false,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpProxies.get
* @memberOf! ()
*
@@ -65240,6 +102094,99 @@ export namespace compute_alpha {
/**
* compute.regionTargetHttpProxies.insert
* @desc Creates a TargetHttpProxy resource in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpProxies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "httpFilters": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyBind": false,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpProxies.insert
* @memberOf! ()
*
@@ -65317,6 +102264,78 @@ export namespace compute_alpha {
/**
* compute.regionTargetHttpProxies.list
* @desc Retrieves the list of TargetHttpProxy resources available to the specified project in the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpProxies.list
* @memberOf! ()
*
@@ -65397,6 +102416,91 @@ export namespace compute_alpha {
/**
* compute.regionTargetHttpProxies.setUrlMap
* @desc Changes the URL map for TargetHttpProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpProxies.setUrlMap({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpProxy to set a URL map for.
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "urlMap": "my_urlMap"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpProxies.setUrlMap
* @memberOf! ()
*
@@ -65475,6 +102579,63 @@ export namespace compute_alpha {
/**
* compute.regionTargetHttpProxies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpProxies.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpProxies.testIamPermissions
* @memberOf! ()
*
@@ -65723,6 +102884,83 @@ export namespace compute_alpha {
/**
* compute.regionTargetHttpsProxies.delete
* @desc Deletes the specified TargetHttpsProxy resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy resource to delete.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.delete
* @memberOf! ()
*
@@ -65800,6 +103038,70 @@ export namespace compute_alpha {
/**
* compute.regionTargetHttpsProxies.get
* @desc Returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the TargetHttpsProxy resource to return.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "authentication": "my_authentication",
+ * // "authorization": "my_authorization",
+ * // "certificateMap": "my_certificateMap",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyBind": false,
+ * // "quicOverride": "my_quicOverride",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.get
* @memberOf! ()
*
@@ -65876,6 +103178,104 @@ export namespace compute_alpha {
/**
* compute.regionTargetHttpsProxies.insert
* @desc Creates a TargetHttpsProxy resource in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "authentication": "my_authentication",
+ * // "authorization": "my_authorization",
+ * // "certificateMap": "my_certificateMap",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyBind": false,
+ * // "quicOverride": "my_quicOverride",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.insert
* @memberOf! ()
*
@@ -65953,6 +103353,78 @@ export namespace compute_alpha {
/**
* compute.regionTargetHttpsProxies.list
* @desc Retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.list
* @memberOf! ()
*
@@ -66035,6 +103507,91 @@ export namespace compute_alpha {
/**
* compute.regionTargetHttpsProxies.setSslCertificates
* @desc Replaces SslCertificates for TargetHttpsProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.setSslCertificates({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy resource to set an SslCertificates resource for.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sslCertificates": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.setSslCertificates
* @memberOf! ()
*
@@ -66113,6 +103670,91 @@ export namespace compute_alpha {
/**
* compute.regionTargetHttpsProxies.setUrlMap
* @desc Changes the URL map for TargetHttpsProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.setUrlMap({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy to set a URL map for.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "urlMap": "my_urlMap"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.setUrlMap
* @memberOf! ()
*
@@ -66191,6 +103833,63 @@ export namespace compute_alpha {
/**
* compute.regionTargetHttpsProxies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.testIamPermissions
* @memberOf! ()
*
@@ -66468,6 +104167,79 @@ export namespace compute_alpha {
/**
* compute.regionUrlMaps.delete
* @desc Deletes the specified UrlMap resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
+ * requestId: 'placeholder-value',
+ * // Name of the UrlMap resource to delete.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.delete
* @memberOf! ()
*
@@ -66545,6 +104317,69 @@ export namespace compute_alpha {
/**
* compute.regionUrlMaps.get
* @desc Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the UrlMap resource to return.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.get
* @memberOf! ()
*
@@ -66619,6 +104454,99 @@ export namespace compute_alpha {
/**
* compute.regionUrlMaps.insert
* @desc Creates a UrlMap resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.insert
* @memberOf! ()
*
@@ -66696,6 +104624,88 @@ export namespace compute_alpha {
/**
* compute.regionUrlMaps.invalidateCache
* @desc Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.invalidateCache({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
+ * requestId: 'placeholder-value',
+ * // Name of the UrlMap scoping this request.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "host": "my_host",
+ * // "path": "my_path"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.invalidateCache
* @memberOf! ()
*
@@ -66774,6 +104784,78 @@ export namespace compute_alpha {
/**
* compute.regionUrlMaps.list
* @desc Retrieves the list of UrlMap resources available to the specified project in the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.list
* @memberOf! ()
*
@@ -66854,6 +104936,101 @@ export namespace compute_alpha {
/**
* compute.regionUrlMaps.patch
* @desc Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.patch({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
+ * requestId: 'placeholder-value',
+ * // Name of the UrlMap resource to patch.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.patch
* @memberOf! ()
*
@@ -66932,6 +105109,63 @@ export namespace compute_alpha {
/**
* compute.regionUrlMaps.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.testIamPermissions
* @memberOf! ()
*
@@ -67013,6 +105247,101 @@ export namespace compute_alpha {
/**
* compute.regionUrlMaps.update
* @desc Updates the specified UrlMap resource with the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.update({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
+ * requestId: 'placeholder-value',
+ * // Name of the UrlMap resource to update.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.update
* @memberOf! ()
*
@@ -67091,6 +105420,62 @@ export namespace compute_alpha {
/**
* compute.regionUrlMaps.validate
* @desc Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.validate({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the UrlMap resource to be validated as.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resource": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "result": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.validate
* @memberOf! ()
*
@@ -67422,6 +105807,79 @@ export namespace compute_alpha {
/**
* compute.reservations.aggregatedList
* @desc Retrieves an aggregated list of reservations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.aggregatedList
* @memberOf! ()
*
@@ -67509,6 +105967,83 @@ export namespace compute_alpha {
/**
* compute.reservations.delete
* @desc Deletes the specified reservation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the reservation to delete.
+ * reservation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.delete
* @memberOf! ()
*
@@ -67586,6 +106121,66 @@ export namespace compute_alpha {
/**
* compute.reservations.get
* @desc Retrieves information about the specified reservation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the reservation to retrieve.
+ * reservation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commitment": "my_commitment",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "specificReservation": {},
+ * // "specificReservationRequired": false,
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.get
* @memberOf! ()
*
@@ -67661,6 +106256,62 @@ export namespace compute_alpha {
/**
* compute.reservations.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.getIamPolicy
* @memberOf! ()
*
@@ -67736,6 +106387,100 @@ export namespace compute_alpha {
/**
* compute.reservations.insert
* @desc Creates a new reservation. For more information, read Reserving zonal resources.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "commitment": "my_commitment",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "specificReservation": {},
+ * // "specificReservationRequired": false,
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.insert
* @memberOf! ()
*
@@ -67813,6 +106558,78 @@ export namespace compute_alpha {
/**
* compute.reservations.list
* @desc A list of all the reservations that have been configured for the specified project in specified zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.list
* @memberOf! ()
*
@@ -67893,6 +106710,91 @@ export namespace compute_alpha {
/**
* compute.reservations.resize
* @desc Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.resize({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the reservation to update.
+ * reservation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "specificSkuCount": "my_specificSkuCount"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.resize
* @memberOf! ()
*
@@ -67971,6 +106873,69 @@ export namespace compute_alpha {
/**
* compute.reservations.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.setIamPolicy
* @memberOf! ()
*
@@ -68046,6 +107011,63 @@ export namespace compute_alpha {
/**
* compute.reservations.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.testIamPermissions
* @memberOf! ()
*
@@ -68378,6 +107400,80 @@ export namespace compute_alpha {
/**
* compute.resourcePolicies.aggregatedList
* @desc Retrieves an aggregated list of resource policies.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.aggregatedList
* @memberOf! ()
*
@@ -68467,6 +107563,83 @@ export namespace compute_alpha {
/**
* compute.resourcePolicies.delete
* @desc Deletes the specified resource policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the resource policy to delete.
+ * resourcePolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.delete
* @memberOf! ()
*
@@ -68544,6 +107717,66 @@ export namespace compute_alpha {
/**
* compute.resourcePolicies.get
* @desc Retrieves all information of the specified resource policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the resource policy to retrieve.
+ * resourcePolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "groupPlacementPolicy": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "snapshotSchedulePolicy": {},
+ * // "status": "my_status",
+ * // "vmMaintenancePolicy": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.get
* @memberOf! ()
*
@@ -68620,6 +107853,62 @@ export namespace compute_alpha {
/**
* compute.resourcePolicies.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.getIamPolicy
* @memberOf! ()
*
@@ -68695,6 +107984,100 @@ export namespace compute_alpha {
/**
* compute.resourcePolicies.insert
* @desc Creates a new resource policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "groupPlacementPolicy": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "snapshotSchedulePolicy": {},
+ * // "status": "my_status",
+ * // "vmMaintenancePolicy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.insert
* @memberOf! ()
*
@@ -68772,6 +108155,79 @@ export namespace compute_alpha {
/**
* compute.resourcePolicies.list
* @desc A list all the resource policies that have been configured for the specified project in specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.list
* @memberOf! ()
*
@@ -68852,6 +108308,69 @@ export namespace compute_alpha {
/**
* compute.resourcePolicies.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.setIamPolicy
* @memberOf! ()
*
@@ -68927,6 +108446,63 @@ export namespace compute_alpha {
/**
* compute.resourcePolicies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.testIamPermissions
* @memberOf! ()
*
@@ -69231,6 +108807,79 @@ export namespace compute_alpha {
/**
* compute.routers.aggregatedList
* @desc Retrieves an aggregated list of routers.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routers.aggregatedList
* @memberOf! ()
*
@@ -69314,6 +108963,83 @@ export namespace compute_alpha {
/**
* compute.routers.delete
* @desc Deletes the specified Router resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the Router resource to delete.
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routers.delete
* @memberOf! ()
*
@@ -69390,6 +109116,67 @@ export namespace compute_alpha {
/**
* compute.routers.get
* @desc Returns the specified Router resource. Gets a list of available routers by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the Router resource to return.
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bgp": {},
+ * // "bgpPeers": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nats": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routers.get
* @memberOf! ()
*
@@ -69463,6 +109250,82 @@ export namespace compute_alpha {
/**
* compute.routers.getNatMappingInfo
* @desc Retrieves runtime Nat mapping information of VM endpoints.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.getNatMappingInfo({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Name of the nat service to filter the Nat Mapping information. If it is omitted, all nats for this router will be returned. Name should conform to RFC1035.
+ * natName: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // Name of the Router resource to query for Nat Mapping information of VM endpoints.
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "result": [],
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routers.getNatMappingInfo
* @memberOf! ()
*
@@ -69552,6 +109415,56 @@ export namespace compute_alpha {
/**
* compute.routers.getRouterStatus
* @desc Retrieves runtime information of the specified router.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.getRouterStatus({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the Router resource to query.
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "result": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routers.getRouterStatus
* @memberOf! ()
*
@@ -69632,6 +109545,101 @@ export namespace compute_alpha {
/**
* compute.routers.insert
* @desc Creates a Router resource in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bgp": {},
+ * // "bgpPeers": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nats": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routers.insert
* @memberOf! ()
*
@@ -69708,6 +109716,78 @@ export namespace compute_alpha {
/**
* compute.routers.list
* @desc Retrieves a list of Router resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routers.list
* @memberOf! ()
*
@@ -69787,6 +109867,103 @@ export namespace compute_alpha {
/**
* compute.routers.patch
* @desc Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.patch({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the Router resource to patch.
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bgp": {},
+ * // "bgpPeers": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nats": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routers.patch
* @memberOf! ()
*
@@ -69864,6 +110041,75 @@ export namespace compute_alpha {
/**
* compute.routers.preview
* @desc Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.preview({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the Router resource to query.
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bgp": {},
+ * // "bgpPeers": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nats": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "resource": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routers.preview
* @memberOf! ()
*
@@ -69944,6 +110190,63 @@ export namespace compute_alpha {
/**
* compute.routers.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routers.testIamPermissions
* @memberOf! ()
*
@@ -70025,6 +110328,103 @@ export namespace compute_alpha {
/**
* compute.routers.update
* @desc Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.update({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the Router resource to update.
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bgp": {},
+ * // "bgpPeers": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nats": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routers.update
* @memberOf! ()
*
@@ -70416,6 +110816,81 @@ export namespace compute_alpha {
/**
* compute.routes.delete
* @desc Deletes the specified Route resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routes.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the Route resource to delete.
+ * route: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routes.delete
* @memberOf! ()
*
@@ -70491,6 +110966,72 @@ export namespace compute_alpha {
/**
* compute.routes.get
* @desc Returns the specified Route resource. Gets a list of available routes by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routes.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the Route resource to return.
+ * route: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "destRange": "my_destRange",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "nextHopGateway": "my_nextHopGateway",
+ * // "nextHopIlb": "my_nextHopIlb",
+ * // "nextHopInstance": "my_nextHopInstance",
+ * // "nextHopInterconnectAttachment": "my_nextHopInterconnectAttachment",
+ * // "nextHopIp": "my_nextHopIp",
+ * // "nextHopNetwork": "my_nextHopNetwork",
+ * // "nextHopPeering": "my_nextHopPeering",
+ * // "nextHopVpnTunnel": "my_nextHopVpnTunnel",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "tags": [],
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routes.get
* @memberOf! ()
*
@@ -70563,6 +111104,106 @@ export namespace compute_alpha {
/**
* compute.routes.insert
* @desc Creates a Route resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routes.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "destRange": "my_destRange",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "nextHopGateway": "my_nextHopGateway",
+ * // "nextHopIlb": "my_nextHopIlb",
+ * // "nextHopInstance": "my_nextHopInstance",
+ * // "nextHopInterconnectAttachment": "my_nextHopInterconnectAttachment",
+ * // "nextHopIp": "my_nextHopIp",
+ * // "nextHopNetwork": "my_nextHopNetwork",
+ * // "nextHopPeering": "my_nextHopPeering",
+ * // "nextHopVpnTunnel": "my_nextHopVpnTunnel",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "tags": [],
+ * // "warnings": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routes.insert
* @memberOf! ()
*
@@ -70637,6 +111278,76 @@ export namespace compute_alpha {
/**
* compute.routes.list
* @desc Retrieves the list of Route resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routes.list
* @memberOf! ()
*
@@ -70714,6 +111425,61 @@ export namespace compute_alpha {
/**
* compute.routes.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routes.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routes.testIamPermissions
* @memberOf! ()
*
@@ -70908,6 +111674,96 @@ export namespace compute_alpha {
/**
* compute.securityPolicies.addRule
* @desc Inserts a rule into a security policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.addRule({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the security policy to update.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // If true, the request will not be committed.
+ * validateOnly: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "direction": "my_direction",
+ * // "enableLogging": false,
+ * // "kind": "my_kind",
+ * // "match": {},
+ * // "preview": false,
+ * // "priority": 0,
+ * // "rateLimitOptions": {},
+ * // "ruleTupleCount": 0,
+ * // "targetResources": [],
+ * // "targetServiceAccounts": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.addRule
* @memberOf! ()
*
@@ -70985,6 +111841,81 @@ export namespace compute_alpha {
/**
* compute.securityPolicies.delete
* @desc Deletes the specified policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to delete.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.delete
* @memberOf! ()
*
@@ -71061,6 +111992,69 @@ export namespace compute_alpha {
/**
* compute.securityPolicies.get
* @desc List all of the ordered rules present in a single specified policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the security policy to get.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "associations": [],
+ * // "cloudArmorConfig": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "ruleTupleCount": 0,
+ * // "rules": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.get
* @memberOf! ()
*
@@ -71136,6 +112130,66 @@ export namespace compute_alpha {
/**
* compute.securityPolicies.getRule
* @desc Gets a rule at the specified priority.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.getRule({
+ * // The priority of the rule to get from the security policy.
+ * priority: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the security policy to which the queried rule belongs.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "direction": "my_direction",
+ * // "enableLogging": false,
+ * // "kind": "my_kind",
+ * // "match": {},
+ * // "preview": false,
+ * // "priority": 0,
+ * // "rateLimitOptions": {},
+ * // "ruleTupleCount": 0,
+ * // "targetResources": [],
+ * // "targetServiceAccounts": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.getRule
* @memberOf! ()
*
@@ -71212,6 +112266,105 @@ export namespace compute_alpha {
/**
* compute.securityPolicies.insert
* @desc Creates a new policy in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // If true, the request will not be committed.
+ * validateOnly: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "associations": [],
+ * // "cloudArmorConfig": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "ruleTupleCount": 0,
+ * // "rules": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.insert
* @memberOf! ()
*
@@ -71289,6 +112442,75 @@ export namespace compute_alpha {
/**
* compute.securityPolicies.list
* @desc List all the policies that have been configured for the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.list
* @memberOf! ()
*
@@ -71368,6 +112590,70 @@ export namespace compute_alpha {
/**
* compute.securityPolicies.listPreconfiguredExpressionSets
* @desc Gets the current list of preconfigured Web Application Firewall (WAF) expressions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.listPreconfiguredExpressionSets({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "preconfiguredExpressionSets": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.listPreconfiguredExpressionSets
* @memberOf! ()
*
@@ -71473,6 +112759,105 @@ export namespace compute_alpha {
/**
* compute.securityPolicies.patch
* @desc Patches the specified policy with the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.patch({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "associations": [],
+ * // "cloudArmorConfig": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "ruleTupleCount": 0,
+ * // "rules": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.patch
* @memberOf! ()
*
@@ -71550,6 +112935,98 @@ export namespace compute_alpha {
/**
* compute.securityPolicies.patchRule
* @desc Patches a rule at the specified priority.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.patchRule({
+ * // The priority of the rule to patch.
+ * priority: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the security policy to update.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // If true, the request will not be committed.
+ * validateOnly: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "direction": "my_direction",
+ * // "enableLogging": false,
+ * // "kind": "my_kind",
+ * // "match": {},
+ * // "preview": false,
+ * // "priority": 0,
+ * // "rateLimitOptions": {},
+ * // "ruleTupleCount": 0,
+ * // "targetResources": [],
+ * // "targetServiceAccounts": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.patchRule
* @memberOf! ()
*
@@ -71628,6 +113105,77 @@ export namespace compute_alpha {
/**
* compute.securityPolicies.removeRule
* @desc Deletes a rule at the specified priority.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.removeRule({
+ * // The priority of the rule to remove from the security policy.
+ * priority: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the security policy to update.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.removeRule
* @memberOf! ()
*
@@ -71704,6 +113252,84 @@ export namespace compute_alpha {
/**
* compute.securityPolicies.setLabels
* @desc Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.setLabels
* @memberOf! ()
*
@@ -71780,6 +113406,61 @@ export namespace compute_alpha {
/**
* compute.securityPolicies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.testIamPermissions
* @memberOf! ()
*
@@ -72154,6 +113835,83 @@ export namespace compute_alpha {
/**
* compute.serviceAttachments.delete
* @desc Deletes the specified ServiceAttachment in the given scope
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.serviceAttachments.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region of this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the ServiceAttachment resource to delete.
+ * serviceAttachment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.serviceAttachments.delete
* @memberOf! ()
*
@@ -72231,6 +113989,65 @@ export namespace compute_alpha {
/**
* compute.serviceAttachments.get
* @desc Returns the specified ServiceAttachment resource in the given scope.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.serviceAttachments.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region of this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the ServiceAttachment resource to return.
+ * serviceAttachment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "connectionPreference": "my_connectionPreference",
+ * // "consumerForwardingRules": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "natIpCidrRanges": [],
+ * // "producerForwardingRule": "my_producerForwardingRule",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.serviceAttachments.get
* @memberOf! ()
*
@@ -72307,6 +114124,62 @@ export namespace compute_alpha {
/**
* compute.serviceAttachments.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.serviceAttachments.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.serviceAttachments.getIamPolicy
* @memberOf! ()
*
@@ -72382,6 +114255,99 @@ export namespace compute_alpha {
/**
* compute.serviceAttachments.insert
* @desc Creates a ServiceAttachment in the specified project in the given scope using the parameters that are included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.serviceAttachments.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region of this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "connectionPreference": "my_connectionPreference",
+ * // "consumerForwardingRules": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "natIpCidrRanges": [],
+ * // "producerForwardingRule": "my_producerForwardingRule",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.serviceAttachments.insert
* @memberOf! ()
*
@@ -72459,6 +114425,78 @@ export namespace compute_alpha {
/**
* compute.serviceAttachments.list
* @desc Lists the ServiceAttachments for a project in the given scope.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.serviceAttachments.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region of this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.serviceAttachments.list
* @memberOf! ()
*
@@ -72541,6 +114579,69 @@ export namespace compute_alpha {
/**
* compute.serviceAttachments.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.serviceAttachments.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.serviceAttachments.setIamPolicy
* @memberOf! ()
*
@@ -72616,6 +114717,63 @@ export namespace compute_alpha {
/**
* compute.serviceAttachments.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.serviceAttachments.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.serviceAttachments.testIamPermissions
* @memberOf! ()
*
@@ -72884,6 +115042,81 @@ export namespace compute_alpha {
/**
* compute.snapshots.delete
* @desc Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot. For more information, see Deleting snapshots.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the Snapshot resource to delete.
+ * snapshot: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.snapshots.delete
* @memberOf! ()
*
@@ -72959,6 +115192,75 @@ export namespace compute_alpha {
/**
* compute.snapshots.get
* @desc Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the Snapshot resource to return.
+ * snapshot: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoCreated": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "downloadBytes": "my_downloadBytes",
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "snapshotEncryptionKey": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "status": "my_status",
+ * // "storageBytes": "my_storageBytes",
+ * // "storageBytesStatus": "my_storageBytesStatus",
+ * // "storageLocations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.snapshots.get
* @memberOf! ()
*
@@ -73031,6 +115333,60 @@ export namespace compute_alpha {
/**
* compute.snapshots.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.snapshots.getIamPolicy
* @memberOf! ()
*
@@ -73105,6 +115461,76 @@ export namespace compute_alpha {
/**
* compute.snapshots.list
* @desc Retrieves the list of Snapshot resources contained within the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.snapshots.list
* @memberOf! ()
*
@@ -73182,6 +115608,67 @@ export namespace compute_alpha {
/**
* compute.snapshots.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.snapshots.setIamPolicy
* @memberOf! ()
*
@@ -73256,6 +115743,84 @@ export namespace compute_alpha {
/**
* compute.snapshots.setLabels
* @desc Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.snapshots.setLabels
* @memberOf! ()
*
@@ -73332,6 +115897,61 @@ export namespace compute_alpha {
/**
* compute.snapshots.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.snapshots.testIamPermissions
* @memberOf! ()
*
@@ -73568,6 +116188,79 @@ export namespace compute_alpha {
/**
* compute.sslCertificates.aggregatedList
* @desc Retrieves the list of all SslCertificate resources, regional and global, available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslCertificates.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Name of the project scoping this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslCertificates.aggregatedList
* @memberOf! ()
*
@@ -73657,6 +116350,81 @@ export namespace compute_alpha {
/**
* compute.sslCertificates.delete
* @desc Deletes the specified SslCertificate resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslCertificates.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the SslCertificate resource to delete.
+ * sslCertificate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslCertificates.delete
* @memberOf! ()
*
@@ -73733,6 +116501,67 @@ export namespace compute_alpha {
/**
* compute.sslCertificates.get
* @desc Returns the specified SslCertificate resource. Gets a list of available SSL certificates by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslCertificates.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the SslCertificate resource to return.
+ * sslCertificate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificate": "my_certificate",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "managed": {},
+ * // "name": "my_name",
+ * // "privateKey": "my_privateKey",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "selfManaged": {},
+ * // "subjectAlternativeNames": [],
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslCertificates.get
* @memberOf! ()
*
@@ -73808,6 +116637,101 @@ export namespace compute_alpha {
/**
* compute.sslCertificates.insert
* @desc Creates a SslCertificate resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslCertificates.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "certificate": "my_certificate",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "managed": {},
+ * // "name": "my_name",
+ * // "privateKey": "my_privateKey",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "selfManaged": {},
+ * // "subjectAlternativeNames": [],
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslCertificates.insert
* @memberOf! ()
*
@@ -73884,6 +116808,76 @@ export namespace compute_alpha {
/**
* compute.sslCertificates.list
* @desc Retrieves the list of SslCertificate resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslCertificates.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslCertificates.list
* @memberOf! ()
*
@@ -73963,6 +116957,61 @@ export namespace compute_alpha {
/**
* compute.sslCertificates.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslCertificates.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslCertificates.testIamPermissions
* @memberOf! ()
*
@@ -74197,6 +117246,81 @@ export namespace compute_alpha {
/**
* compute.sslPolicies.delete
* @desc Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the SSL policy to delete. The name must be 1-63 characters long, and comply with RFC1035.
+ * sslPolicy: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.delete
* @memberOf! ()
*
@@ -74273,6 +117397,66 @@ export namespace compute_alpha {
/**
* compute.sslPolicies.get
* @desc Lists all of the ordered rules present in a single specified policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035.
+ * sslPolicy: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customFeatures": [],
+ * // "description": "my_description",
+ * // "enabledFeatures": [],
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "minTlsVersion": "my_minTlsVersion",
+ * // "name": "my_name",
+ * // "profile": "my_profile",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "tlsSettings": {},
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.get
* @memberOf! ()
*
@@ -74347,6 +117531,100 @@ export namespace compute_alpha {
/**
* compute.sslPolicies.insert
* @desc Returns the specified SSL policy resource. Gets a list of available SSL policies by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customFeatures": [],
+ * // "description": "my_description",
+ * // "enabledFeatures": [],
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "minTlsVersion": "my_minTlsVersion",
+ * // "name": "my_name",
+ * // "profile": "my_profile",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "tlsSettings": {},
+ * // "warnings": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.insert
* @memberOf! ()
*
@@ -74422,6 +117700,76 @@ export namespace compute_alpha {
/**
* compute.sslPolicies.list
* @desc Lists all the SSL policies that have been configured for the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.list
* @memberOf! ()
*
@@ -74499,6 +117847,71 @@ export namespace compute_alpha {
/**
* compute.sslPolicies.listAvailableFeatures
* @desc Lists all features that can be specified in the SSL policy when using custom profile.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.listAvailableFeatures({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "features": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.listAvailableFeatures
* @memberOf! ()
*
@@ -74595,6 +118008,102 @@ export namespace compute_alpha {
/**
* compute.sslPolicies.patch
* @desc Patches the specified SSL policy with the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.patch({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035.
+ * sslPolicy: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customFeatures": [],
+ * // "description": "my_description",
+ * // "enabledFeatures": [],
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "minTlsVersion": "my_minTlsVersion",
+ * // "name": "my_name",
+ * // "profile": "my_profile",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "tlsSettings": {},
+ * // "warnings": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.patch
* @memberOf! ()
*
@@ -74672,6 +118181,61 @@ export namespace compute_alpha {
/**
* compute.sslPolicies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.testIamPermissions
* @memberOf! ()
*
@@ -74925,6 +118489,79 @@ export namespace compute_alpha {
/**
* compute.subnetworks.aggregatedList
* @desc Retrieves an aggregated list of subnetworks.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.aggregatedList
* @memberOf! ()
*
@@ -75009,6 +118646,83 @@ export namespace compute_alpha {
/**
* compute.subnetworks.delete
* @desc Deletes the specified subnetwork.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the Subnetwork resource to delete.
+ * subnetwork: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.delete
* @memberOf! ()
*
@@ -75086,6 +118800,91 @@ export namespace compute_alpha {
/**
* compute.subnetworks.expandIpCidrRange
* @desc Expands the IP CIDR range of the subnetwork to a specified value.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.expandIpCidrRange({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the Subnetwork resource to update.
+ * subnetwork: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "ipCidrRange": "my_ipCidrRange"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.expandIpCidrRange
* @memberOf! ()
*
@@ -75164,6 +118963,81 @@ export namespace compute_alpha {
/**
* compute.subnetworks.get
* @desc Returns the specified subnetwork. Gets a list of available subnetworks list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the Subnetwork resource to return.
+ * subnetwork: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "aggregationInterval": "my_aggregationInterval",
+ * // "allowSubnetCidrRoutesOverlap": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableFlowLogs": false,
+ * // "enablePrivateV6Access": false,
+ * // "fingerprint": "my_fingerprint",
+ * // "flowSampling": {},
+ * // "gatewayAddress": "my_gatewayAddress",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "ipv6CidrRange": "my_ipv6CidrRange",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "metadata": "my_metadata",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "privateIpGoogleAccess": false,
+ * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess",
+ * // "privateIpv6GoogleAccessServiceAccounts": [],
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "role": "my_role",
+ * // "secondaryIpRanges": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.get
* @memberOf! ()
*
@@ -75239,6 +119113,62 @@ export namespace compute_alpha {
/**
* compute.subnetworks.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.getIamPolicy
* @memberOf! ()
*
@@ -75314,6 +119244,115 @@ export namespace compute_alpha {
/**
* compute.subnetworks.insert
* @desc Creates a subnetwork in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "aggregationInterval": "my_aggregationInterval",
+ * // "allowSubnetCidrRoutesOverlap": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableFlowLogs": false,
+ * // "enablePrivateV6Access": false,
+ * // "fingerprint": "my_fingerprint",
+ * // "flowSampling": {},
+ * // "gatewayAddress": "my_gatewayAddress",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "ipv6CidrRange": "my_ipv6CidrRange",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "metadata": "my_metadata",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "privateIpGoogleAccess": false,
+ * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess",
+ * // "privateIpv6GoogleAccessServiceAccounts": [],
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "role": "my_role",
+ * // "secondaryIpRanges": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "state": "my_state"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.insert
* @memberOf! ()
*
@@ -75391,6 +119430,78 @@ export namespace compute_alpha {
/**
* compute.subnetworks.list
* @desc Retrieves a list of subnetworks available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.list
* @memberOf! ()
*
@@ -75470,6 +119581,76 @@ export namespace compute_alpha {
/**
* compute.subnetworks.listUsable
* @desc Retrieves an aggregated list of all usable subnetworks in the project. The list contains all of the subnetworks in the project and the subnetworks that were shared by a Shared VPC host project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.listUsable({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.listUsable
* @memberOf! ()
*
@@ -75558,6 +119739,119 @@ export namespace compute_alpha {
/**
* compute.subnetworks.patch
* @desc Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingerprint of the subnetwork resource being patched.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.patch({
+ * // The drain timeout specifies the upper bound in seconds on the amount of time allowed to drain connections from the current ACTIVE subnetwork to the current BACKUP subnetwork. The drain timeout is only applicable when the following conditions are true: - the subnetwork being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork being patched has role = BACKUP - the patch request is setting the role to ACTIVE. Note that after this patch operation the roles of the ACTIVE and BACKUP subnetworks will be swapped.
+ * drainTimeoutSeconds: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the Subnetwork resource to patch.
+ * subnetwork: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "aggregationInterval": "my_aggregationInterval",
+ * // "allowSubnetCidrRoutesOverlap": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableFlowLogs": false,
+ * // "enablePrivateV6Access": false,
+ * // "fingerprint": "my_fingerprint",
+ * // "flowSampling": {},
+ * // "gatewayAddress": "my_gatewayAddress",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "ipv6CidrRange": "my_ipv6CidrRange",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "metadata": "my_metadata",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "privateIpGoogleAccess": false,
+ * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess",
+ * // "privateIpv6GoogleAccessServiceAccounts": [],
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "role": "my_role",
+ * // "secondaryIpRanges": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "state": "my_state"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.patch
* @memberOf! ()
*
@@ -75637,6 +119931,69 @@ export namespace compute_alpha {
/**
* compute.subnetworks.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.setIamPolicy
* @memberOf! ()
*
@@ -75712,6 +120069,91 @@ export namespace compute_alpha {
/**
* compute.subnetworks.setPrivateIpGoogleAccess
* @desc Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.setPrivateIpGoogleAccess({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the Subnetwork resource.
+ * subnetwork: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "privateIpGoogleAccess": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.setPrivateIpGoogleAccess
* @memberOf! ()
*
@@ -75792,6 +120234,63 @@ export namespace compute_alpha {
/**
* compute.subnetworks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.testIamPermissions
* @memberOf! ()
*
@@ -76217,6 +120716,81 @@ export namespace compute_alpha {
/**
* compute.targetGrpcProxies.delete
* @desc Deletes the specified TargetGrpcProxy in the given scope
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetGrpcProxies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetGrpcProxy resource to delete.
+ * targetGrpcProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetGrpcProxies.delete
* @memberOf! ()
*
@@ -76293,6 +120867,61 @@ export namespace compute_alpha {
/**
* compute.targetGrpcProxies.get
* @desc Returns the specified TargetGrpcProxy resource in the given scope.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetGrpcProxies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the TargetGrpcProxy resource to return.
+ * targetGrpcProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "urlMap": "my_urlMap",
+ * // "validateForProxyless": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetGrpcProxies.get
* @memberOf! ()
*
@@ -76368,6 +120997,95 @@ export namespace compute_alpha {
/**
* compute.targetGrpcProxies.insert
* @desc Creates a TargetGrpcProxy in the specified project in the given scope using the parameters that are included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetGrpcProxies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "urlMap": "my_urlMap",
+ * // "validateForProxyless": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetGrpcProxies.insert
* @memberOf! ()
*
@@ -76444,6 +121162,76 @@ export namespace compute_alpha {
/**
* compute.targetGrpcProxies.list
* @desc Lists the TargetGrpcProxies for a project in the given scope.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetGrpcProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetGrpcProxies.list
* @memberOf! ()
*
@@ -76523,6 +121311,61 @@ export namespace compute_alpha {
/**
* compute.targetGrpcProxies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetGrpcProxies.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetGrpcProxies.testIamPermissions
* @memberOf! ()
*
@@ -76721,6 +121564,79 @@ export namespace compute_alpha {
/**
* compute.targetHttpProxies.aggregatedList
* @desc Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Name of the project scoping this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpProxies.aggregatedList
* @memberOf! ()
*
@@ -76810,6 +121726,81 @@ export namespace compute_alpha {
/**
* compute.targetHttpProxies.delete
* @desc Deletes the specified TargetHttpProxy resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpProxy resource to delete.
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpProxies.delete
* @memberOf! ()
*
@@ -76886,6 +121877,63 @@ export namespace compute_alpha {
/**
* compute.targetHttpProxies.get
* @desc Returns the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the TargetHttpProxy resource to return.
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "httpFilters": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyBind": false,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpProxies.get
* @memberOf! ()
*
@@ -76961,6 +122009,97 @@ export namespace compute_alpha {
/**
* compute.targetHttpProxies.insert
* @desc Creates a TargetHttpProxy resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "httpFilters": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyBind": false,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpProxies.insert
* @memberOf! ()
*
@@ -77037,6 +122176,76 @@ export namespace compute_alpha {
/**
* compute.targetHttpProxies.list
* @desc Retrieves the list of TargetHttpProxy resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpProxies.list
* @memberOf! ()
*
@@ -77116,6 +122325,89 @@ export namespace compute_alpha {
/**
* compute.targetHttpProxies.setUrlMap
* @desc Changes the URL map for TargetHttpProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.setUrlMap({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpProxy to set a URL map for.
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "urlMap": "my_urlMap"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpProxies.setUrlMap
* @memberOf! ()
*
@@ -77193,6 +122485,61 @@ export namespace compute_alpha {
/**
* compute.targetHttpProxies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpProxies.testIamPermissions
* @memberOf! ()
*
@@ -77452,6 +122799,79 @@ export namespace compute_alpha {
/**
* compute.targetHttpsProxies.aggregatedList
* @desc Retrieves the list of all TargetHttpsProxy resources, regional and global, available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Name of the project scoping this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpsProxies.aggregatedList
* @memberOf! ()
*
@@ -77541,6 +122961,81 @@ export namespace compute_alpha {
/**
* compute.targetHttpsProxies.delete
* @desc Deletes the specified TargetHttpsProxy resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy resource to delete.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpsProxies.delete
* @memberOf! ()
*
@@ -77617,6 +123112,68 @@ export namespace compute_alpha {
/**
* compute.targetHttpsProxies.get
* @desc Returns the specified TargetHttpsProxy resource. Gets a list of available target HTTPS proxies by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the TargetHttpsProxy resource to return.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "authentication": "my_authentication",
+ * // "authorization": "my_authorization",
+ * // "certificateMap": "my_certificateMap",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyBind": false,
+ * // "quicOverride": "my_quicOverride",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpsProxies.get
* @memberOf! ()
*
@@ -77692,6 +123249,102 @@ export namespace compute_alpha {
/**
* compute.targetHttpsProxies.insert
* @desc Creates a TargetHttpsProxy resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "authentication": "my_authentication",
+ * // "authorization": "my_authorization",
+ * // "certificateMap": "my_certificateMap",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyBind": false,
+ * // "quicOverride": "my_quicOverride",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpsProxies.insert
* @memberOf! ()
*
@@ -77768,6 +123421,76 @@ export namespace compute_alpha {
/**
* compute.targetHttpsProxies.list
* @desc Retrieves the list of TargetHttpsProxy resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpsProxies.list
* @memberOf! ()
*
@@ -77849,6 +123572,89 @@ export namespace compute_alpha {
/**
* compute.targetHttpsProxies.setQuicOverride
* @desc Sets the QUIC override policy for TargetHttpsProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.setQuicOverride({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy resource to set the QUIC override policy for. The name should conform to RFC1035.
+ * targetHttpsProxy: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "quicOverride": "my_quicOverride"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpsProxies.setQuicOverride
* @memberOf! ()
*
@@ -77926,6 +123732,89 @@ export namespace compute_alpha {
/**
* compute.targetHttpsProxies.setSslCertificates
* @desc Replaces SslCertificates for TargetHttpsProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.setSslCertificates({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy resource to set an SslCertificates resource for.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sslCertificates": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpsProxies.setSslCertificates
* @memberOf! ()
*
@@ -78003,6 +123892,89 @@ export namespace compute_alpha {
/**
* compute.targetHttpsProxies.setSslPolicy
* @desc Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.setSslPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy resource whose SSL policy is to be set. The name must be 1-63 characters long, and comply with RFC1035.
+ * targetHttpsProxy: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sslPolicy": "my_sslPolicy"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpsProxies.setSslPolicy
* @memberOf! ()
*
@@ -78080,6 +124052,89 @@ export namespace compute_alpha {
/**
* compute.targetHttpsProxies.setUrlMap
* @desc Changes the URL map for TargetHttpsProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.setUrlMap({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy resource whose URL map is to be set.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "urlMap": "my_urlMap"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpsProxies.setUrlMap
* @memberOf! ()
*
@@ -78157,6 +124212,61 @@ export namespace compute_alpha {
/**
* compute.targetHttpsProxies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpsProxies.testIamPermissions
* @memberOf! ()
*
@@ -78491,6 +124601,79 @@ export namespace compute_alpha {
/**
* compute.targetInstances.aggregatedList
* @desc Retrieves an aggregated list of target instances.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetInstances.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetInstances.aggregatedList
* @memberOf! ()
*
@@ -78580,6 +124763,83 @@ export namespace compute_alpha {
/**
* compute.targetInstances.delete
* @desc Deletes the specified TargetInstance resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetInstances.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetInstance resource to delete.
+ * targetInstance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Name of the zone scoping this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetInstances.delete
* @memberOf! ()
*
@@ -78657,6 +124917,65 @@ export namespace compute_alpha {
/**
* compute.targetInstances.get
* @desc Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetInstances.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the TargetInstance resource to return.
+ * targetInstance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Name of the zone scoping this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "instance": "my_instance",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "natPolicy": "my_natPolicy",
+ * // "network": "my_network",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetInstances.get
* @memberOf! ()
*
@@ -78733,6 +125052,99 @@ export namespace compute_alpha {
/**
* compute.targetInstances.insert
* @desc Creates a TargetInstance resource in the specified project and zone using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetInstances.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the zone scoping this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "instance": "my_instance",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "natPolicy": "my_natPolicy",
+ * // "network": "my_network",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetInstances.insert
* @memberOf! ()
*
@@ -78810,6 +125222,78 @@ export namespace compute_alpha {
/**
* compute.targetInstances.list
* @desc Retrieves a list of TargetInstance resources available to the specified project and zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetInstances.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // Name of the zone scoping this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetInstances.list
* @memberOf! ()
*
@@ -78890,6 +125374,63 @@ export namespace compute_alpha {
/**
* compute.targetInstances.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetInstances.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetInstances.testIamPermissions
* @memberOf! ()
*
@@ -79145,6 +125686,91 @@ export namespace compute_alpha {
/**
* compute.targetPools.addHealthCheck
* @desc Adds health check URLs to a target pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.addHealthCheck({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the target pool to add a health check to.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "healthChecks": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetPools.addHealthCheck
* @memberOf! ()
*
@@ -79223,6 +125849,91 @@ export namespace compute_alpha {
/**
* compute.targetPools.addInstance
* @desc Adds an instance to a target pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.addInstance({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetPool resource to add instances to.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetPools.addInstance
* @memberOf! ()
*
@@ -79301,6 +126012,79 @@ export namespace compute_alpha {
/**
* compute.targetPools.aggregatedList
* @desc Retrieves an aggregated list of target pools.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetPools.aggregatedList
* @memberOf! ()
*
@@ -79385,6 +126169,83 @@ export namespace compute_alpha {
/**
* compute.targetPools.delete
* @desc Deletes the specified target pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetPool resource to delete.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetPools.delete
* @memberOf! ()
*
@@ -79462,6 +126323,67 @@ export namespace compute_alpha {
/**
* compute.targetPools.get
* @desc Returns the specified target pool. Gets a list of available target pools by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the TargetPool resource to return.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "backupPool": "my_backupPool",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "failoverRatio": {},
+ * // "healthChecks": [],
+ * // "id": "my_id",
+ * // "instances": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sessionAffinity": "my_sessionAffinity"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetPools.get
* @memberOf! ()
*
@@ -79537,6 +126459,64 @@ export namespace compute_alpha {
/**
* compute.targetPools.getHealth
* @desc Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.getHealth({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the TargetPool resource to which the queried instance belongs.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instance": "my_instance"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "healthStatus": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetPools.getHealth
* @memberOf! ()
*
@@ -79618,6 +126598,101 @@ export namespace compute_alpha {
/**
* compute.targetPools.insert
* @desc Creates a target pool in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "backupPool": "my_backupPool",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "failoverRatio": {},
+ * // "healthChecks": [],
+ * // "id": "my_id",
+ * // "instances": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sessionAffinity": "my_sessionAffinity"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetPools.insert
* @memberOf! ()
*
@@ -79695,6 +126770,78 @@ export namespace compute_alpha {
/**
* compute.targetPools.list
* @desc Retrieves a list of target pools available to the specified project and region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetPools.list
* @memberOf! ()
*
@@ -79774,6 +126921,91 @@ export namespace compute_alpha {
/**
* compute.targetPools.removeHealthCheck
* @desc Removes health check URL from a target pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.removeHealthCheck({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the target pool to remove health checks from.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "healthChecks": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetPools.removeHealthCheck
* @memberOf! ()
*
@@ -79852,6 +127084,91 @@ export namespace compute_alpha {
/**
* compute.targetPools.removeInstance
* @desc Removes instance URL from a target pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.removeInstance({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetPool resource to remove instances from.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetPools.removeInstance
* @memberOf! ()
*
@@ -79930,6 +127247,93 @@ export namespace compute_alpha {
/**
* compute.targetPools.setBackup
* @desc Changes a backup target pool's configurations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.setBackup({
+ * // New failoverRatio value for the target pool.
+ * failoverRatio: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetPool resource to set a backup pool for.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "target": "my_target"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetPools.setBackup
* @memberOf! ()
*
@@ -80009,6 +127413,63 @@ export namespace compute_alpha {
/**
* compute.targetPools.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetPools.testIamPermissions
* @memberOf! ()
*
@@ -80436,6 +127897,81 @@ export namespace compute_alpha {
/**
* compute.targetSslProxies.delete
* @desc Deletes the specified TargetSslProxy resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetSslProxy resource to delete.
+ * targetSslProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetSslProxies.delete
* @memberOf! ()
*
@@ -80512,6 +128048,63 @@ export namespace compute_alpha {
/**
* compute.targetSslProxies.get
* @desc Returns the specified TargetSslProxy resource. Gets a list of available target SSL proxies by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the TargetSslProxy resource to return.
+ * targetSslProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificateMap": "my_certificateMap",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyHeader": "my_proxyHeader",
+ * // "selfLink": "my_selfLink",
+ * // "service": "my_service",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetSslProxies.get
* @memberOf! ()
*
@@ -80587,6 +128180,97 @@ export namespace compute_alpha {
/**
* compute.targetSslProxies.insert
* @desc Creates a TargetSslProxy resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "certificateMap": "my_certificateMap",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyHeader": "my_proxyHeader",
+ * // "selfLink": "my_selfLink",
+ * // "service": "my_service",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetSslProxies.insert
* @memberOf! ()
*
@@ -80663,6 +128347,76 @@ export namespace compute_alpha {
/**
* compute.targetSslProxies.list
* @desc Retrieves the list of TargetSslProxy resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetSslProxies.list
* @memberOf! ()
*
@@ -80742,6 +128496,89 @@ export namespace compute_alpha {
/**
* compute.targetSslProxies.setBackendService
* @desc Changes the BackendService for TargetSslProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.setBackendService({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetSslProxy resource whose BackendService resource is to be set.
+ * targetSslProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "service": "my_service"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetSslProxies.setBackendService
* @memberOf! ()
*
@@ -80819,6 +128656,89 @@ export namespace compute_alpha {
/**
* compute.targetSslProxies.setProxyHeader
* @desc Changes the ProxyHeaderType for TargetSslProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.setProxyHeader({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetSslProxy resource whose ProxyHeader is to be set.
+ * targetSslProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "proxyHeader": "my_proxyHeader"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetSslProxies.setProxyHeader
* @memberOf! ()
*
@@ -80896,6 +128816,89 @@ export namespace compute_alpha {
/**
* compute.targetSslProxies.setSslCertificates
* @desc Changes SslCertificates for TargetSslProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.setSslCertificates({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetSslProxy resource whose SslCertificate resource is to be set.
+ * targetSslProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sslCertificates": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetSslProxies.setSslCertificates
* @memberOf! ()
*
@@ -80973,6 +128976,89 @@ export namespace compute_alpha {
/**
* compute.targetSslProxies.setSslPolicy
* @desc Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.setSslPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetSslProxy resource whose SSL policy is to be set. The name must be 1-63 characters long, and comply with RFC1035.
+ * targetSslProxy: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sslPolicy": "my_sslPolicy"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetSslProxies.setSslPolicy
* @memberOf! ()
*
@@ -81050,6 +129136,61 @@ export namespace compute_alpha {
/**
* compute.targetSslProxies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetSslProxies.testIamPermissions
* @memberOf! ()
*
@@ -81348,6 +129489,81 @@ export namespace compute_alpha {
/**
* compute.targetTcpProxies.delete
* @desc Deletes the specified TargetTcpProxy resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetTcpProxy resource to delete.
+ * targetTcpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetTcpProxies.delete
* @memberOf! ()
*
@@ -81424,6 +129640,60 @@ export namespace compute_alpha {
/**
* compute.targetTcpProxies.get
* @desc Returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the TargetTcpProxy resource to return.
+ * targetTcpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyHeader": "my_proxyHeader",
+ * // "selfLink": "my_selfLink",
+ * // "service": "my_service"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetTcpProxies.get
* @memberOf! ()
*
@@ -81499,6 +129769,94 @@ export namespace compute_alpha {
/**
* compute.targetTcpProxies.insert
* @desc Creates a TargetTcpProxy resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyHeader": "my_proxyHeader",
+ * // "selfLink": "my_selfLink",
+ * // "service": "my_service"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetTcpProxies.insert
* @memberOf! ()
*
@@ -81575,6 +129933,76 @@ export namespace compute_alpha {
/**
* compute.targetTcpProxies.list
* @desc Retrieves the list of TargetTcpProxy resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetTcpProxies.list
* @memberOf! ()
*
@@ -81654,6 +130082,89 @@ export namespace compute_alpha {
/**
* compute.targetTcpProxies.setBackendService
* @desc Changes the BackendService for TargetTcpProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.setBackendService({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetTcpProxy resource whose BackendService resource is to be set.
+ * targetTcpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "service": "my_service"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetTcpProxies.setBackendService
* @memberOf! ()
*
@@ -81731,6 +130242,89 @@ export namespace compute_alpha {
/**
* compute.targetTcpProxies.setProxyHeader
* @desc Changes the ProxyHeaderType for TargetTcpProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.setProxyHeader({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetTcpProxy resource whose ProxyHeader is to be set.
+ * targetTcpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "proxyHeader": "my_proxyHeader"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetTcpProxies.setProxyHeader
* @memberOf! ()
*
@@ -81808,6 +130402,61 @@ export namespace compute_alpha {
/**
* compute.targetTcpProxies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetTcpProxies.testIamPermissions
* @memberOf! ()
*
@@ -82056,6 +130705,79 @@ export namespace compute_alpha {
/**
* compute.targetVpnGateways.aggregatedList
* @desc Retrieves an aggregated list of target VPN gateways.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetVpnGateways.aggregatedList
* @memberOf! ()
*
@@ -82145,6 +130867,83 @@ export namespace compute_alpha {
/**
* compute.targetVpnGateways.delete
* @desc Deletes the specified target VPN gateway.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the target VPN gateway to delete.
+ * targetVpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetVpnGateways.delete
* @memberOf! ()
*
@@ -82222,6 +131021,67 @@ export namespace compute_alpha {
/**
* compute.targetVpnGateways.get
* @desc Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the target VPN gateway to return.
+ * targetVpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "forwardingRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "tunnels": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetVpnGateways.get
* @memberOf! ()
*
@@ -82298,6 +131158,101 @@ export namespace compute_alpha {
/**
* compute.targetVpnGateways.insert
* @desc Creates a target VPN gateway in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "forwardingRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "tunnels": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetVpnGateways.insert
* @memberOf! ()
*
@@ -82375,6 +131330,78 @@ export namespace compute_alpha {
/**
* compute.targetVpnGateways.list
* @desc Retrieves a list of target VPN gateways available to the specified project and region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetVpnGateways.list
* @memberOf! ()
*
@@ -82457,6 +131484,92 @@ export namespace compute_alpha {
/**
* compute.targetVpnGateways.setLabels
* @desc Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetVpnGateways.setLabels
* @memberOf! ()
*
@@ -82535,6 +131648,63 @@ export namespace compute_alpha {
/**
* compute.targetVpnGateways.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetVpnGateways.testIamPermissions
* @memberOf! ()
*
@@ -82819,6 +131989,79 @@ export namespace compute_alpha {
/**
* compute.urlMaps.aggregatedList
* @desc Retrieves the list of all UrlMap resources, regional and global, available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Name of the project scoping this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.urlMaps.aggregatedList
* @memberOf! ()
*
@@ -82902,6 +132145,81 @@ export namespace compute_alpha {
/**
* compute.urlMaps.delete
* @desc Deletes the specified UrlMap resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the UrlMap resource to delete.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.urlMaps.delete
* @memberOf! ()
*
@@ -82977,6 +132295,67 @@ export namespace compute_alpha {
/**
* compute.urlMaps.get
* @desc Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the UrlMap resource to return.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.urlMaps.get
* @memberOf! ()
*
@@ -83049,6 +132428,101 @@ export namespace compute_alpha {
/**
* compute.urlMaps.insert
* @desc Creates a UrlMap resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.urlMaps.insert
* @memberOf! ()
*
@@ -83123,6 +132597,90 @@ export namespace compute_alpha {
/**
* compute.urlMaps.invalidateCache
* @desc Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.invalidateCache({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the UrlMap scoping this request.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "host": "my_host",
+ * // "path": "my_path"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.urlMaps.invalidateCache
* @memberOf! ()
*
@@ -83200,6 +132758,76 @@ export namespace compute_alpha {
/**
* compute.urlMaps.list
* @desc Retrieves the list of UrlMap resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.urlMaps.list
* @memberOf! ()
*
@@ -83277,6 +132905,103 @@ export namespace compute_alpha {
/**
* compute.urlMaps.patch
* @desc Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.patch({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the UrlMap resource to patch.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.urlMaps.patch
* @memberOf! ()
*
@@ -83353,6 +133078,61 @@ export namespace compute_alpha {
/**
* compute.urlMaps.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.urlMaps.testIamPermissions
* @memberOf! ()
*
@@ -83433,6 +133213,103 @@ export namespace compute_alpha {
/**
* compute.urlMaps.update
* @desc Updates the specified UrlMap resource with the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.update({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the UrlMap resource to update.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.urlMaps.update
* @memberOf! ()
*
@@ -83509,6 +133386,60 @@ export namespace compute_alpha {
/**
* compute.urlMaps.validate
* @desc Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.validate({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the UrlMap resource to be validated as.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resource": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "result": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.urlMaps.validate
* @memberOf! ()
*
@@ -83831,6 +133762,79 @@ export namespace compute_alpha {
/**
* compute.vpnGateways.aggregatedList
* @desc Retrieves an aggregated list of VPN gateways.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.aggregatedList
* @memberOf! ()
*
@@ -83915,6 +133919,83 @@ export namespace compute_alpha {
/**
* compute.vpnGateways.delete
* @desc Deletes the specified VPN gateway.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the VPN gateway to delete.
+ * vpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.delete
* @memberOf! ()
*
@@ -83992,6 +134073,65 @@ export namespace compute_alpha {
/**
* compute.vpnGateways.get
* @desc Returns the specified VPN gateway. Gets a list of available VPN gateways by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the VPN gateway to return.
+ * vpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "vpnInterfaces": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.get
* @memberOf! ()
*
@@ -84067,6 +134207,55 @@ export namespace compute_alpha {
/**
* compute.vpnGateways.getStatus
* @desc Returns the status for the specified VPN gateway.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.getStatus({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the VPN gateway to return.
+ * vpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "result": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.getStatus
* @memberOf! ()
*
@@ -84152,6 +134341,99 @@ export namespace compute_alpha {
/**
* compute.vpnGateways.insert
* @desc Creates a VPN gateway in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "vpnInterfaces": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.insert
* @memberOf! ()
*
@@ -84229,6 +134511,78 @@ export namespace compute_alpha {
/**
* compute.vpnGateways.list
* @desc Retrieves a list of VPN gateways available to the specified project and region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.list
* @memberOf! ()
*
@@ -84308,6 +134662,92 @@ export namespace compute_alpha {
/**
* compute.vpnGateways.setLabels
* @desc Sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.setLabels
* @memberOf! ()
*
@@ -84386,6 +134826,63 @@ export namespace compute_alpha {
/**
* compute.vpnGateways.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.testIamPermissions
* @memberOf! ()
*
@@ -84688,6 +135185,79 @@ export namespace compute_alpha {
/**
* compute.vpnTunnels.aggregatedList
* @desc Retrieves an aggregated list of VPN tunnels.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "unreachables": [],
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnTunnels.aggregatedList
* @memberOf! ()
*
@@ -84772,6 +135342,83 @@ export namespace compute_alpha {
/**
* compute.vpnTunnels.delete
* @desc Deletes the specified VpnTunnel resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the VpnTunnel resource to delete.
+ * vpnTunnel: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnTunnels.delete
* @memberOf! ()
*
@@ -84849,6 +135496,78 @@ export namespace compute_alpha {
/**
* compute.vpnTunnels.get
* @desc Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the VpnTunnel resource to return.
+ * vpnTunnel: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "detailedStatus": "my_detailedStatus",
+ * // "id": "my_id",
+ * // "ikeVersion": 0,
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "localTrafficSelector": [],
+ * // "name": "my_name",
+ * // "peerExternalGateway": "my_peerExternalGateway",
+ * // "peerExternalGatewayInterface": 0,
+ * // "peerGcpGateway": "my_peerGcpGateway",
+ * // "peerIp": "my_peerIp",
+ * // "region": "my_region",
+ * // "remoteTrafficSelector": [],
+ * // "router": "my_router",
+ * // "selfLink": "my_selfLink",
+ * // "sharedSecret": "my_sharedSecret",
+ * // "sharedSecretHash": "my_sharedSecretHash",
+ * // "status": "my_status",
+ * // "targetVpnGateway": "my_targetVpnGateway",
+ * // "vpnGateway": "my_vpnGateway",
+ * // "vpnGatewayInterface": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnTunnels.get
* @memberOf! ()
*
@@ -84924,6 +135643,112 @@ export namespace compute_alpha {
/**
* compute.vpnTunnels.insert
* @desc Creates a VpnTunnel resource in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "detailedStatus": "my_detailedStatus",
+ * // "id": "my_id",
+ * // "ikeVersion": 0,
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "localTrafficSelector": [],
+ * // "name": "my_name",
+ * // "peerExternalGateway": "my_peerExternalGateway",
+ * // "peerExternalGatewayInterface": 0,
+ * // "peerGcpGateway": "my_peerGcpGateway",
+ * // "peerIp": "my_peerIp",
+ * // "region": "my_region",
+ * // "remoteTrafficSelector": [],
+ * // "router": "my_router",
+ * // "selfLink": "my_selfLink",
+ * // "sharedSecret": "my_sharedSecret",
+ * // "sharedSecretHash": "my_sharedSecretHash",
+ * // "status": "my_status",
+ * // "targetVpnGateway": "my_targetVpnGateway",
+ * // "vpnGateway": "my_vpnGateway",
+ * // "vpnGatewayInterface": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnTunnels.insert
* @memberOf! ()
*
@@ -85001,6 +135826,78 @@ export namespace compute_alpha {
/**
* compute.vpnTunnels.list
* @desc Retrieves a list of VpnTunnel resources contained in the specified project and region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnTunnels.list
* @memberOf! ()
*
@@ -85080,6 +135977,92 @@ export namespace compute_alpha {
/**
* compute.vpnTunnels.setLabels
* @desc Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnTunnels.setLabels
* @memberOf! ()
*
@@ -85158,6 +136141,63 @@ export namespace compute_alpha {
/**
* compute.vpnTunnels.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnTunnels.testIamPermissions
* @memberOf! ()
*
@@ -85440,6 +136480,83 @@ export namespace compute_alpha {
/**
* compute.zoneInPlaceSnapshots.delete
* @desc Deletes the specified InPlaceSnapshot resource. Keep in mind that deleting a single inPlaceSnapshot might not necessarily delete all the data on that inPlaceSnapshot. If any data on the inPlaceSnapshot that is marked for deletion is needed for subsequent inPlaceSnapshots, the data will be moved to the next corresponding inPlaceSnapshot. For more information, see Deleting inPlaceSnapshots.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneInPlaceSnapshots.delete({
+ * // Name of the InPlaceSnapshot resource to delete.
+ * inPlaceSnapshot: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.zoneInPlaceSnapshots.delete
* @memberOf! ()
*
@@ -85517,6 +136634,70 @@ export namespace compute_alpha {
/**
* compute.zoneInPlaceSnapshots.get
* @desc Returns the specified InPlaceSnapshot resource in the specified zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneInPlaceSnapshots.get({
+ * // Name of the InPlaceSnapshot resource to return.
+ * inPlaceSnapshot: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "guestFlush": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.zoneInPlaceSnapshots.get
* @memberOf! ()
*
@@ -85593,6 +136774,62 @@ export namespace compute_alpha {
/**
* compute.zoneInPlaceSnapshots.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneInPlaceSnapshots.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.zoneInPlaceSnapshots.getIamPolicy
* @memberOf! ()
*
@@ -85668,6 +136905,104 @@ export namespace compute_alpha {
/**
* compute.zoneInPlaceSnapshots.insert
* @desc Creates an in-place snapshot in the specified zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneInPlaceSnapshots.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "guestFlush": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.zoneInPlaceSnapshots.insert
* @memberOf! ()
*
@@ -85745,6 +137080,78 @@ export namespace compute_alpha {
/**
* compute.zoneInPlaceSnapshots.list
* @desc Retrieves the list of InPlaceSnapshot resources contained within the specified zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneInPlaceSnapshots.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.zoneInPlaceSnapshots.list
* @memberOf! ()
*
@@ -85825,6 +137232,69 @@ export namespace compute_alpha {
/**
* compute.zoneInPlaceSnapshots.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneInPlaceSnapshots.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.zoneInPlaceSnapshots.setIamPolicy
* @memberOf! ()
*
@@ -85900,6 +137370,92 @@ export namespace compute_alpha {
/**
* compute.zoneInPlaceSnapshots.setLabels
* @desc Sets the labels on a inPlaceSnapshot in the given zone. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneInPlaceSnapshots.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.zoneInPlaceSnapshots.setLabels
* @memberOf! ()
*
@@ -85978,6 +137534,63 @@ export namespace compute_alpha {
/**
* compute.zoneInPlaceSnapshots.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneInPlaceSnapshots.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.zoneInPlaceSnapshots.testIamPermissions
* @memberOf! ()
*
@@ -86275,6 +137888,49 @@ export namespace compute_alpha {
/**
* compute.zoneOperations.delete
* @desc Deletes the specified zone-specific Operations resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneOperations.delete({
+ * // Name of the Operations resource to delete.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.zoneOperations.delete
* @memberOf! ()
*
@@ -86349,6 +138005,78 @@ export namespace compute_alpha {
/**
* compute.zoneOperations.get
* @desc Retrieves the specified zone-specific Operations resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneOperations.get({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.zoneOperations.get
* @memberOf! ()
*
@@ -86425,6 +138153,78 @@ export namespace compute_alpha {
/**
* compute.zoneOperations.list
* @desc Retrieves a list of Operation resources contained within the specified zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneOperations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * // Name of the zone for request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.zoneOperations.list
* @memberOf! ()
*
@@ -86505,6 +138305,78 @@ export namespace compute_alpha {
/**
* compute.zoneOperations.wait
* @desc Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be `DONE` or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not `DONE`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneOperations.wait({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.zoneOperations.wait
* @memberOf! ()
*
@@ -86685,6 +138557,62 @@ export namespace compute_alpha {
/**
* compute.zones.get
* @desc Returns the specified Zone resource. Gets a list of available zones by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zones.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the zone resource to return.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "availableCpuPlatforms": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.zones.get
* @memberOf! ()
*
@@ -86756,6 +138684,76 @@ export namespace compute_alpha {
/**
* compute.zones.list
* @desc Retrieves the list of Zone resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zones.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
+ * returnPartialSuccess: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.zones.list
* @memberOf! ()
*
diff --git a/src/apis/compute/beta.ts b/src/apis/compute/beta.ts
index b6ab790f703..c99597abead 100644
--- a/src/apis/compute/beta.ts
+++ b/src/apis/compute/beta.ts
@@ -12755,68 +12755,75 @@ export namespace compute_beta {
* compute.acceleratorTypes.aggregatedList
* @desc Retrieves an aggregated list of accelerator types.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.acceleratorTypes.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.acceleratorTypes.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.acceleratorTypes.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.acceleratorTypes.aggregatedList
* @memberOf! ()
*
@@ -12906,61 +12913,62 @@ export namespace compute_beta {
* compute.acceleratorTypes.get
* @desc Returns the specified accelerator type.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.acceleratorTypes.get({
+ * // Name of the accelerator type to return.
+ * acceleratorType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the accelerator type to return.
- * acceleratorType: 'my-accelerator-type', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.acceleratorTypes.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "maximumCardsPerInstance": 0,
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.acceleratorTypes.get
* @memberOf! ()
*
@@ -13038,71 +13046,75 @@ export namespace compute_beta {
* compute.acceleratorTypes.list
* @desc Retrieves a list of accelerator types available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.acceleratorTypes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.acceleratorTypes.list(request, handlePage);
- * }
- * };
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.acceleratorTypes.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.acceleratorTypes.list
* @memberOf! ()
*
@@ -13275,68 +13287,75 @@ export namespace compute_beta {
* compute.addresses.aggregatedList
* @desc Retrieves an aggregated list of addresses.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.addresses.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.addresses.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.addresses.aggregatedList
* @memberOf! ()
*
@@ -13420,61 +13439,81 @@ export namespace compute_beta {
* compute.addresses.delete
* @desc Deletes the specified address resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.delete({
+ * // Name of the address resource to delete.
+ * address: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the address resource to delete.
- * address: 'my-address', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.addresses.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.addresses.delete
* @memberOf! ()
*
@@ -13552,61 +13591,72 @@ export namespace compute_beta {
* compute.addresses.get
* @desc Returns the specified address resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.get({
+ * // Name of the address resource to return.
+ * address: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the address resource to return.
- * address: 'my-address', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.addresses.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": "my_address",
+ * // "addressType": "my_addressType",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "prefixLength": 0,
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "subnetwork": "my_subnetwork",
+ * // "users": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.addresses.get
* @memberOf! ()
*
@@ -13681,62 +13731,105 @@ export namespace compute_beta {
* compute.addresses.insert
* @desc Creates an address resource in the specified project by using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": "my_address",
+ * // "addressType": "my_addressType",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "prefixLength": 0,
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "subnetwork": "my_subnetwork",
+ * // "users": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.addresses.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.addresses.insert
* @memberOf! ()
*
@@ -13814,71 +13907,75 @@ export namespace compute_beta {
* compute.addresses.list
* @desc Retrieves a list of addresses contained within the specified region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.addresses.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.addresses.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.addresses.list
* @memberOf! ()
*
@@ -13958,65 +14055,90 @@ export namespace compute_beta {
* compute.addresses.setLabels
* @desc Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.setLabels({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.addresses.setLabels(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.addresses.setLabels
* @memberOf! ()
*
@@ -14096,65 +14218,62 @@ export namespace compute_beta {
* compute.addresses.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.addresses.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.addresses.testIamPermissions
* @memberOf! ()
*
@@ -14428,68 +14547,75 @@ export namespace compute_beta {
* compute.autoscalers.aggregatedList
* @desc Retrieves an aggregated list of autoscalers.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.autoscalers.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.autoscalers.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.autoscalers.aggregatedList
* @memberOf! ()
*
@@ -14574,61 +14700,81 @@ export namespace compute_beta {
* compute.autoscalers.delete
* @desc Deletes the specified autoscaler.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.delete({
+ * // Name of the autoscaler to delete.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the autoscaler to delete.
- * autoscaler: 'my-autoscaler', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.autoscalers.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.autoscalers.delete
* @memberOf! ()
*
@@ -14707,61 +14853,66 @@ export namespace compute_beta {
* compute.autoscalers.get
* @desc Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.get({
+ * // Name of the autoscaler to return.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the autoscaler to return.
- * autoscaler: 'my-autoscaler', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.autoscalers.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.autoscalers.get
* @memberOf! ()
*
@@ -14838,62 +14989,99 @@ export namespace compute_beta {
* compute.autoscalers.insert
* @desc Creates an autoscaler in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.autoscalers.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.autoscalers.insert
* @memberOf! ()
*
@@ -14972,71 +15160,75 @@ export namespace compute_beta {
* compute.autoscalers.list
* @desc Retrieves a list of autoscalers contained within the specified zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.autoscalers.list(request, handlePage);
- * }
- * };
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.autoscalers.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.autoscalers.list
* @memberOf! ()
*
@@ -15116,63 +15308,101 @@ export namespace compute_beta {
* compute.autoscalers.patch
* @desc Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.patch({
+ * // Name of the autoscaler to patch.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.autoscalers.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.autoscalers.patch
* @memberOf! ()
*
@@ -15252,65 +15482,62 @@ export namespace compute_beta {
* compute.autoscalers.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.autoscalers.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.autoscalers.testIamPermissions
* @memberOf! ()
*
@@ -15393,63 +15620,101 @@ export namespace compute_beta {
* compute.autoscalers.update
* @desc Updates an autoscaler in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.update({
+ * // Name of the autoscaler to update.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.autoscalers.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.autoscalers.update
* @memberOf! ()
*
@@ -15750,6 +16015,89 @@ export namespace compute_beta {
/**
* compute.backendBuckets.addSignedUrlKey
* @desc Adds a key for validating requests with signed URLs for this backend bucket.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.addSignedUrlKey({
+ * // Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.
+ * backendBucket: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "keyName": "my_keyName",
+ * // "keyValue": "my_keyValue"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendBuckets.addSignedUrlKey
* @memberOf! ()
*
@@ -15828,58 +16176,79 @@ export namespace compute_beta {
* compute.backendBuckets.delete
* @desc Deletes the specified BackendBucket resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.delete({
* // Name of the BackendBucket resource to delete.
- * backendBucket: 'my-backend-bucket', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.backendBuckets.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * backendBucket: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendBuckets.delete
* @memberOf! ()
*
@@ -15956,6 +16325,82 @@ export namespace compute_beta {
/**
* compute.backendBuckets.deleteSignedUrlKey
* @desc Deletes a key for validating requests with signed URLs for this backend bucket.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.deleteSignedUrlKey({
+ * // Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.
+ * backendBucket: 'placeholder-value',
+ * // The name of the Signed URL Key to delete.
+ * keyName: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendBuckets.deleteSignedUrlKey
* @memberOf! ()
*
@@ -16034,58 +16479,60 @@ export namespace compute_beta {
* compute.backendBuckets.get
* @desc Returns the specified BackendBucket resource. Gets a list of available backend buckets by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.get({
* // Name of the BackendBucket resource to return.
- * backendBucket: 'my-backend-bucket', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.backendBuckets.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * backendBucket: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bucketName": "my_bucketName",
+ * // "cdnPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableCdn": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendBuckets.get
* @memberOf! ()
*
@@ -16162,59 +16609,93 @@ export namespace compute_beta {
* compute.backendBuckets.insert
* @desc Creates a BackendBucket resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bucketName": "my_bucketName",
+ * // "cdnPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableCdn": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.backendBuckets.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendBuckets.insert
* @memberOf! ()
*
@@ -16291,68 +16772,73 @@ export namespace compute_beta {
* compute.backendBuckets.list
* @desc Retrieves the list of BackendBucket resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.backendBuckets.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.backendBuckets.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendBuckets.list
* @memberOf! ()
*
@@ -16431,63 +16917,95 @@ export namespace compute_beta {
* compute.backendBuckets.patch
* @desc Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.patch({
* // Name of the BackendBucket resource to patch.
- * backendBucket: 'my-backend-bucket', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * backendBucket: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bucketName": "my_bucketName",
+ * // "cdnPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableCdn": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.backendBuckets.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendBuckets.patch
* @memberOf! ()
*
@@ -16566,63 +17084,95 @@ export namespace compute_beta {
* compute.backendBuckets.update
* @desc Updates the specified BackendBucket resource with the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.update({
* // Name of the BackendBucket resource to update.
- * backendBucket: 'my-backend-bucket', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * backendBucket: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bucketName": "my_bucketName",
+ * // "cdnPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableCdn": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.backendBuckets.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendBuckets.update
* @memberOf! ()
*
@@ -16892,6 +17442,89 @@ export namespace compute_beta {
/**
* compute.backendServices.addSignedUrlKey
* @desc Adds a key for validating requests with signed URLs for this backend service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.addSignedUrlKey({
+ * // Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.
+ * backendService: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "keyName": "my_keyName",
+ * // "keyValue": "my_keyValue"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendServices.addSignedUrlKey
* @memberOf! ()
*
@@ -16970,68 +17603,75 @@ export namespace compute_beta {
* compute.backendServices.aggregatedList
* @desc Retrieves the list of all BackendService resources, regional and global, available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Name of the project scoping this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.backendServices.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.backendServices.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.aggregatedList
* @memberOf! ()
*
@@ -17121,58 +17761,79 @@ export namespace compute_beta {
* compute.backendServices.delete
* @desc Deletes the specified BackendService resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.delete({
* // Name of the BackendService resource to delete.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.backendServices.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.delete
* @memberOf! ()
*
@@ -17249,6 +17910,82 @@ export namespace compute_beta {
/**
* compute.backendServices.deleteSignedUrlKey
* @desc Deletes a key for validating requests with signed URLs for this backend service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.deleteSignedUrlKey({
+ * // Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.
+ * backendService: 'placeholder-value',
+ * // The name of the Signed URL Key to delete.
+ * keyName: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendServices.deleteSignedUrlKey
* @memberOf! ()
*
@@ -17327,58 +18064,82 @@ export namespace compute_beta {
* compute.backendServices.get
* @desc Returns the specified BackendService resource. Gets a list of available backend services.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.get({
* // Name of the BackendService resource to return.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.backendServices.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "securitySettings": {},
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.get
* @memberOf! ()
*
@@ -17455,61 +18216,62 @@ export namespace compute_beta {
* compute.backendServices.getHealth
* @desc Gets the most recent health check results for this BackendService. Example request body: { "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" }
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.getHealth({
* // Name of the BackendService resource to which the queried instance belongs.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
*
- * auth: authClient,
- * };
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "group": "my_group"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
*
- * compute.backendServices.getHealth(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "annotations": {},
+ * // "healthStatus": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.getHealth
* @memberOf! ()
*
@@ -17594,59 +18356,115 @@ export namespace compute_beta {
* compute.backendServices.insert
* @desc Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Understanding backend services for more information.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "securitySettings": {},
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.backendServices.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.insert
* @memberOf! ()
*
@@ -17724,68 +18542,73 @@ export namespace compute_beta {
* compute.backendServices.list
* @desc Retrieves the list of BackendService resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.backendServices.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.backendServices.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.list
* @memberOf! ()
*
@@ -17865,63 +18688,117 @@ export namespace compute_beta {
* compute.backendServices.patch
* @desc Patches the specified BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.patch({
* // Name of the BackendService resource to patch.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "securitySettings": {},
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.backendServices.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.patch
* @memberOf! ()
*
@@ -18000,63 +18877,87 @@ export namespace compute_beta {
* compute.backendServices.setSecurityPolicy
* @desc Sets the security policy for the specified backend service.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the BackendService resource to which the security policy should be set. The name should
- * // conform to RFC1035.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.setSecurityPolicy({
+ * // Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.
+ * backendService: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "securityPolicy": "my_securityPolicy"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.backendServices.setSecurityPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.setSecurityPolicy
* @memberOf! ()
*
@@ -18135,62 +19036,60 @@ export namespace compute_beta {
* compute.backendServices.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.backendServices.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.testIamPermissions
* @memberOf! ()
*
@@ -18272,63 +19171,117 @@ export namespace compute_beta {
* compute.backendServices.update
* @desc Updates the specified BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.update({
* // Name of the BackendService resource to update.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "securitySettings": {},
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.backendServices.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.update
* @memberOf! ()
*
@@ -18697,6 +19650,90 @@ export namespace compute_beta {
/**
* compute.disks.addResourcePolicies
* @desc Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.addResourcePolicies({
+ * // The disk name for this request.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.addResourcePolicies
* @memberOf! ()
*
@@ -18776,68 +19813,75 @@ export namespace compute_beta {
* compute.disks.aggregatedList
* @desc Retrieves an aggregated list of persistent disks.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.disks.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.disks.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.disks.aggregatedList
* @memberOf! ()
*
@@ -18919,65 +19963,111 @@ export namespace compute_beta {
* compute.disks.createSnapshot
* @desc Creates a snapshot of a specified persistent disk.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.createSnapshot({
+ * // Name of the persistent disk to snapshot.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // [Input Only] Specifies to create an application consistent snapshot by informing the OS to prepare for the snapshot process. Currently only supported on Windows instances using the Volume Shadow Copy Service (VSS).
+ * guestFlush: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the persistent disk to snapshot.
- * disk: 'my-disk', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoCreated": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "downloadBytes": "my_downloadBytes",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "snapshotEncryptionKey": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "status": "my_status",
+ * // "storageBytes": "my_storageBytes",
+ * // "storageBytesStatus": "my_storageBytesStatus",
+ * // "storageLocations": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.disks.createSnapshot(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.disks.createSnapshot
* @memberOf! ()
*
@@ -19058,61 +20148,81 @@ export namespace compute_beta {
* compute.disks.delete
* @desc Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.delete({
+ * // Name of the persistent disk to delete.
+ * disk: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the persistent disk to delete.
- * disk: 'my-disk', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.disks.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.disks.delete
* @memberOf! ()
*
@@ -19190,61 +20300,85 @@ export namespace compute_beta {
* compute.disks.get
* @desc Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.get({
+ * // Name of the persistent disk to return.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the persistent disk to return.
- * disk: 'my-disk', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.disks.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskEncryptionKey": {},
+ * // "eraseWindowsVssSignature": false,
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "lastAttachTimestamp": "my_lastAttachTimestamp",
+ * // "lastDetachTimestamp": "my_lastDetachTimestamp",
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "options": "my_options",
+ * // "physicalBlockSizeBytes": "my_physicalBlockSizeBytes",
+ * // "region": "my_region",
+ * // "replicaZones": [],
+ * // "resourcePolicies": [],
+ * // "selfLink": "my_selfLink",
+ * // "sizeGb": "my_sizeGb",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "status": "my_status",
+ * // "storageType": "my_storageType",
+ * // "type": "my_type",
+ * // "users": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.disks.get
* @memberOf! ()
*
@@ -19318,6 +20452,62 @@ export namespace compute_beta {
/**
* compute.disks.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.getIamPolicy
* @memberOf! ()
*
@@ -19394,62 +20584,120 @@ export namespace compute_beta {
* compute.disks.insert
* @desc Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Optional. Source image to restore onto a disk.
+ * sourceImage: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskEncryptionKey": {},
+ * // "eraseWindowsVssSignature": false,
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "lastAttachTimestamp": "my_lastAttachTimestamp",
+ * // "lastDetachTimestamp": "my_lastDetachTimestamp",
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "options": "my_options",
+ * // "physicalBlockSizeBytes": "my_physicalBlockSizeBytes",
+ * // "region": "my_region",
+ * // "replicaZones": [],
+ * // "resourcePolicies": [],
+ * // "selfLink": "my_selfLink",
+ * // "sizeGb": "my_sizeGb",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "status": "my_status",
+ * // "storageType": "my_storageType",
+ * // "type": "my_type",
+ * // "users": [],
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.disks.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.disks.insert
* @memberOf! ()
*
@@ -19527,71 +20775,75 @@ export namespace compute_beta {
* compute.disks.list
* @desc Retrieves a list of persistent disks contained within the specified zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.disks.list(request, handlePage);
- * }
- * };
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.disks.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.disks.list
* @memberOf! ()
*
@@ -19667,6 +20919,90 @@ export namespace compute_beta {
/**
* compute.disks.removeResourcePolicies
* @desc Removes resource policies from a disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.removeResourcePolicies({
+ * // The disk name for this request.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.removeResourcePolicies
* @memberOf! ()
*
@@ -19748,65 +21084,89 @@ export namespace compute_beta {
* compute.disks.resize
* @desc Resizes the specified persistent disk. You can only increase the size of the disk.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.resize({
+ * // The name of the persistent disk.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the persistent disk.
- * disk: 'my-disk', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sizeGb": "my_sizeGb"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.disks.resize(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.disks.resize
* @memberOf! ()
*
@@ -19884,6 +21244,69 @@ export namespace compute_beta {
/**
* compute.disks.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.setIamPolicy
* @memberOf! ()
*
@@ -19960,65 +21383,90 @@ export namespace compute_beta {
* compute.disks.setLabels
* @desc Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.setLabels({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.disks.setLabels(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.disks.setLabels
* @memberOf! ()
*
@@ -20097,65 +21545,62 @@ export namespace compute_beta {
* compute.disks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.disks.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.disks.testIamPermissions
* @memberOf! ()
*
@@ -20600,68 +22045,75 @@ export namespace compute_beta {
* compute.diskTypes.aggregatedList
* @desc Retrieves an aggregated list of disk types.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.diskTypes.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.diskTypes.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.diskTypes.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.diskTypes.aggregatedList
* @memberOf! ()
*
@@ -20745,61 +22197,64 @@ export namespace compute_beta {
* compute.diskTypes.get
* @desc Returns the specified disk type. Gets a list of available disk types by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.diskTypes.get({
+ * // Name of the disk type to return.
+ * diskType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the disk type to return.
- * diskType: 'my-disk-type', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.diskTypes.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultDiskSizeGb": "my_defaultDiskSizeGb",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "validDiskSize": "my_validDiskSize",
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.diskTypes.get
* @memberOf! ()
*
@@ -20874,71 +22329,75 @@ export namespace compute_beta {
* compute.diskTypes.list
* @desc Retrieves a list of disk types available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.diskTypes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.diskTypes.list(request, handlePage);
- * }
- * };
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.diskTypes.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.diskTypes.list
* @memberOf! ()
*
@@ -21107,6 +22566,80 @@ export namespace compute_beta {
/**
* compute.externalVpnGateways.delete
* @desc Deletes the specified externalVpnGateway.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.delete({
+ * // Name of the externalVpnGateways to delete.
+ * externalVpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.delete
* @memberOf! ()
*
@@ -21183,6 +22716,62 @@ export namespace compute_beta {
/**
* compute.externalVpnGateways.get
* @desc Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.get({
+ * // Name of the externalVpnGateway to return.
+ * externalVpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "redundancyType": "my_redundancyType",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.get
* @memberOf! ()
*
@@ -21258,6 +22847,95 @@ export namespace compute_beta {
/**
* compute.externalVpnGateways.insert
* @desc Creates a ExternalVpnGateway in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "redundancyType": "my_redundancyType",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.insert
* @memberOf! ()
*
@@ -21334,6 +23012,75 @@ export namespace compute_beta {
/**
* compute.externalVpnGateways.list
* @desc Retrieves the list of ExternalVpnGateway available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.list
* @memberOf! ()
*
@@ -21414,6 +23161,83 @@ export namespace compute_beta {
/**
* compute.externalVpnGateways.setLabels
* @desc Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.setLabels
* @memberOf! ()
*
@@ -21490,6 +23314,61 @@ export namespace compute_beta {
/**
* compute.externalVpnGateways.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.testIamPermissions
* @memberOf! ()
*
@@ -21706,58 +23585,79 @@ export namespace compute_beta {
* compute.firewalls.delete
* @desc Deletes the specified firewall.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.delete({
* // Name of the firewall rule to delete.
- * firewall: 'my-firewall', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.firewalls.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * firewall: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.firewalls.delete
* @memberOf! ()
*
@@ -21834,58 +23734,71 @@ export namespace compute_beta {
* compute.firewalls.get
* @desc Returns the specified firewall.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.get({
* // Name of the firewall rule to return.
- * firewall: 'my-firewall', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.firewalls.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * firewall: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "allowed": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "denied": [],
+ * // "description": "my_description",
+ * // "destinationRanges": [],
+ * // "direction": "my_direction",
+ * // "disabled": false,
+ * // "enableLogging": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "sourceRanges": [],
+ * // "sourceServiceAccounts": [],
+ * // "sourceTags": [],
+ * // "targetServiceAccounts": [],
+ * // "targetTags": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.firewalls.get
* @memberOf! ()
*
@@ -21959,59 +23872,104 @@ export namespace compute_beta {
* compute.firewalls.insert
* @desc Creates a firewall rule in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "allowed": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "denied": [],
+ * // "description": "my_description",
+ * // "destinationRanges": [],
+ * // "direction": "my_direction",
+ * // "disabled": false,
+ * // "enableLogging": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "sourceRanges": [],
+ * // "sourceServiceAccounts": [],
+ * // "sourceTags": [],
+ * // "targetServiceAccounts": [],
+ * // "targetTags": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.firewalls.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.firewalls.insert
* @memberOf! ()
*
@@ -22087,68 +24045,73 @@ export namespace compute_beta {
* compute.firewalls.list
* @desc Retrieves the list of firewall rules available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.firewalls.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.firewalls.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.firewalls.list
* @memberOf! ()
*
@@ -22226,63 +24189,106 @@ export namespace compute_beta {
* compute.firewalls.patch
* @desc Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.patch({
* // Name of the firewall rule to patch.
- * firewall: 'my-firewall', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * firewall: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "allowed": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "denied": [],
+ * // "description": "my_description",
+ * // "destinationRanges": [],
+ * // "direction": "my_direction",
+ * // "disabled": false,
+ * // "enableLogging": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "sourceRanges": [],
+ * // "sourceServiceAccounts": [],
+ * // "sourceTags": [],
+ * // "targetServiceAccounts": [],
+ * // "targetTags": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.firewalls.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.firewalls.patch
* @memberOf! ()
*
@@ -22360,62 +24366,60 @@ export namespace compute_beta {
* compute.firewalls.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.firewalls.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.firewalls.testIamPermissions
* @memberOf! ()
*
@@ -22497,63 +24501,106 @@ export namespace compute_beta {
* compute.firewalls.update
* @desc Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.update({
* // Name of the firewall rule to update.
- * firewall: 'my-firewall', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * firewall: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "allowed": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "denied": [],
+ * // "description": "my_description",
+ * // "destinationRanges": [],
+ * // "direction": "my_direction",
+ * // "disabled": false,
+ * // "enableLogging": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "sourceRanges": [],
+ * // "sourceServiceAccounts": [],
+ * // "sourceTags": [],
+ * // "targetServiceAccounts": [],
+ * // "targetTags": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.firewalls.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.firewalls.update
* @memberOf! ()
*
@@ -22789,68 +24836,75 @@ export namespace compute_beta {
* compute.forwardingRules.aggregatedList
* @desc Retrieves an aggregated list of forwarding rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.forwardingRules.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.forwardingRules.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.forwardingRules.aggregatedList
* @memberOf! ()
*
@@ -22940,61 +24994,81 @@ export namespace compute_beta {
* compute.forwardingRules.delete
* @desc Deletes the specified ForwardingRule resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.delete({
+ * // Name of the ForwardingRule resource to delete.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the ForwardingRule resource to delete.
- * forwardingRule: 'my-forwarding-rule', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.forwardingRules.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.forwardingRules.delete
* @memberOf! ()
*
@@ -23073,61 +25147,80 @@ export namespace compute_beta {
* compute.forwardingRules.get
* @desc Returns the specified ForwardingRule resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.get({
+ * // Name of the ForwardingRule resource to return.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the ForwardingRule resource to return.
- * forwardingRule: 'my-forwarding-rule', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.forwardingRules.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.forwardingRules.get
* @memberOf! ()
*
@@ -23205,62 +25298,113 @@ export namespace compute_beta {
* compute.forwardingRules.insert
* @desc Creates a ForwardingRule resource in the specified project and region using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.forwardingRules.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.forwardingRules.insert
* @memberOf! ()
*
@@ -23339,71 +25483,75 @@ export namespace compute_beta {
* compute.forwardingRules.list
* @desc Retrieves a list of ForwardingRule resources available to the specified project and region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.forwardingRules.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.forwardingRules.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.forwardingRules.list
* @memberOf! ()
*
@@ -23483,6 +25631,116 @@ export namespace compute_beta {
/**
* compute.forwardingRules.patch
* @desc Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.patch({
+ * // Name of the ForwardingRule resource to patch.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.forwardingRules.patch
* @memberOf! ()
*
@@ -23562,65 +25820,90 @@ export namespace compute_beta {
* compute.forwardingRules.setLabels
* @desc Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.setLabels({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.forwardingRules.setLabels(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.forwardingRules.setLabels
* @memberOf! ()
*
@@ -23700,65 +25983,89 @@ export namespace compute_beta {
* compute.forwardingRules.setTarget
* @desc Changes target URL for forwarding rule. The new target should be of the same type as the old target.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.setTarget({
+ * // Name of the ForwardingRule resource in which target is to be set.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the ForwardingRule resource in which target is to be set.
- * forwardingRule: 'my-forwarding-rule', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "target": "my_target"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.forwardingRules.setTarget(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.forwardingRules.setTarget
* @memberOf! ()
*
@@ -23838,65 +26145,62 @@ export namespace compute_beta {
* compute.forwardingRules.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.forwardingRules.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.forwardingRules.testIamPermissions
* @memberOf! ()
*
@@ -24232,58 +26536,79 @@ export namespace compute_beta {
* compute.globalAddresses.delete
* @desc Deletes the specified address resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalAddresses.delete({
* // Name of the address resource to delete.
- * address: 'my-address', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.globalAddresses.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * address: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalAddresses.delete
* @memberOf! ()
*
@@ -24361,58 +26686,70 @@ export namespace compute_beta {
* compute.globalAddresses.get
* @desc Returns the specified address resource. Gets a list of available addresses by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalAddresses.get({
* // Name of the address resource to return.
- * address: 'my-address', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.globalAddresses.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * address: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": "my_address",
+ * // "addressType": "my_addressType",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "prefixLength": 0,
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "subnetwork": "my_subnetwork",
+ * // "users": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalAddresses.get
* @memberOf! ()
*
@@ -24487,59 +26824,103 @@ export namespace compute_beta {
* compute.globalAddresses.insert
* @desc Creates an address resource in the specified project by using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalAddresses.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": "my_address",
+ * // "addressType": "my_addressType",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "prefixLength": 0,
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "subnetwork": "my_subnetwork",
+ * // "users": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.globalAddresses.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalAddresses.insert
* @memberOf! ()
*
@@ -24616,68 +26997,73 @@ export namespace compute_beta {
* compute.globalAddresses.list
* @desc Retrieves a list of global addresses.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.globalAddresses.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalAddresses.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.globalAddresses.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalAddresses.list
* @memberOf! ()
*
@@ -24756,62 +27142,82 @@ export namespace compute_beta {
* compute.globalAddresses.setLabels
* @desc Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalAddresses.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.globalAddresses.setLabels(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalAddresses.setLabels
* @memberOf! ()
*
@@ -24889,62 +27295,60 @@ export namespace compute_beta {
* compute.globalAddresses.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalAddresses.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.globalAddresses.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalAddresses.testIamPermissions
* @memberOf! ()
*
@@ -25161,58 +27565,79 @@ export namespace compute_beta {
* compute.globalForwardingRules.delete
* @desc Deletes the specified GlobalForwardingRule resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.delete({
* // Name of the ForwardingRule resource to delete.
- * forwardingRule: 'my-forwarding-rule', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.globalForwardingRules.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalForwardingRules.delete
* @memberOf! ()
*
@@ -25290,58 +27715,78 @@ export namespace compute_beta {
* compute.globalForwardingRules.get
* @desc Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.get({
* // Name of the ForwardingRule resource to return.
- * forwardingRule: 'my-forwarding-rule', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.globalForwardingRules.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalForwardingRules.get
* @memberOf! ()
*
@@ -25418,59 +27863,111 @@ export namespace compute_beta {
* compute.globalForwardingRules.insert
* @desc Creates a GlobalForwardingRule resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.globalForwardingRules.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalForwardingRules.insert
* @memberOf! ()
*
@@ -25548,68 +28045,73 @@ export namespace compute_beta {
* compute.globalForwardingRules.list
* @desc Retrieves a list of GlobalForwardingRule resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.globalForwardingRules.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.globalForwardingRules.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalForwardingRules.list
* @memberOf! ()
*
@@ -25688,6 +28190,114 @@ export namespace compute_beta {
/**
* compute.globalForwardingRules.patch
* @desc Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.patch({
+ * // Name of the ForwardingRule resource to patch.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalForwardingRules.patch
* @memberOf! ()
*
@@ -25766,62 +28376,82 @@ export namespace compute_beta {
* compute.globalForwardingRules.setLabels
* @desc Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.globalForwardingRules.setLabels(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalForwardingRules.setLabels
* @memberOf! ()
*
@@ -25899,62 +28529,87 @@ export namespace compute_beta {
* compute.globalForwardingRules.setTarget
* @desc Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.setTarget({
* // Name of the ForwardingRule resource in which target is to be set.
- * forwardingRule: 'my-forwarding-rule', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "target": "my_target"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.globalForwardingRules.setTarget(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalForwardingRules.setTarget
* @memberOf! ()
*
@@ -26033,62 +28688,60 @@ export namespace compute_beta {
* compute.globalForwardingRules.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.globalForwardingRules.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalForwardingRules.testIamPermissions
* @memberOf! ()
*
@@ -26354,6 +29007,88 @@ export namespace compute_beta {
/**
* compute.globalNetworkEndpointGroups.attachNetworkEndpoints
* @desc Attach a network endpoint to the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.attachNetworkEndpoints({
+ * // The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkEndpoints": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.attachNetworkEndpoints
* @memberOf! ()
*
@@ -26433,6 +29168,80 @@ export namespace compute_beta {
/**
* compute.globalNetworkEndpointGroups.delete
* @desc Deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are backend services referencing it.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.delete({
+ * // The name of the network endpoint group to delete. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.delete
* @memberOf! ()
*
@@ -26509,6 +29318,88 @@ export namespace compute_beta {
/**
* compute.globalNetworkEndpointGroups.detachNetworkEndpoints
* @desc Detach the network endpoint from the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.detachNetworkEndpoints({
+ * // The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkEndpoints": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.detachNetworkEndpoints
* @memberOf! ()
*
@@ -26588,6 +29479,66 @@ export namespace compute_beta {
/**
* compute.globalNetworkEndpointGroups.get
* @desc Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.get({
+ * // The name of the network endpoint group. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "annotations": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultPort": 0,
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancer": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkEndpointType": "my_networkEndpointType",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.get
* @memberOf! ()
*
@@ -26665,6 +29616,99 @@ export namespace compute_beta {
/**
* compute.globalNetworkEndpointGroups.insert
* @desc Creates a network endpoint group in the specified project using the parameters that are included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "annotations": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultPort": 0,
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancer": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkEndpointType": "my_networkEndpointType",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.insert
* @memberOf! ()
*
@@ -26741,6 +29785,74 @@ export namespace compute_beta {
/**
* compute.globalNetworkEndpointGroups.list
* @desc Retrieves the list of network endpoint groups that are located in the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.list
* @memberOf! ()
*
@@ -26821,6 +29933,75 @@ export namespace compute_beta {
/**
* compute.globalNetworkEndpointGroups.listNetworkEndpoints
* @desc Lists the network endpoints in the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.listNetworkEndpoints({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.listNetworkEndpoints
* @memberOf! ()
*
@@ -27099,68 +30280,75 @@ export namespace compute_beta {
* compute.globalOperations.aggregatedList
* @desc Retrieves an aggregated list of all operations.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.globalOperations.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOperations.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.globalOperations.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalOperations.aggregatedList
* @memberOf! ()
*
@@ -27244,55 +30432,46 @@ export namespace compute_beta {
* compute.globalOperations.delete
* @desc Deletes the specified Operations resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOperations.delete({
* // Name of the Operations resource to delete.
- * operation: 'my-operation', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.globalOperations.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalOperations.delete
* @memberOf! ()
*
@@ -27367,58 +30546,74 @@ export namespace compute_beta {
* compute.globalOperations.get
* @desc Retrieves the specified Operations resource. Gets a list of operations by making a `list()` request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOperations.get({
* // Name of the Operations resource to return.
- * operation: 'my-operation', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.globalOperations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalOperations.get
* @memberOf! ()
*
@@ -27495,68 +30690,73 @@ export namespace compute_beta {
* compute.globalOperations.list
* @desc Retrieves a list of Operation resources contained within the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.globalOperations.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOperations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.globalOperations.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalOperations.list
* @memberOf! ()
*
@@ -27634,6 +30834,75 @@ export namespace compute_beta {
/**
* compute.globalOperations.wait
* @desc Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be `DONE` or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not `DONE`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOperations.wait({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalOperations.wait
* @memberOf! ()
*
@@ -27825,6 +31094,46 @@ export namespace compute_beta {
/**
* compute.globalOrganizationOperations.delete
* @desc Deletes the specified Operations resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOrganizationOperations.delete({
+ * // Name of the Operations resource to delete.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Parent ID for this request.
+ * parentId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalOrganizationOperations.delete
* @memberOf! ()
*
@@ -27898,6 +31207,74 @@ export namespace compute_beta {
/**
* compute.globalOrganizationOperations.get
* @desc Retrieves the specified Operations resource. Gets a list of operations by making a `list()` request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOrganizationOperations.get({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Parent ID for this request.
+ * parentId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalOrganizationOperations.get
* @memberOf! ()
*
@@ -27973,6 +31350,73 @@ export namespace compute_beta {
/**
* compute.globalOrganizationOperations.list
* @desc Retrieves a list of Operation resources contained within the specified organization.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOrganizationOperations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Parent ID for this request.
+ * parentId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalOrganizationOperations.list
* @memberOf! ()
*
@@ -28118,6 +31562,76 @@ export namespace compute_beta {
/**
* compute.healthChecks.aggregatedList
* @desc Retrieves the list of all HealthCheck resources, regional and global, available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Name of the project scoping this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.healthChecks.aggregatedList
* @memberOf! ()
*
@@ -28205,58 +31719,79 @@ export namespace compute_beta {
* compute.healthChecks.delete
* @desc Deletes the specified HealthCheck resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.delete({
* // Name of the HealthCheck resource to delete.
- * healthCheck: 'my-health-check', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.healthChecks.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.healthChecks.delete
* @memberOf! ()
*
@@ -28334,58 +31869,69 @@ export namespace compute_beta {
* compute.healthChecks.get
* @desc Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.get({
* // Name of the HealthCheck resource to return.
- * healthCheck: 'my-health-check', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.healthChecks.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "unhealthyThreshold": 0
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.healthChecks.get
* @memberOf! ()
*
@@ -28461,59 +32007,102 @@ export namespace compute_beta {
* compute.healthChecks.insert
* @desc Creates a HealthCheck resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.healthChecks.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.healthChecks.insert
* @memberOf! ()
*
@@ -28590,68 +32179,73 @@ export namespace compute_beta {
* compute.healthChecks.list
* @desc Retrieves the list of HealthCheck resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.healthChecks.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.healthChecks.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.healthChecks.list
* @memberOf! ()
*
@@ -28730,63 +32324,104 @@ export namespace compute_beta {
* compute.healthChecks.patch
* @desc Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.patch({
* // Name of the HealthCheck resource to patch.
- * healthCheck: 'my-health-check', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.healthChecks.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.healthChecks.patch
* @memberOf! ()
*
@@ -28865,62 +32500,60 @@ export namespace compute_beta {
* compute.healthChecks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.healthChecks.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.healthChecks.testIamPermissions
* @memberOf! ()
*
@@ -29002,63 +32635,104 @@ export namespace compute_beta {
* compute.healthChecks.update
* @desc Updates a HealthCheck resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.update({
* // Name of the HealthCheck resource to update.
- * healthCheck: 'my-health-check', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.healthChecks.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.healthChecks.update
* @memberOf! ()
*
@@ -29332,58 +33006,79 @@ export namespace compute_beta {
* compute.httpHealthChecks.delete
* @desc Deletes the specified HttpHealthCheck resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.delete({
* // Name of the HttpHealthCheck resource to delete.
- * httpHealthCheck: 'my-http-health-check', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.httpHealthChecks.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpHealthChecks.delete
* @memberOf! ()
*
@@ -29461,58 +33156,64 @@ export namespace compute_beta {
* compute.httpHealthChecks.get
* @desc Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.get({
* // Name of the HttpHealthCheck resource to return.
- * httpHealthCheck: 'my-http-health-check', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.httpHealthChecks.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpHealthChecks.get
* @memberOf! ()
*
@@ -29589,59 +33290,97 @@ export namespace compute_beta {
* compute.httpHealthChecks.insert
* @desc Creates a HttpHealthCheck resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.httpHealthChecks.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpHealthChecks.insert
* @memberOf! ()
*
@@ -29719,68 +33458,73 @@ export namespace compute_beta {
* compute.httpHealthChecks.list
* @desc Retrieves the list of HttpHealthCheck resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.httpHealthChecks.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.httpHealthChecks.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpHealthChecks.list
* @memberOf! ()
*
@@ -29860,63 +33604,99 @@ export namespace compute_beta {
* compute.httpHealthChecks.patch
* @desc Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.patch({
* // Name of the HttpHealthCheck resource to patch.
- * httpHealthCheck: 'my-http-health-check', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.httpHealthChecks.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpHealthChecks.patch
* @memberOf! ()
*
@@ -29995,62 +33775,60 @@ export namespace compute_beta {
* compute.httpHealthChecks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.httpHealthChecks.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpHealthChecks.testIamPermissions
* @memberOf! ()
*
@@ -30132,63 +33910,99 @@ export namespace compute_beta {
* compute.httpHealthChecks.update
* @desc Updates a HttpHealthCheck resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.update({
* // Name of the HttpHealthCheck resource to update.
- * httpHealthCheck: 'my-http-health-check', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.httpHealthChecks.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpHealthChecks.update
* @memberOf! ()
*
@@ -30431,58 +34245,79 @@ export namespace compute_beta {
* compute.httpsHealthChecks.delete
* @desc Deletes the specified HttpsHealthCheck resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.delete({
* // Name of the HttpsHealthCheck resource to delete.
- * httpsHealthCheck: 'my-https-health-check', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.httpsHealthChecks.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpsHealthChecks.delete
* @memberOf! ()
*
@@ -30560,58 +34395,64 @@ export namespace compute_beta {
* compute.httpsHealthChecks.get
* @desc Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.get({
* // Name of the HttpsHealthCheck resource to return.
- * httpsHealthCheck: 'my-https-health-check', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.httpsHealthChecks.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpsHealthChecks.get
* @memberOf! ()
*
@@ -30688,59 +34529,97 @@ export namespace compute_beta {
* compute.httpsHealthChecks.insert
* @desc Creates a HttpsHealthCheck resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.httpsHealthChecks.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpsHealthChecks.insert
* @memberOf! ()
*
@@ -30818,68 +34697,73 @@ export namespace compute_beta {
* compute.httpsHealthChecks.list
* @desc Retrieves the list of HttpsHealthCheck resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.httpsHealthChecks.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.httpsHealthChecks.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpsHealthChecks.list
* @memberOf! ()
*
@@ -30961,63 +34845,99 @@ export namespace compute_beta {
* compute.httpsHealthChecks.patch
* @desc Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.patch({
* // Name of the HttpsHealthCheck resource to patch.
- * httpsHealthCheck: 'my-https-health-check', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.httpsHealthChecks.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpsHealthChecks.patch
* @memberOf! ()
*
@@ -31096,62 +35016,60 @@ export namespace compute_beta {
* compute.httpsHealthChecks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.httpsHealthChecks.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpsHealthChecks.testIamPermissions
* @memberOf! ()
*
@@ -31233,63 +35151,99 @@ export namespace compute_beta {
* compute.httpsHealthChecks.update
* @desc Updates a HttpsHealthCheck resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.update({
* // Name of the HttpsHealthCheck resource to update.
- * httpsHealthCheck: 'my-https-health-check', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.httpsHealthChecks.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpsHealthChecks.update
* @memberOf! ()
*
@@ -31532,58 +35486,79 @@ export namespace compute_beta {
* compute.images.delete
* @desc Deletes the specified image.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.delete({
* // Name of the image resource to delete.
- * image: 'my-image', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.images.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * image: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.images.delete
* @memberOf! ()
*
@@ -31659,62 +35634,91 @@ export namespace compute_beta {
* compute.images.deprecate
* @desc Sets the deprecation status of an image. If an empty request body is given, clears the deprecation status instead.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.deprecate({
* // Image name.
- * image: 'my-image', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * image: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deleted": "my_deleted",
+ * // "deprecated": "my_deprecated",
+ * // "obsolete": "my_obsolete",
+ * // "replacement": "my_replacement",
+ * // "state": "my_state"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.images.deprecate(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.images.deprecate
* @memberOf! ()
*
@@ -31792,58 +35796,81 @@ export namespace compute_beta {
* compute.images.get
* @desc Returns the specified image. Gets a list of available images by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.get({
* // Name of the image resource to return.
- * image: 'my-image', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.images.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * image: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "archiveSizeBytes": "my_archiveSizeBytes",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "family": "my_family",
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "imageEncryptionKey": {},
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "rawDisk": {},
+ * // "selfLink": "my_selfLink",
+ * // "shieldedInstanceInitialState": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "sourceType": "my_sourceType",
+ * // "status": "my_status",
+ * // "storageLocations": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.images.get
* @memberOf! ()
*
@@ -31916,58 +35943,81 @@ export namespace compute_beta {
* compute.images.getFromFamily
* @desc Returns the latest image that is part of an image family and is not deprecated.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.getFromFamily({
* // Name of the image family to search for.
- * family: 'my-family', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.images.getFromFamily(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * family: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "archiveSizeBytes": "my_archiveSizeBytes",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "family": "my_family",
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "imageEncryptionKey": {},
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "rawDisk": {},
+ * // "selfLink": "my_selfLink",
+ * // "shieldedInstanceInitialState": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "sourceType": "my_sourceType",
+ * // "status": "my_status",
+ * // "storageLocations": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.images.getFromFamily
* @memberOf! ()
*
@@ -32041,6 +36091,60 @@ export namespace compute_beta {
/**
* compute.images.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.images.getIamPolicy
* @memberOf! ()
*
@@ -32116,59 +36220,119 @@ export namespace compute_beta {
* compute.images.insert
* @desc Creates an image in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/devstorage.full_control',
+ * 'https://www.googleapis.com/auth/devstorage.read_only',
+ * 'https://www.googleapis.com/auth/devstorage.read_write',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.insert({
+ * // Force image creation if true.
+ * forceCreate: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "archiveSizeBytes": "my_archiveSizeBytes",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "family": "my_family",
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "imageEncryptionKey": {},
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "rawDisk": {},
+ * // "selfLink": "my_selfLink",
+ * // "shieldedInstanceInitialState": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "sourceType": "my_sourceType",
+ * // "status": "my_status",
+ * // "storageLocations": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.images.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.images.insert
* @memberOf! ()
*
@@ -32245,68 +36409,73 @@ export namespace compute_beta {
* compute.images.list
* @desc Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.images.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.images.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.images.list
* @memberOf! ()
*
@@ -32383,6 +36552,67 @@ export namespace compute_beta {
/**
* compute.images.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.images.setIamPolicy
* @memberOf! ()
*
@@ -32458,62 +36688,82 @@ export namespace compute_beta {
* compute.images.setLabels
* @desc Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.images.setLabels(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.images.setLabels
* @memberOf! ()
*
@@ -32590,62 +36840,60 @@ export namespace compute_beta {
* compute.images.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.images.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.images.testIamPermissions
* @memberOf! ()
*
@@ -32942,65 +37190,89 @@ export namespace compute_beta {
* compute.instanceGroupManagers.abandonInstances
* @desc Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.abandonInstances({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.abandonInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.abandonInstances
* @memberOf! ()
*
@@ -33080,68 +37352,75 @@ export namespace compute_beta {
* compute.instanceGroupManagers.aggregatedList
* @desc Retrieves the list of managed instance groups and groups them by zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instanceGroupManagers.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.instanceGroupManagers.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.aggregatedList
* @memberOf! ()
*
@@ -33230,6 +37509,86 @@ export namespace compute_beta {
/**
* compute.instanceGroupManagers.applyUpdatesToInstances
* @desc Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.applyUpdatesToInstances({
+ * // The name of the managed instance group, should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the managed instance group is located. Should conform to RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": [],
+ * // "minimalAction": "my_minimalAction",
+ * // "mostDisruptiveAllowedAction": "my_mostDisruptiveAllowedAction"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.applyUpdatesToInstances
* @memberOf! ()
*
@@ -33309,6 +37668,90 @@ export namespace compute_beta {
/**
* compute.instanceGroupManagers.createInstances
* @desc Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.createInstances({
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located. It should conform to RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.createInstances
* @memberOf! ()
*
@@ -33388,61 +37831,81 @@ export namespace compute_beta {
* compute.instanceGroupManagers.delete
* @desc Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.delete({
+ * // The name of the managed instance group to delete.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group to delete.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.delete
* @memberOf! ()
*
@@ -33521,65 +37984,89 @@ export namespace compute_beta {
* compute.instanceGroupManagers.deleteInstances
* @desc Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.deleteInstances({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.deleteInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.deleteInstances
* @memberOf! ()
*
@@ -33658,6 +38145,84 @@ export namespace compute_beta {
/**
* compute.instanceGroupManagers.deletePerInstanceConfigs
* @desc Deletes selected per-instance configs for the managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.deletePerInstanceConfigs({
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the managed instance group is located. It should conform to RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "names": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.deletePerInstanceConfigs
* @memberOf! ()
*
@@ -33738,61 +38303,78 @@ export namespace compute_beta {
* compute.instanceGroupManagers.get
* @desc Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.get({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "failoverAction": "my_failoverAction",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "pendingActions": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "statefulPolicy": {},
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.get
* @memberOf! ()
*
@@ -33872,62 +38454,111 @@ export namespace compute_beta {
* compute.instanceGroupManagers.insert
* @desc Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where you want to create the managed instance group.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "failoverAction": "my_failoverAction",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "pendingActions": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "statefulPolicy": {},
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.insert
* @memberOf! ()
*
@@ -34006,71 +38637,75 @@ export namespace compute_beta {
* compute.instanceGroupManagers.list
* @desc Retrieves a list of managed instance groups that are contained within the specified project and zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instanceGroupManagers.list(request, handlePage);
- * }
- * };
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.instanceGroupManagers.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.list
* @memberOf! ()
*
@@ -34152,6 +38787,74 @@ export namespace compute_beta {
/**
* compute.instanceGroupManagers.listErrors
* @desc Lists all errors thrown by actions on instances for a given managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.listErrors({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}.
+ * instanceGroupManager: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the managed instance group is located. It should conform to RFC1035.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.listErrors
* @memberOf! ()
*
@@ -34250,74 +38953,73 @@ export namespace compute_beta {
* compute.instanceGroupManagers.listManagedInstances
* @desc Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.listManagedInstances({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var managedInstancesPage = response['managedInstances'];
- * if (!managedInstancesPage) {
- * return;
- * }
- * for (var i = 0; i < managedInstancesPage.length; i++) {
- * // TODO: Change code below to process each resource in `managedInstancesPage`:
- * console.log(JSON.stringify(managedInstancesPage[i], null, 2));
- * }
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instanceGroupManagers.listManagedInstances(request, handlePage);
- * }
- * };
+ * // Example response
+ * // {
+ * // "managedInstances": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
*
- * compute.instanceGroupManagers.listManagedInstances(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.listManagedInstances
* @memberOf! ()
*
@@ -34422,6 +39124,75 @@ export namespace compute_beta {
/**
* compute.instanceGroupManagers.listPerInstanceConfigs
* @desc Lists all of the per-instance configs defined for the managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.listPerInstanceConfigs({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the managed instance group is located. It should conform to RFC1035.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.listPerInstanceConfigs
* @memberOf! ()
*
@@ -34527,66 +39298,113 @@ export namespace compute_beta {
* compute.instanceGroupManagers.patch
* @desc Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.patch({
+ * // The name of the instance group manager.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where you want to create the managed instance group.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the instance group manager.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "failoverAction": "my_failoverAction",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "pendingActions": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "statefulPolicy": {},
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.patch
* @memberOf! ()
*
@@ -34665,6 +39483,90 @@ export namespace compute_beta {
/**
* compute.instanceGroupManagers.patchPerInstanceConfigs
* @desc Inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.patchPerInstanceConfigs({
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located. It should conform to RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "perInstanceConfigs": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.patchPerInstanceConfigs
* @memberOf! ()
*
@@ -34746,65 +39648,89 @@ export namespace compute_beta {
* compute.instanceGroupManagers.recreateInstances
* @desc Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.recreateInstances({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.recreateInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.recreateInstances
* @memberOf! ()
*
@@ -34884,66 +39810,83 @@ export namespace compute_beta {
* compute.instanceGroupManagers.resize
* @desc Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including: + The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance. This list is subject to change. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.resize({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.
+ * size: 'placeholder-value',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * // The number of running instances that the managed instance group should maintain at any given time.
- * // The group automatically adds or removes instances to maintain the number of instances specified by
- * // this parameter.
- * size: 0, // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.resize(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.resize
* @memberOf! ()
*
@@ -35023,65 +39966,90 @@ export namespace compute_beta {
* compute.instanceGroupManagers.resizeAdvanced
* @desc Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method. If you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.resizeAdvanced({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "noCreationRetries": false,
+ * // "targetSize": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.resizeAdvanced(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.resizeAdvanced
* @memberOf! ()
*
@@ -35161,65 +40129,89 @@ export namespace compute_beta {
* compute.instanceGroupManagers.setAutoHealingPolicies
* @desc Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.setAutoHealingPolicies({
+ * // The name of the instance group manager.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the instance group manager.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.setAutoHealingPolicies(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.setAutoHealingPolicies
* @memberOf! ()
*
@@ -35301,65 +40293,89 @@ export namespace compute_beta {
* compute.instanceGroupManagers.setInstanceTemplate
* @desc Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.setInstanceTemplate({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instanceTemplate": "my_instanceTemplate"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.setInstanceTemplate(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.setInstanceTemplate
* @memberOf! ()
*
@@ -35439,65 +40455,90 @@ export namespace compute_beta {
* compute.instanceGroupManagers.setTargetPools
* @desc Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.setTargetPools({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "targetPools": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.setTargetPools(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.setTargetPools
* @memberOf! ()
*
@@ -35577,65 +40618,62 @@ export namespace compute_beta {
* compute.instanceGroupManagers.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.testIamPermissions
* @memberOf! ()
*
@@ -35718,66 +40756,113 @@ export namespace compute_beta {
* compute.instanceGroupManagers.update
* @desc Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.update({
+ * // The name of the instance group manager.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where you want to create the managed instance group.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the instance group manager.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "failoverAction": "my_failoverAction",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "pendingActions": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "statefulPolicy": {},
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.update
* @memberOf! ()
*
@@ -35856,6 +40941,90 @@ export namespace compute_beta {
/**
* compute.instanceGroupManagers.updatePerInstanceConfigs
* @desc Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.updatePerInstanceConfigs({
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located. It should conform to RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "perInstanceConfigs": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.updatePerInstanceConfigs
* @memberOf! ()
*
@@ -36637,65 +41806,89 @@ export namespace compute_beta {
* compute.instanceGroups.addInstances
* @desc Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.addInstances({
+ * // The name of the instance group where you are adding instances.
+ * instanceGroup: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the instance group where you are adding instances.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroups.addInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.addInstances
* @memberOf! ()
*
@@ -36775,68 +41968,75 @@ export namespace compute_beta {
* compute.instanceGroups.aggregatedList
* @desc Retrieves the list of instance groups and sorts them by zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instanceGroups.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.instanceGroups.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.aggregatedList
* @memberOf! ()
*
@@ -36924,61 +42124,81 @@ export namespace compute_beta {
* compute.instanceGroups.delete
* @desc Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.delete({
+ * // The name of the instance group to delete.
+ * instanceGroup: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the instance group to delete.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroups.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.delete
* @memberOf! ()
*
@@ -37057,61 +42277,66 @@ export namespace compute_beta {
* compute.instanceGroups.get
* @desc Returns the specified instance group. Gets a list of available instance groups by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.get({
+ * // The name of the instance group.
+ * instanceGroup: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone where the instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the instance group.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroups.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.get
* @memberOf! ()
*
@@ -37189,62 +42414,99 @@ export namespace compute_beta {
* compute.instanceGroups.insert
* @desc Creates an instance group in the specified project using the parameters that are included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where you want to create the instance group.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroups.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.insert
* @memberOf! ()
*
@@ -37323,71 +42585,75 @@ export namespace compute_beta {
* compute.instanceGroups.list
* @desc Retrieves the list of instance groups that are located in the specified project and zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone where the instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instanceGroups.list(request, handlePage);
- * }
- * };
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.instanceGroups.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.list
* @memberOf! ()
*
@@ -37468,78 +42734,85 @@ export namespace compute_beta {
* compute.instanceGroups.listInstances
* @desc Lists the instances in the specified instance group.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.listInstances({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the instance group from which you want to generate a list of included instances.
+ * instanceGroup: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone where the instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the instance group from which you want to generate a list of included instances.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instanceState": "my_instanceState"
+ * // }
* },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instanceGroups.listInstances(request, handlePage);
- * }
- * };
- *
- * compute.instanceGroups.listInstances(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.listInstances
* @memberOf! ()
*
@@ -37629,65 +42902,89 @@ export namespace compute_beta {
* compute.instanceGroups.removeInstances
* @desc Removes one or more instances from the specified instance group, but does not delete those instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.removeInstances({
+ * // The name of the instance group where the specified instances will be removed.
+ * instanceGroup: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the instance group where the specified instances will be removed.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroups.removeInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.removeInstances
* @memberOf! ()
*
@@ -37767,65 +43064,90 @@ export namespace compute_beta {
* compute.instanceGroups.setNamedPorts
* @desc Sets the named ports for the specified instance group.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.setNamedPorts({
+ * // The name of the instance group where the named ports are updated.
+ * instanceGroup: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the instance group where the named ports are updated.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "namedPorts": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroups.setNamedPorts(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.setNamedPorts
* @memberOf! ()
*
@@ -37905,65 +43227,62 @@ export namespace compute_beta {
* compute.instanceGroups.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.instanceGroups.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.testIamPermissions
* @memberOf! ()
*
@@ -38340,68 +43659,97 @@ export namespace compute_beta {
* compute.instances.addAccessConfig
* @desc Adds an access config to an instance's network interface.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.addAccessConfig({
* // The instance name for this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // The name of the network interface to add to this instance.
- * networkInterface: '', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * networkInterface: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "natIP": "my_natIP",
+ * // "networkTier": "my_networkTier",
+ * // "publicPtrDomainName": "my_publicPtrDomainName",
+ * // "setPublicPtr": false,
+ * // "type": "my_type"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.addAccessConfig(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.addAccessConfig
* @memberOf! ()
*
@@ -38481,6 +43829,90 @@ export namespace compute_beta {
/**
* compute.instances.addResourcePolicies
* @desc Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.addResourcePolicies({
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.addResourcePolicies
* @memberOf! ()
*
@@ -38560,68 +43992,75 @@ export namespace compute_beta {
* compute.instances.aggregatedList
* @desc Retrieves aggregated list of all of the instances in your project across all regions and zones.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instances.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.instances.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.aggregatedList
* @memberOf! ()
*
@@ -38705,65 +44144,105 @@ export namespace compute_beta {
* compute.instances.attachDisk
* @desc Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.attachDisk({
+ * // Whether to force attach the disk even if it's currently attached to another instance.
+ * forceAttach: 'placeholder-value',
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The instance name for this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoDelete": false,
+ * // "boot": false,
+ * // "deviceName": "my_deviceName",
+ * // "diskEncryptionKey": {},
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "guestOsFeatures": [],
+ * // "index": 0,
+ * // "initializeParams": {},
+ * // "interface": "my_interface",
+ * // "kind": "my_kind",
+ * // "licenses": [],
+ * // "mode": "my_mode",
+ * // "shieldedInstanceInitialState": {},
+ * // "source": "my_source",
+ * // "type": "my_type"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.attachDisk(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.attachDisk
* @memberOf! ()
*
@@ -38844,61 +44323,81 @@ export namespace compute_beta {
* compute.instances.delete
* @desc Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.delete({
+ * // Name of the instance resource to delete.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance resource to delete.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.delete
* @memberOf! ()
*
@@ -38976,67 +44475,85 @@ export namespace compute_beta {
* compute.instances.deleteAccessConfig
* @desc Deletes an access config from an instance's network interface.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The instance name for this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.deleteAccessConfig({
* // The name of the access config to delete.
- * accessConfig: '', // TODO: Update placeholder value.
- *
+ * accessConfig: 'placeholder-value',
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // The name of the network interface.
- * networkInterface: '', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.deleteAccessConfig(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * networkInterface: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.deleteAccessConfig
* @memberOf! ()
*
@@ -39123,64 +44640,83 @@ export namespace compute_beta {
* compute.instances.detachDisk
* @desc Detaches a disk from an instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.detachDisk({
+ * // The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.
+ * deviceName: 'placeholder-value',
+ * // Instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Instance name.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * // Disk device name to detach.
- * deviceName: '', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.detachDisk(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.detachDisk
* @memberOf! ()
*
@@ -39260,61 +44796,90 @@ export namespace compute_beta {
* compute.instances.get
* @desc Returns the specified Instance resource. Gets a list of available instances by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.get({
+ * // Name of the instance resource to return.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance resource to return.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "canIpForward": false,
+ * // "cpuPlatform": "my_cpuPlatform",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deletionProtection": false,
+ * // "description": "my_description",
+ * // "disks": [],
+ * // "displayDevice": {},
+ * // "eraseWindowsVssSignature": false,
+ * // "fingerprint": "my_fingerprint",
+ * // "guestAccelerators": [],
+ * // "hostname": "my_hostname",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "machineType": "my_machineType",
+ * // "metadata": {},
+ * // "minCpuPlatform": "my_minCpuPlatform",
+ * // "name": "my_name",
+ * // "networkInterfaces": [],
+ * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess",
+ * // "reservationAffinity": {},
+ * // "resourcePolicies": [],
+ * // "scheduling": {},
+ * // "selfLink": "my_selfLink",
+ * // "serviceAccounts": [],
+ * // "shieldedInstanceConfig": {},
+ * // "shieldedInstanceIntegrityPolicy": {},
+ * // "shieldedVmConfig": {},
+ * // "shieldedVmIntegrityPolicy": {},
+ * // "sourceMachineImage": "my_sourceMachineImage",
+ * // "sourceMachineImageEncryptionKey": {},
+ * // "startRestricted": false,
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "tags": {},
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.get
* @memberOf! ()
*
@@ -39388,6 +44953,58 @@ export namespace compute_beta {
/**
* compute.instances.getEffectiveFirewalls
* @desc Returns effective firewalls applied to an interface of the instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getEffectiveFirewalls({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The name of the network interface to get the effective firewalls.
+ * networkInterface: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "firewalls": [],
+ * // "organizationFirewalls": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.getEffectiveFirewalls
* @memberOf! ()
*
@@ -39482,6 +45099,64 @@ export namespace compute_beta {
/**
* compute.instances.getGuestAttributes
* @desc Returns the specified guest attributes entry.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getGuestAttributes({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Specifies the guest attributes path to be queried.
+ * queryPath: 'placeholder-value',
+ * // Specifies the key for the guest attributes entry.
+ * variableKey: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "queryPath": "my_queryPath",
+ * // "queryValue": {},
+ * // "selfLink": "my_selfLink",
+ * // "variableKey": "my_variableKey",
+ * // "variableValue": "my_variableValue"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.getGuestAttributes
* @memberOf! ()
*
@@ -39562,6 +45237,62 @@ export namespace compute_beta {
/**
* compute.instances.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.getIamPolicy
* @memberOf! ()
*
@@ -39637,6 +45368,56 @@ export namespace compute_beta {
/**
* compute.instances.getScreenshot
* @desc Returns the screenshot from the specified instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getScreenshot({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "contents": "my_contents",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.getScreenshot
* @memberOf! ()
*
@@ -39714,61 +45495,62 @@ export namespace compute_beta {
* compute.instances.getSerialPortOutput
* @desc Returns the last 1 MB of serial port output from the specified instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getSerialPortOutput({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Specifies which COM or serial port to retrieve data from.
+ * port: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.
+ * start: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance scoping this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.getSerialPortOutput(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "contents": "my_contents",
+ * // "kind": "my_kind",
+ * // "next": "my_next",
+ * // "selfLink": "my_selfLink",
+ * // "start": "my_start"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.getSerialPortOutput
* @memberOf! ()
*
@@ -39849,6 +45631,57 @@ export namespace compute_beta {
/**
* compute.instances.getShieldedInstanceIdentity
* @desc Returns the Shielded Instance Identity of an instance
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getShieldedInstanceIdentity({
+ * // Name or id of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "encryptionKey": {},
+ * // "kind": "my_kind",
+ * // "signingKey": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.getShieldedInstanceIdentity
* @memberOf! ()
*
@@ -39929,6 +45762,57 @@ export namespace compute_beta {
/**
* compute.instances.getShieldedVmIdentity
* @desc Returns the Shielded VM Identity of an instance
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getShieldedVmIdentity({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "encryptionKey": {},
+ * // "kind": "my_kind",
+ * // "signingKey": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.getShieldedVmIdentity
* @memberOf! ()
*
@@ -40008,62 +45892,137 @@ export namespace compute_beta {
* compute.instances.insert
* @desc Creates an instance resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Specifies instance template to create the instance.
+ * //
+ * // This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
+ * // - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
+ * // - projects/project/global/instanceTemplates/instanceTemplate
+ * // - global/instanceTemplates/instanceTemplate
+ * sourceInstanceTemplate: 'placeholder-value',
+ * // Specifies instance machine to create the instance.
+ * //
+ * // This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
+ * // - https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage
+ * // - projects/project/global/global/machineImages/machineImage
+ * // - global/machineImages/machineImage
+ * sourceMachineImage: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "canIpForward": false,
+ * // "cpuPlatform": "my_cpuPlatform",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deletionProtection": false,
+ * // "description": "my_description",
+ * // "disks": [],
+ * // "displayDevice": {},
+ * // "eraseWindowsVssSignature": false,
+ * // "fingerprint": "my_fingerprint",
+ * // "guestAccelerators": [],
+ * // "hostname": "my_hostname",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "machineType": "my_machineType",
+ * // "metadata": {},
+ * // "minCpuPlatform": "my_minCpuPlatform",
+ * // "name": "my_name",
+ * // "networkInterfaces": [],
+ * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess",
+ * // "reservationAffinity": {},
+ * // "resourcePolicies": [],
+ * // "scheduling": {},
+ * // "selfLink": "my_selfLink",
+ * // "serviceAccounts": [],
+ * // "shieldedInstanceConfig": {},
+ * // "shieldedInstanceIntegrityPolicy": {},
+ * // "shieldedVmConfig": {},
+ * // "shieldedVmIntegrityPolicy": {},
+ * // "sourceMachineImage": "my_sourceMachineImage",
+ * // "sourceMachineImageEncryptionKey": {},
+ * // "startRestricted": false,
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "tags": {},
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.insert
* @memberOf! ()
*
@@ -40143,71 +46102,75 @@ export namespace compute_beta {
* compute.instances.list
* @desc Retrieves the list of instances contained within the specified zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instances.list(request, handlePage);
- * }
- * };
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.instances.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.list
* @memberOf! ()
*
@@ -40287,75 +46250,77 @@ export namespace compute_beta {
* compute.instances.listReferrers
* @desc Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.listReferrers({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.
+ * instance: '-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the target instance scoping this request, or '-' if the request should span over all
- * // instances in the container.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instances.listReferrers(request, handlePage);
- * }
- * };
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.instances.listReferrers(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.listReferrers
* @memberOf! ()
*
@@ -40440,6 +46405,90 @@ export namespace compute_beta {
/**
* compute.instances.removeResourcePolicies
* @desc Removes resource policies from an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.removeResourcePolicies({
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.removeResourcePolicies
* @memberOf! ()
*
@@ -40521,61 +46570,81 @@ export namespace compute_beta {
* compute.instances.reset
* @desc Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.reset({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance scoping this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.reset(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.reset
* @memberOf! ()
*
@@ -40652,6 +46721,91 @@ export namespace compute_beta {
/**
* compute.instances.resume
* @desc Resumes an instance that was suspended using the instances().suspend method.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.resume({
+ * // Name of the instance resource to resume.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "disks": [],
+ * // "instanceEncryptionKey": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.resume
* @memberOf! ()
*
@@ -40730,61 +46884,83 @@ export namespace compute_beta {
* compute.instances.setDeletionProtection
* @desc Sets deletion protection on the instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setDeletionProtection({
+ * // Whether the resource should be protected against deletion.
+ * deletionProtection: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setDeletionProtection(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setDeletionProtection
* @memberOf! ()
*
@@ -40866,67 +47042,85 @@ export namespace compute_beta {
* compute.instances.setDiskAutoDelete
* @desc Sets the auto-delete flag for a disk attached to an instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setDiskAutoDelete({
+ * // Whether to auto-delete the disk when the instance is deleted.
+ * autoDelete: 'placeholder-value',
+ * // The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.
+ * deviceName: 'w[w.-]{0,254}',
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The instance name.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * // Whether to auto-delete the disk when the instance is deleted.
- * autoDelete: false, // TODO: Update placeholder value.
- *
- * // The device name of the disk to modify.
- * deviceName: '', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setDiskAutoDelete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setDiskAutoDelete
* @memberOf! ()
*
@@ -41012,6 +47206,69 @@ export namespace compute_beta {
/**
* compute.instances.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setIamPolicy
* @memberOf! ()
*
@@ -41088,65 +47345,90 @@ export namespace compute_beta {
* compute.instances.setLabels
* @desc Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setLabels({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance scoping this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setLabels(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setLabels
* @memberOf! ()
*
@@ -41226,65 +47508,89 @@ export namespace compute_beta {
* compute.instances.setMachineResources
* @desc Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setMachineResources({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance scoping this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "guestAccelerators": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setMachineResources(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setMachineResources
* @memberOf! ()
*
@@ -41364,65 +47670,89 @@ export namespace compute_beta {
* compute.instances.setMachineType
* @desc Changes the machine type for a stopped instance to the machine type specified in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setMachineType({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance scoping this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "machineType": "my_machineType"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setMachineType(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setMachineType
* @memberOf! ()
*
@@ -41502,65 +47832,91 @@ export namespace compute_beta {
* compute.instances.setMetadata
* @desc Sets metadata for the specified instance to the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setMetadata({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance scoping this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setMetadata(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setMetadata
* @memberOf! ()
*
@@ -41640,65 +47996,89 @@ export namespace compute_beta {
* compute.instances.setMinCpuPlatform
* @desc Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setMinCpuPlatform({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance scoping this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "minCpuPlatform": "my_minCpuPlatform"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setMinCpuPlatform(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setMinCpuPlatform
* @memberOf! ()
*
@@ -41778,65 +48158,93 @@ export namespace compute_beta {
* compute.instances.setScheduling
* @desc Sets an instance's scheduling options.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setScheduling({
+ * // Instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Instance name.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "automaticRestart": false,
+ * // "minNodeCpus": 0,
+ * // "nodeAffinities": [],
+ * // "onHostMaintenance": "my_onHostMaintenance",
+ * // "preemptible": false
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setScheduling(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setScheduling
* @memberOf! ()
*
@@ -41916,65 +48324,90 @@ export namespace compute_beta {
* compute.instances.setServiceAccount
* @desc Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setServiceAccount({
+ * // Name of the instance resource to start.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance resource to start.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "email": "my_email",
+ * // "scopes": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setServiceAccount(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setServiceAccount
* @memberOf! ()
*
@@ -42053,6 +48486,90 @@ export namespace compute_beta {
/**
* compute.instances.setShieldedInstanceIntegrityPolicy
* @desc Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setShieldedInstanceIntegrityPolicy({
+ * // Name or id of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "updateAutoLearnPolicy": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setShieldedInstanceIntegrityPolicy
* @memberOf! ()
*
@@ -42133,6 +48650,90 @@ export namespace compute_beta {
/**
* compute.instances.setShieldedVmIntegrityPolicy
* @desc Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setShieldedVmIntegrityPolicy({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "updateAutoLearnPolicy": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setShieldedVmIntegrityPolicy
* @memberOf! ()
*
@@ -42214,65 +48815,90 @@ export namespace compute_beta {
* compute.instances.setTags
* @desc Sets network tags for the specified instance to the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setTags({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance scoping this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "items": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setTags(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setTags
* @memberOf! ()
*
@@ -42351,6 +48977,76 @@ export namespace compute_beta {
/**
* compute.instances.simulateMaintenanceEvent
* @desc Simulates a maintenance event on the instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.simulateMaintenanceEvent({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.simulateMaintenanceEvent
* @memberOf! ()
*
@@ -42430,61 +49126,81 @@ export namespace compute_beta {
* compute.instances.start
* @desc Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.start({
+ * // Name of the instance resource to start.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance resource to start.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.start(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.start
* @memberOf! ()
*
@@ -42562,65 +49278,89 @@ export namespace compute_beta {
* compute.instances.startWithEncryptionKey
* @desc Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.startWithEncryptionKey({
+ * // Name of the instance resource to start.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance resource to start.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "disks": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.startWithEncryptionKey(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.startWithEncryptionKey
* @memberOf! ()
*
@@ -42702,61 +49442,81 @@ export namespace compute_beta {
* compute.instances.stop
* @desc Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.stop({
+ * // Name of the instance resource to stop.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance resource to stop.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.stop(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.stop
* @memberOf! ()
*
@@ -42833,6 +49593,84 @@ export namespace compute_beta {
/**
* compute.instances.suspend
* @desc This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.suspend({
+ * // If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).
+ * discardLocalSsd: 'placeholder-value',
+ * // Name of the instance resource to suspend.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.suspend
* @memberOf! ()
*
@@ -42912,65 +49750,62 @@ export namespace compute_beta {
* compute.instances.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.instances.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.testIamPermissions
* @memberOf! ()
*
@@ -43052,6 +49887,130 @@ export namespace compute_beta {
/**
* compute.instances.update
* @desc Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.update({
+ * // Name of the instance resource to update.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Specifies the action to take when updating an instance even if the updated properties do not require it. If not specified, then Compute Engine acts based on the minimum action that the updated properties require.
+ * minimalAction: 'placeholder-value',
+ * // Specifies the most disruptive action that can be taken on the instance as part of the update. Compute Engine returns an error if the instance properties require a more disruptive action as part of the instance update. Valid options from lowest to highest are NO_EFFECT, REFRESH, and RESTART.
+ * mostDisruptiveAllowedAction: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "canIpForward": false,
+ * // "cpuPlatform": "my_cpuPlatform",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deletionProtection": false,
+ * // "description": "my_description",
+ * // "disks": [],
+ * // "displayDevice": {},
+ * // "eraseWindowsVssSignature": false,
+ * // "fingerprint": "my_fingerprint",
+ * // "guestAccelerators": [],
+ * // "hostname": "my_hostname",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "machineType": "my_machineType",
+ * // "metadata": {},
+ * // "minCpuPlatform": "my_minCpuPlatform",
+ * // "name": "my_name",
+ * // "networkInterfaces": [],
+ * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess",
+ * // "reservationAffinity": {},
+ * // "resourcePolicies": [],
+ * // "scheduling": {},
+ * // "selfLink": "my_selfLink",
+ * // "serviceAccounts": [],
+ * // "shieldedInstanceConfig": {},
+ * // "shieldedInstanceIntegrityPolicy": {},
+ * // "shieldedVmConfig": {},
+ * // "shieldedVmIntegrityPolicy": {},
+ * // "sourceMachineImage": "my_sourceMachineImage",
+ * // "sourceMachineImageEncryptionKey": {},
+ * // "startRestricted": false,
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "tags": {},
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.update
* @memberOf! ()
*
@@ -43132,68 +50091,97 @@ export namespace compute_beta {
* compute.instances.updateAccessConfig
* @desc Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.updateAccessConfig({
* // The instance name for this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // The name of the network interface where the access config is attached.
- * networkInterface: '', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * networkInterface: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "natIP": "my_natIP",
+ * // "networkTier": "my_networkTier",
+ * // "publicPtrDomainName": "my_publicPtrDomainName",
+ * // "setPublicPtr": false,
+ * // "type": "my_type"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.updateAccessConfig(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.updateAccessConfig
* @memberOf! ()
*
@@ -43273,6 +50261,90 @@ export namespace compute_beta {
/**
* compute.instances.updateDisplayDevice
* @desc Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.updateDisplayDevice({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "enableDisplay": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.updateDisplayDevice
* @memberOf! ()
*
@@ -43352,69 +50424,99 @@ export namespace compute_beta {
* compute.instances.updateNetworkInterface
* @desc Updates an instance's network interface. This method follows PATCH semantics.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.updateNetworkInterface({
* // The instance name for this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // The name of the network interface to update.
- * networkInterface: '', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * networkInterface: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accessConfigs": [],
+ * // "aliasIpRanges": [],
+ * // "fingerprint": "my_fingerprint",
+ * // "ipv6Address": "my_ipv6Address",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkIP": "my_networkIP",
+ * // "subnetwork": "my_subnetwork"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.updateNetworkInterface(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.updateNetworkInterface
* @memberOf! ()
*
@@ -43496,6 +50598,92 @@ export namespace compute_beta {
/**
* compute.instances.updateShieldedInstanceConfig
* @desc Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.updateShieldedInstanceConfig({
+ * // Name or id of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "enableIntegrityMonitoring": false,
+ * // "enableSecureBoot": false,
+ * // "enableVtpm": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.updateShieldedInstanceConfig
* @memberOf! ()
*
@@ -43576,6 +50764,92 @@ export namespace compute_beta {
/**
* compute.instances.updateShieldedVmConfig
* @desc Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.updateShieldedVmConfig({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "enableIntegrityMonitoring": false,
+ * // "enableSecureBoot": false,
+ * // "enableVtpm": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.updateShieldedVmConfig
* @memberOf! ()
*
@@ -44949,58 +52223,79 @@ export namespace compute_beta {
* compute.instanceTemplates.delete
* @desc Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.delete({
* // The name of the instance template to delete.
- * instanceTemplate: 'my-instance-template', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instanceTemplates.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * instanceTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceTemplates.delete
* @memberOf! ()
*
@@ -45078,58 +52373,60 @@ export namespace compute_beta {
* compute.instanceTemplates.get
* @desc Returns the specified instance template. Gets a list of available instance templates by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.get({
* // The name of the instance template.
- * instanceTemplate: 'my-instance-template', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instanceTemplates.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * instanceTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "properties": {},
+ * // "selfLink": "my_selfLink",
+ * // "sourceInstance": "my_sourceInstance",
+ * // "sourceInstanceParams": {}
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceTemplates.get
* @memberOf! ()
*
@@ -45205,6 +52502,60 @@ export namespace compute_beta {
/**
* compute.instanceTemplates.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceTemplates.getIamPolicy
* @memberOf! ()
*
@@ -45280,59 +52631,93 @@ export namespace compute_beta {
* compute.instanceTemplates.insert
* @desc Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "properties": {},
+ * // "selfLink": "my_selfLink",
+ * // "sourceInstance": "my_sourceInstance",
+ * // "sourceInstanceParams": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceTemplates.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceTemplates.insert
* @memberOf! ()
*
@@ -45410,68 +52795,73 @@ export namespace compute_beta {
* compute.instanceTemplates.list
* @desc Retrieves a list of instance templates that are contained within the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instanceTemplates.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.instanceTemplates.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceTemplates.list
* @memberOf! ()
*
@@ -45552,6 +52942,67 @@ export namespace compute_beta {
/**
* compute.instanceTemplates.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceTemplates.setIamPolicy
* @memberOf! ()
*
@@ -45627,62 +53078,60 @@ export namespace compute_beta {
* compute.instanceTemplates.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.instanceTemplates.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceTemplates.testIamPermissions
* @memberOf! ()
*
@@ -45919,68 +53368,75 @@ export namespace compute_beta {
* compute.interconnectAttachments.aggregatedList
* @desc Retrieves an aggregated list of interconnect attachments.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.interconnectAttachments.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.interconnectAttachments.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnectAttachments.aggregatedList
* @memberOf! ()
*
@@ -46078,61 +53534,82 @@ export namespace compute_beta {
* compute.interconnectAttachments.delete
* @desc Deletes the specified interconnect attachment.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.delete({
+ * // Name of the interconnect attachment to delete.
+ * interconnectAttachment:
+ * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the interconnect attachment to delete.
- * interconnectAttachment: 'my-interconnect-attachment', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.interconnectAttachments.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnectAttachments.delete
* @memberOf! ()
*
@@ -46211,61 +53688,80 @@ export namespace compute_beta {
* compute.interconnectAttachments.get
* @desc Returns the specified interconnect attachment.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.get({
+ * // Name of the interconnect attachment to return.
+ * interconnectAttachment:
+ * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the interconnect attachment to return.
- * interconnectAttachment: 'my-interconnect-attachment', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.interconnectAttachments.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adminEnabled": false,
+ * // "bandwidth": "my_bandwidth",
+ * // "candidateSubnets": [],
+ * // "cloudRouterIpAddress": "my_cloudRouterIpAddress",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerRouterIpAddress": "my_customerRouterIpAddress",
+ * // "description": "my_description",
+ * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnect": "my_interconnect",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "pairingKey": "my_pairingKey",
+ * // "partnerAsn": "my_partnerAsn",
+ * // "partnerMetadata": {},
+ * // "privateInterconnectInfo": {},
+ * // "region": "my_region",
+ * // "router": "my_router",
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state",
+ * // "type": "my_type",
+ * // "vlanTag8021q": 0
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnectAttachments.get
* @memberOf! ()
*
@@ -46345,62 +53841,114 @@ export namespace compute_beta {
* compute.interconnectAttachments.insert
* @desc Creates an InterconnectAttachment in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // If true, the request will not be committed.
+ * validateOnly: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adminEnabled": false,
+ * // "bandwidth": "my_bandwidth",
+ * // "candidateSubnets": [],
+ * // "cloudRouterIpAddress": "my_cloudRouterIpAddress",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerRouterIpAddress": "my_customerRouterIpAddress",
+ * // "description": "my_description",
+ * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnect": "my_interconnect",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "pairingKey": "my_pairingKey",
+ * // "partnerAsn": "my_partnerAsn",
+ * // "partnerMetadata": {},
+ * // "privateInterconnectInfo": {},
+ * // "region": "my_region",
+ * // "router": "my_router",
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state",
+ * // "type": "my_type",
+ * // "vlanTag8021q": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.interconnectAttachments.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnectAttachments.insert
* @memberOf! ()
*
@@ -46480,71 +54028,75 @@ export namespace compute_beta {
* compute.interconnectAttachments.list
* @desc Retrieves the list of interconnect attachments contained within the specified region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.interconnectAttachments.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.interconnectAttachments.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnectAttachments.list
* @memberOf! ()
*
@@ -46631,6 +54183,116 @@ export namespace compute_beta {
/**
* compute.interconnectAttachments.patch
* @desc Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.patch({
+ * // Name of the interconnect attachment to patch.
+ * interconnectAttachment:
+ * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adminEnabled": false,
+ * // "bandwidth": "my_bandwidth",
+ * // "candidateSubnets": [],
+ * // "cloudRouterIpAddress": "my_cloudRouterIpAddress",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerRouterIpAddress": "my_customerRouterIpAddress",
+ * // "description": "my_description",
+ * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnect": "my_interconnect",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "pairingKey": "my_pairingKey",
+ * // "partnerAsn": "my_partnerAsn",
+ * // "partnerMetadata": {},
+ * // "privateInterconnectInfo": {},
+ * // "region": "my_region",
+ * // "router": "my_router",
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state",
+ * // "type": "my_type",
+ * // "vlanTag8021q": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnectAttachments.patch
* @memberOf! ()
*
@@ -46709,6 +54371,91 @@ export namespace compute_beta {
/**
* compute.interconnectAttachments.setLabels
* @desc Sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnectAttachments.setLabels
* @memberOf! ()
*
@@ -46788,65 +54535,62 @@ export namespace compute_beta {
* compute.interconnectAttachments.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.interconnectAttachments.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnectAttachments.testIamPermissions
* @memberOf! ()
*
@@ -47157,58 +54901,66 @@ export namespace compute_beta {
* compute.interconnectLocations.get
* @desc Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectLocations.get({
* // Name of the interconnect location to return.
- * interconnectLocation: 'my-interconnect-location', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.interconnectLocations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * interconnectLocation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": "my_address",
+ * // "availabilityZone": "my_availabilityZone",
+ * // "city": "my_city",
+ * // "continent": "my_continent",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "facilityProvider": "my_facilityProvider",
+ * // "facilityProviderFacilityId": "my_facilityProviderFacilityId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "peeringdbFacilityId": "my_peeringdbFacilityId",
+ * // "regionInfos": [],
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnectLocations.get
* @memberOf! ()
*
@@ -47287,68 +55039,73 @@ export namespace compute_beta {
* compute.interconnectLocations.list
* @desc Retrieves the list of interconnect locations available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.interconnectLocations.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectLocations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.interconnectLocations.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnectLocations.list
* @memberOf! ()
*
@@ -47482,58 +55239,79 @@ export namespace compute_beta {
* compute.interconnects.delete
* @desc Deletes the specified interconnect.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.delete({
* // Name of the interconnect to delete.
- * interconnect: 'my-interconnect', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.interconnects.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnects.delete
* @memberOf! ()
*
@@ -47611,58 +55389,75 @@ export namespace compute_beta {
* compute.interconnects.get
* @desc Returns the specified interconnect. Get a list of available interconnects by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.get({
* // Name of the interconnect to return.
- * interconnect: 'my-interconnect', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.interconnects.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adminEnabled": false,
+ * // "circuitInfos": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerName": "my_customerName",
+ * // "description": "my_description",
+ * // "expectedOutages": [],
+ * // "googleIpAddress": "my_googleIpAddress",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnectAttachments": [],
+ * // "interconnectType": "my_interconnectType",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "linkType": "my_linkType",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nocContactEmail": "my_nocContactEmail",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "peerIpAddress": "my_peerIpAddress",
+ * // "provisionedLinkCount": 0,
+ * // "requestedLinkCount": 0,
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnects.get
* @memberOf! ()
*
@@ -47738,6 +55533,53 @@ export namespace compute_beta {
/**
* compute.interconnects.getDiagnostics
* @desc Returns the interconnectDiagnostics for the specified interconnect.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.getDiagnostics({
+ * // Name of the interconnect resource to query.
+ * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "result": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnects.getDiagnostics
* @memberOf! ()
*
@@ -47825,59 +55667,108 @@ export namespace compute_beta {
* compute.interconnects.insert
* @desc Creates a Interconnect in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adminEnabled": false,
+ * // "circuitInfos": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerName": "my_customerName",
+ * // "description": "my_description",
+ * // "expectedOutages": [],
+ * // "googleIpAddress": "my_googleIpAddress",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnectAttachments": [],
+ * // "interconnectType": "my_interconnectType",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "linkType": "my_linkType",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nocContactEmail": "my_nocContactEmail",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "peerIpAddress": "my_peerIpAddress",
+ * // "provisionedLinkCount": 0,
+ * // "requestedLinkCount": 0,
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.interconnects.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnects.insert
* @memberOf! ()
*
@@ -47954,68 +55845,73 @@ export namespace compute_beta {
* compute.interconnects.list
* @desc Retrieves the list of interconnect available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.interconnects.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.interconnects.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnects.list
* @memberOf! ()
*
@@ -48094,63 +55990,110 @@ export namespace compute_beta {
* compute.interconnects.patch
* @desc Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.patch({
* // Name of the interconnect to update.
- * interconnect: 'my-interconnect', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adminEnabled": false,
+ * // "circuitInfos": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerName": "my_customerName",
+ * // "description": "my_description",
+ * // "expectedOutages": [],
+ * // "googleIpAddress": "my_googleIpAddress",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnectAttachments": [],
+ * // "interconnectType": "my_interconnectType",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "linkType": "my_linkType",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nocContactEmail": "my_nocContactEmail",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "peerIpAddress": "my_peerIpAddress",
+ * // "provisionedLinkCount": 0,
+ * // "requestedLinkCount": 0,
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.interconnects.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnects.patch
* @memberOf! ()
*
@@ -48228,6 +56171,83 @@ export namespace compute_beta {
/**
* compute.interconnects.setLabels
* @desc Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnects.setLabels
* @memberOf! ()
*
@@ -48305,62 +56325,60 @@ export namespace compute_beta {
* compute.interconnects.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.interconnects.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnects.testIamPermissions
* @memberOf! ()
*
@@ -48617,6 +56635,61 @@ export namespace compute_beta {
/**
* compute.licenseCodes.get
* @desc Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenseCodes.get({
+ * // Number corresponding to the License code resource to return.
+ * licenseCode: '[0-9]{0,61}?',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "licenseAlias": [],
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state",
+ * // "transferable": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenseCodes.get
* @memberOf! ()
*
@@ -48714,6 +56787,80 @@ export namespace compute_beta {
/**
* compute.licenses.delete
* @desc Deletes the specified license. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.delete({
+ * // Name of the license resource to delete.
+ * license: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.delete
* @memberOf! ()
*
@@ -48790,58 +56937,61 @@ export namespace compute_beta {
* compute.licenses.get
* @desc Returns the specified License resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.get({
* // Name of the License resource to return.
- * license: 'my-license', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.licenses.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * license: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "chargesUseFee": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "licenseCode": "my_licenseCode",
+ * // "name": "my_name",
+ * // "resourceRequirements": {},
+ * // "selfLink": "my_selfLink",
+ * // "transferable": false
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.licenses.get
* @memberOf! ()
*
@@ -48914,6 +57064,60 @@ export namespace compute_beta {
/**
* compute.licenses.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.getIamPolicy
* @memberOf! ()
*
@@ -48988,6 +57192,98 @@ export namespace compute_beta {
/**
* compute.licenses.insert
* @desc Create a License resource in the specified project. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/devstorage.full_control',
+ * 'https://www.googleapis.com/auth/devstorage.read_only',
+ * 'https://www.googleapis.com/auth/devstorage.read_write',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "chargesUseFee": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "licenseCode": "my_licenseCode",
+ * // "name": "my_name",
+ * // "resourceRequirements": {},
+ * // "selfLink": "my_selfLink",
+ * // "transferable": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.insert
* @memberOf! ()
*
@@ -49062,6 +57358,73 @@ export namespace compute_beta {
/**
* compute.licenses.list
* @desc Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.list
* @memberOf! ()
*
@@ -49140,6 +57503,67 @@ export namespace compute_beta {
/**
* compute.licenses.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.setIamPolicy
* @memberOf! ()
*
@@ -49344,6 +57768,80 @@ export namespace compute_beta {
/**
* compute.machineImages.delete
* @desc Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineImages.delete({
+ * // The name of the machine image to delete.
+ * machineImage: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.machineImages.delete
* @memberOf! ()
*
@@ -49420,6 +57918,66 @@ export namespace compute_beta {
/**
* compute.machineImages.get
* @desc Returns the specified machine image. Gets a list of available machine images by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineImages.get({
+ * // The name of the machine image.
+ * machineImage: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "guestFlush": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "machineImageEncryptionKey": {},
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "sourceDiskEncryptionKeys": [],
+ * // "sourceInstance": "my_sourceInstance",
+ * // "sourceInstanceProperties": {},
+ * // "status": "my_status",
+ * // "storageLocations": [],
+ * // "totalStorageBytes": "my_totalStorageBytes"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.machineImages.get
* @memberOf! ()
*
@@ -49495,6 +58053,60 @@ export namespace compute_beta {
/**
* compute.machineImages.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineImages.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.machineImages.getIamPolicy
* @memberOf! ()
*
@@ -49569,6 +58181,101 @@ export namespace compute_beta {
/**
* compute.machineImages.insert
* @desc Creates a machine image in the specified project using the data that is included in the request. If you are creating a new machine image to update an existing instance, your new machine image should use the same network or, if applicable, the same subnetwork as the original instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineImages.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Required. Source instance that is used to create the machine image from.
+ * sourceInstance: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "guestFlush": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "machineImageEncryptionKey": {},
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "sourceDiskEncryptionKeys": [],
+ * // "sourceInstance": "my_sourceInstance",
+ * // "sourceInstanceProperties": {},
+ * // "status": "my_status",
+ * // "storageLocations": [],
+ * // "totalStorageBytes": "my_totalStorageBytes"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.machineImages.insert
* @memberOf! ()
*
@@ -49645,6 +58352,74 @@ export namespace compute_beta {
/**
* compute.machineImages.list
* @desc Retrieves a list of machine images that are contained within the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineImages.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.machineImages.list
* @memberOf! ()
*
@@ -49722,6 +58497,67 @@ export namespace compute_beta {
/**
* compute.machineImages.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineImages.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.machineImages.setIamPolicy
* @memberOf! ()
*
@@ -49796,6 +58632,61 @@ export namespace compute_beta {
/**
* compute.machineImages.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineImages.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.machineImages.testIamPermissions
* @memberOf! ()
*
@@ -50036,68 +58927,75 @@ export namespace compute_beta {
* compute.machineTypes.aggregatedList
* @desc Retrieves an aggregated list of machine types.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.machineTypes.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineTypes.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.machineTypes.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.machineTypes.aggregatedList
* @memberOf! ()
*
@@ -50185,61 +59083,66 @@ export namespace compute_beta {
* compute.machineTypes.get
* @desc Returns the specified machine type. Gets a list of available machine types by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineTypes.get({
+ * // Name of the machine type to return.
+ * machineType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the machine type to return.
- * machineType: 'my-machine-type', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.machineTypes.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "guestCpus": 0,
+ * // "id": "my_id",
+ * // "isSharedCpu": false,
+ * // "kind": "my_kind",
+ * // "maximumPersistentDisks": 0,
+ * // "maximumPersistentDisksSizeGb": "my_maximumPersistentDisksSizeGb",
+ * // "memoryMb": 0,
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.machineTypes.get
* @memberOf! ()
*
@@ -50316,71 +59219,75 @@ export namespace compute_beta {
* compute.machineTypes.list
* @desc Retrieves a list of machine types available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineTypes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.machineTypes.list(request, handlePage);
- * }
- * };
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.machineTypes.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.machineTypes.list
* @memberOf! ()
*
@@ -50551,6 +59458,76 @@ export namespace compute_beta {
/**
* compute.networkEndpointGroups.aggregatedList
* @desc Retrieves the list of network endpoint groups and sorts them by zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.aggregatedList
* @memberOf! ()
*
@@ -50639,6 +59616,90 @@ export namespace compute_beta {
/**
* compute.networkEndpointGroups.attachNetworkEndpoints
* @desc Attach a list of network endpoints to the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.attachNetworkEndpoints({
+ * // The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkEndpoints": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.attachNetworkEndpoints
* @memberOf! ()
*
@@ -50719,6 +59780,82 @@ export namespace compute_beta {
/**
* compute.networkEndpointGroups.delete
* @desc Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.delete({
+ * // The name of the network endpoint group to delete. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.delete
* @memberOf! ()
*
@@ -50796,6 +59933,90 @@ export namespace compute_beta {
/**
* compute.networkEndpointGroups.detachNetworkEndpoints
* @desc Detach a list of network endpoints from the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.detachNetworkEndpoints({
+ * // The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkEndpoints": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.detachNetworkEndpoints
* @memberOf! ()
*
@@ -50876,6 +60097,68 @@ export namespace compute_beta {
/**
* compute.networkEndpointGroups.get
* @desc Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.get({
+ * // The name of the network endpoint group. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "annotations": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultPort": 0,
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancer": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkEndpointType": "my_networkEndpointType",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.get
* @memberOf! ()
*
@@ -50954,6 +60237,101 @@ export namespace compute_beta {
/**
* compute.networkEndpointGroups.insert
* @desc Creates a network endpoint group in the specified project using the parameters that are included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where you want to create the network endpoint group. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "annotations": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultPort": 0,
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancer": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkEndpointType": "my_networkEndpointType",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.insert
* @memberOf! ()
*
@@ -51031,6 +60409,76 @@ export namespace compute_beta {
/**
* compute.networkEndpointGroups.list
* @desc Retrieves the list of network endpoint groups that are located in the specified project and zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.list
* @memberOf! ()
*
@@ -51112,6 +60560,85 @@ export namespace compute_beta {
/**
* compute.networkEndpointGroups.listNetworkEndpoints
* @desc Lists the network endpoints in the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.listNetworkEndpoints({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "healthStatus": "my_healthStatus"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.listNetworkEndpoints
* @memberOf! ()
*
@@ -51216,6 +60743,63 @@ export namespace compute_beta {
/**
* compute.networkEndpointGroups.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.testIamPermissions
* @memberOf! ()
*
@@ -51563,62 +61147,90 @@ export namespace compute_beta {
* compute.networks.addPeering
* @desc Adds a peering to the specified network.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.addPeering({
* // Name of the network resource to add peering to.
- * network: 'my-network', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoCreateRoutes": false,
+ * // "name": "my_name",
+ * // "networkPeering": {},
+ * // "peerNetwork": "my_peerNetwork"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.networks.addPeering(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.networks.addPeering
* @memberOf! ()
*
@@ -51697,58 +61309,79 @@ export namespace compute_beta {
* compute.networks.delete
* @desc Deletes the specified network.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.delete({
* // Name of the network to delete.
- * network: 'my-network', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.networks.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.networks.delete
* @memberOf! ()
*
@@ -51825,58 +61458,63 @@ export namespace compute_beta {
* compute.networks.get
* @desc Returns the specified network. Gets a list of available networks by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.get({
* // Name of the network to return.
- * network: 'my-network', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.networks.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "IPv4Range": "my_IPv4Range",
+ * // "autoCreateSubnetworks": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "gatewayIPv4": "my_gatewayIPv4",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "peerings": [],
+ * // "routingConfig": {},
+ * // "selfLink": "my_selfLink",
+ * // "subnetworks": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.networks.get
* @memberOf! ()
*
@@ -51949,6 +61587,54 @@ export namespace compute_beta {
/**
* compute.networks.getEffectiveFirewalls
* @desc Returns the effective firewalls on a given network.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.getEffectiveFirewalls({
+ * // Name of the network for this request.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "firewalls": [],
+ * // "organizationFirewalls": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.getEffectiveFirewalls
* @memberOf! ()
*
@@ -52042,59 +61728,96 @@ export namespace compute_beta {
* compute.networks.insert
* @desc Creates a network in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPv4Range": "my_IPv4Range",
+ * // "autoCreateSubnetworks": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "gatewayIPv4": "my_gatewayIPv4",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "peerings": [],
+ * // "routingConfig": {},
+ * // "selfLink": "my_selfLink",
+ * // "subnetworks": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.networks.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.networks.insert
* @memberOf! ()
*
@@ -52170,68 +61893,73 @@ export namespace compute_beta {
* compute.networks.list
* @desc Retrieves the list of networks available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.networks.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.networks.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.networks.list
* @memberOf! ()
*
@@ -52308,6 +62036,82 @@ export namespace compute_beta {
/**
* compute.networks.listPeeringRoutes
* @desc Lists the peering routes exchanged over peering connection.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.listPeeringRoutes({
+ * // The direction of the exchanged routes.
+ * direction: 'placeholder-value',
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Name of the network for this request.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The response will show routes exchanged over the given peering connection.
+ * peeringName: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region of the request. The response will include all subnet routes, static routes and dynamic routes in the region.
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.listPeeringRoutes
* @memberOf! ()
*
@@ -52398,63 +62202,98 @@ export namespace compute_beta {
* compute.networks.patch
* @desc Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.patch({
* // Name of the network to update.
- * network: 'my-network', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPv4Range": "my_IPv4Range",
+ * // "autoCreateSubnetworks": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "gatewayIPv4": "my_gatewayIPv4",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "peerings": [],
+ * // "routingConfig": {},
+ * // "selfLink": "my_selfLink",
+ * // "subnetworks": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.networks.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.networks.patch
* @memberOf! ()
*
@@ -52532,62 +62371,87 @@ export namespace compute_beta {
* compute.networks.removePeering
* @desc Removes a peering from the specified network.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.removePeering({
* // Name of the network resource to remove peering from.
- * network: 'my-network', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "name": "my_name"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.networks.removePeering(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.networks.removePeering
* @memberOf! ()
*
@@ -52666,58 +62530,79 @@ export namespace compute_beta {
* compute.networks.switchToCustomMode
* @desc Switches the network mode from auto subnet mode to custom subnet mode.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.switchToCustomMode({
* // Name of the network to be updated.
- * network: 'my-network', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.networks.switchToCustomMode(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.networks.switchToCustomMode
* @memberOf! ()
*
@@ -52795,62 +62680,60 @@ export namespace compute_beta {
* compute.networks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.networks.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.networks.testIamPermissions
* @memberOf! ()
*
@@ -52931,6 +62814,88 @@ export namespace compute_beta {
/**
* compute.networks.updatePeering
* @desc Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.updatePeering({
+ * // Name of the network resource which the updated peering is belonging to.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkPeering": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.updatePeering
* @memberOf! ()
*
@@ -53297,6 +63262,90 @@ export namespace compute_beta {
/**
* compute.nodeGroups.addNodes
* @desc Adds specified number of nodes to the node group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.addNodes({
+ * // Name of the NodeGroup resource.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "additionalNodeCount": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.addNodes
* @memberOf! ()
*
@@ -53375,6 +63424,76 @@ export namespace compute_beta {
/**
* compute.nodeGroups.aggregatedList
* @desc Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.aggregatedList
* @memberOf! ()
*
@@ -53457,6 +63576,82 @@ export namespace compute_beta {
/**
* compute.nodeGroups.delete
* @desc Deletes the specified NodeGroup resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.delete({
+ * // Name of the NodeGroup resource to delete.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.delete
* @memberOf! ()
*
@@ -53534,6 +63729,90 @@ export namespace compute_beta {
/**
* compute.nodeGroups.deleteNodes
* @desc Deletes specified nodes from the node group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.deleteNodes({
+ * // Name of the NodeGroup resource whose nodes will be deleted.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "nodes": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.deleteNodes
* @memberOf! ()
*
@@ -53612,6 +63891,67 @@ export namespace compute_beta {
/**
* compute.nodeGroups.get
* @desc Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the "nodes" field should not be used. Use nodeGroups.listNodes instead.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.get({
+ * // Name of the node group to return.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "maintenancePolicy": "my_maintenancePolicy",
+ * // "name": "my_name",
+ * // "nodeTemplate": "my_nodeTemplate",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.get
* @memberOf! ()
*
@@ -53687,6 +64027,62 @@ export namespace compute_beta {
/**
* compute.nodeGroups.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.getIamPolicy
* @memberOf! ()
*
@@ -53762,6 +64158,102 @@ export namespace compute_beta {
/**
* compute.nodeGroups.insert
* @desc Creates a NodeGroup resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.insert({
+ * // Initial count of nodes in the node group.
+ * initialNodeCount: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "maintenancePolicy": "my_maintenancePolicy",
+ * // "name": "my_name",
+ * // "nodeTemplate": "my_nodeTemplate",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.insert
* @memberOf! ()
*
@@ -53840,6 +64332,76 @@ export namespace compute_beta {
/**
* compute.nodeGroups.list
* @desc Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.list
* @memberOf! ()
*
@@ -53918,6 +64480,78 @@ export namespace compute_beta {
/**
* compute.nodeGroups.listNodes
* @desc Lists nodes in the node group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.listNodes({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Name of the NodeGroup resource whose nodes you want to list.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.listNodes
* @memberOf! ()
*
@@ -53998,6 +64632,102 @@ export namespace compute_beta {
/**
* compute.nodeGroups.patch
* @desc Updates the specified node group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.patch({
+ * // Name of the NodeGroup resource to update.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "maintenancePolicy": "my_maintenancePolicy",
+ * // "name": "my_name",
+ * // "nodeTemplate": "my_nodeTemplate",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.patch
* @memberOf! ()
*
@@ -54075,6 +64805,69 @@ export namespace compute_beta {
/**
* compute.nodeGroups.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.setIamPolicy
* @memberOf! ()
*
@@ -54150,6 +64943,90 @@ export namespace compute_beta {
/**
* compute.nodeGroups.setNodeTemplate
* @desc Updates the node template of the node group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.setNodeTemplate({
+ * // Name of the NodeGroup resource to update.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "nodeTemplate": "my_nodeTemplate"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.setNodeTemplate
* @memberOf! ()
*
@@ -54228,6 +65105,63 @@ export namespace compute_beta {
/**
* compute.nodeGroups.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.testIamPermissions
* @memberOf! ()
*
@@ -54677,6 +65611,76 @@ export namespace compute_beta {
/**
* compute.nodeTemplates.aggregatedList
* @desc Retrieves an aggregated list of node templates.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.aggregatedList
* @memberOf! ()
*
@@ -54763,6 +65767,82 @@ export namespace compute_beta {
/**
* compute.nodeTemplates.delete
* @desc Deletes the specified NodeTemplate resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.delete({
+ * // Name of the NodeTemplate resource to delete.
+ * nodeTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.delete
* @memberOf! ()
*
@@ -54840,6 +65920,68 @@ export namespace compute_beta {
/**
* compute.nodeTemplates.get
* @desc Returns the specified node template. Gets a list of available node templates by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.get({
+ * // Name of the node template to return.
+ * nodeTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cpuOvercommitType": "my_cpuOvercommitType",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nodeAffinityLabels": {},
+ * // "nodeType": "my_nodeType",
+ * // "nodeTypeFlexibility": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serverBinding": {},
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.get
* @memberOf! ()
*
@@ -54916,6 +66058,62 @@ export namespace compute_beta {
/**
* compute.nodeTemplates.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.getIamPolicy
* @memberOf! ()
*
@@ -54991,6 +66189,101 @@ export namespace compute_beta {
/**
* compute.nodeTemplates.insert
* @desc Creates a NodeTemplate resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "cpuOvercommitType": "my_cpuOvercommitType",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nodeAffinityLabels": {},
+ * // "nodeType": "my_nodeType",
+ * // "nodeTypeFlexibility": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serverBinding": {},
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.insert
* @memberOf! ()
*
@@ -55068,6 +66361,76 @@ export namespace compute_beta {
/**
* compute.nodeTemplates.list
* @desc Retrieves a list of node templates available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.list
* @memberOf! ()
*
@@ -55147,6 +66510,69 @@ export namespace compute_beta {
/**
* compute.nodeTemplates.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.setIamPolicy
* @memberOf! ()
*
@@ -55222,6 +66648,63 @@ export namespace compute_beta {
/**
* compute.nodeTemplates.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.testIamPermissions
* @memberOf! ()
*
@@ -55518,6 +67001,76 @@ export namespace compute_beta {
/**
* compute.nodeTypes.aggregatedList
* @desc Retrieves an aggregated list of node types.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTypes.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTypes.aggregatedList
* @memberOf! ()
*
@@ -55600,6 +67153,66 @@ export namespace compute_beta {
/**
* compute.nodeTypes.get
* @desc Returns the specified node type. Gets a list of available node types by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTypes.get({
+ * // Name of the node type to return.
+ * nodeType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cpuPlatform": "my_cpuPlatform",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "guestCpus": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "localSsdGb": 0,
+ * // "memoryMb": 0,
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTypes.get
* @memberOf! ()
*
@@ -55673,6 +67286,76 @@ export namespace compute_beta {
/**
* compute.nodeTypes.list
* @desc Retrieves a list of node types available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTypes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTypes.list
* @memberOf! ()
*
@@ -55841,6 +67524,90 @@ export namespace compute_beta {
/**
* compute.organizationSecurityPolicies.addAssociation
* @desc Inserts an association for the specified security policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.addAssociation({
+ * // Indicates whether or not to replace it if an association of the attachment already exists. This is false by default, in which case an error will be returned if an assocation already exists.
+ * replaceExistingAssociation: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attachmentId": "my_attachmentId",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name",
+ * // "securityPolicyId": "my_securityPolicyId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.addAssociation
* @memberOf! ()
*
@@ -55918,6 +67685,95 @@ export namespace compute_beta {
/**
* compute.organizationSecurityPolicies.addRule
* @desc Inserts a rule into a security policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.addRule({
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "direction": "my_direction",
+ * // "enableLogging": false,
+ * // "kind": "my_kind",
+ * // "match": {},
+ * // "preview": false,
+ * // "priority": 0,
+ * // "ruleTupleCount": 0,
+ * // "targetResources": [],
+ * // "targetServiceAccounts": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.addRule
* @memberOf! ()
*
@@ -55994,6 +67850,79 @@ export namespace compute_beta {
/**
* compute.organizationSecurityPolicies.copyRules
* @desc Copies rules to the specified security policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.copyRules({
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ * // The security policy from which to copy rules.
+ * sourceSecurityPolicy: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.copyRules
* @memberOf! ()
*
@@ -56070,6 +67999,77 @@ export namespace compute_beta {
/**
* compute.organizationSecurityPolicies.delete
* @desc Deletes the specified policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.delete({
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to delete.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.delete
* @memberOf! ()
*
@@ -56145,6 +68145,65 @@ export namespace compute_beta {
/**
* compute.organizationSecurityPolicies.get
* @desc List all of the ordered rules present in a single specified policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.get({
+ * // Name of the security policy to get.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "associations": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "ruleTupleCount": 0,
+ * // "rules": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.get
* @memberOf! ()
*
@@ -56219,6 +68278,55 @@ export namespace compute_beta {
/**
* compute.organizationSecurityPolicies.getAssociation
* @desc Gets an association with the specified name.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.getAssociation({
+ * // The name of the association to get from the security policy.
+ * name: 'placeholder-value',
+ * // Name of the security policy to which the queried rule belongs.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attachmentId": "my_attachmentId",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name",
+ * // "securityPolicyId": "my_securityPolicyId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.getAssociation
* @memberOf! ()
*
@@ -56301,6 +68409,62 @@ export namespace compute_beta {
/**
* compute.organizationSecurityPolicies.getRule
* @desc Gets a rule at the specified priority.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.getRule({
+ * // The priority of the rule to get from the security policy.
+ * priority: 'placeholder-value',
+ * // Name of the security policy to which the queried rule belongs.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "direction": "my_direction",
+ * // "enableLogging": false,
+ * // "kind": "my_kind",
+ * // "match": {},
+ * // "preview": false,
+ * // "priority": 0,
+ * // "ruleTupleCount": 0,
+ * // "targetResources": [],
+ * // "targetServiceAccounts": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.getRule
* @memberOf! ()
*
@@ -56376,6 +68540,100 @@ export namespace compute_beta {
/**
* compute.organizationSecurityPolicies.insert
* @desc Creates a new policy in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.insert({
+ * // Parent ID for this request.
+ * parentId: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "associations": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "ruleTupleCount": 0,
+ * // "rules": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.insert
* @memberOf! ()
*
@@ -56452,6 +68710,72 @@ export namespace compute_beta {
/**
* compute.organizationSecurityPolicies.list
* @desc List all the policies that have been configured for the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Parent ID for this request.
+ * parentId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.list
* @memberOf! ()
*
@@ -56530,6 +68854,50 @@ export namespace compute_beta {
/**
* compute.organizationSecurityPolicies.listAssociations
* @desc Lists associations of a specified target, i.e., organization or folder.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.listAssociations({
+ * // The target resource to list associations. It is an organization, or a folder.
+ * targetResource: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "associations": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.listAssociations
* @memberOf! ()
*
@@ -56630,6 +68998,79 @@ export namespace compute_beta {
/**
* compute.organizationSecurityPolicies.move
* @desc Moves the specified security policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.move({
+ * // The new parent of the security policy.
+ * parentId: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.move
* @memberOf! ()
*
@@ -56706,6 +69147,100 @@ export namespace compute_beta {
/**
* compute.organizationSecurityPolicies.patch
* @desc Patches the specified policy with the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.patch({
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "associations": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "ruleTupleCount": 0,
+ * // "rules": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.patch
* @memberOf! ()
*
@@ -56782,6 +69317,97 @@ export namespace compute_beta {
/**
* compute.organizationSecurityPolicies.patchRule
* @desc Patches a rule at the specified priority.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.patchRule({
+ * // The priority of the rule to patch.
+ * priority: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "direction": "my_direction",
+ * // "enableLogging": false,
+ * // "kind": "my_kind",
+ * // "match": {},
+ * // "preview": false,
+ * // "priority": 0,
+ * // "ruleTupleCount": 0,
+ * // "targetResources": [],
+ * // "targetServiceAccounts": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.patchRule
* @memberOf! ()
*
@@ -56859,6 +69485,79 @@ export namespace compute_beta {
/**
* compute.organizationSecurityPolicies.removeAssociation
* @desc Removes an association for the specified security policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.removeAssociation({
+ * // Name for the attachment that will be removed.
+ * name: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.removeAssociation
* @memberOf! ()
*
@@ -56935,6 +69634,79 @@ export namespace compute_beta {
/**
* compute.organizationSecurityPolicies.removeRule
* @desc Deletes a rule at the specified priority.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.organizationSecurityPolicies.removeRule({
+ * // The priority of the rule to remove from the security policy.
+ * priority: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '(securityPolicies/)?[0-9]{0,20}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.organizationSecurityPolicies.removeRule
* @memberOf! ()
*
@@ -57312,6 +70084,76 @@ export namespace compute_beta {
/**
* compute.packetMirrorings.aggregatedList
* @desc Retrieves an aggregated list of packetMirrorings.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.aggregatedList
* @memberOf! ()
*
@@ -57400,6 +70242,82 @@ export namespace compute_beta {
/**
* compute.packetMirrorings.delete
* @desc Deletes the specified PacketMirroring resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.delete({
+ * // Name of the PacketMirroring resource to delete.
+ * packetMirroring: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.delete
* @memberOf! ()
*
@@ -57477,6 +70395,67 @@ export namespace compute_beta {
/**
* compute.packetMirrorings.get
* @desc Returns the specified PacketMirroring resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.get({
+ * // Name of the PacketMirroring resource to return.
+ * packetMirroring: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "collectorIlb": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enable": "my_enable",
+ * // "filter": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mirroredResources": {},
+ * // "name": "my_name",
+ * // "network": {},
+ * // "priority": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.get
* @memberOf! ()
*
@@ -57553,6 +70532,100 @@ export namespace compute_beta {
/**
* compute.packetMirrorings.insert
* @desc Creates a PacketMirroring resource in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "collectorIlb": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enable": "my_enable",
+ * // "filter": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mirroredResources": {},
+ * // "name": "my_name",
+ * // "network": {},
+ * // "priority": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.insert
* @memberOf! ()
*
@@ -57630,6 +70703,76 @@ export namespace compute_beta {
/**
* compute.packetMirrorings.list
* @desc Retrieves a list of PacketMirroring resources available to the specified project and region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.list
* @memberOf! ()
*
@@ -57709,6 +70852,102 @@ export namespace compute_beta {
/**
* compute.packetMirrorings.patch
* @desc Patches the specified PacketMirroring resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.patch({
+ * // Name of the PacketMirroring resource to patch.
+ * packetMirroring: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "collectorIlb": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enable": "my_enable",
+ * // "filter": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mirroredResources": {},
+ * // "name": "my_name",
+ * // "network": {},
+ * // "priority": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.patch
* @memberOf! ()
*
@@ -57787,6 +71026,63 @@ export namespace compute_beta {
/**
* compute.packetMirrorings.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.testIamPermissions
* @memberOf! ()
*
@@ -58064,55 +71360,77 @@ export namespace compute_beta {
* compute.projects.disableXpnHost
* @desc Disable this project as a shared VPC host project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.projects.disableXpnHost(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.disableXpnHost({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.disableXpnHost
* @memberOf! ()
*
@@ -58188,59 +71506,85 @@ export namespace compute_beta {
* compute.projects.disableXpnResource
* @desc Disable a service resource (also known as service project) associated with this host project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.disableXpnResource({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "xpnResource": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.projects.disableXpnResource(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.disableXpnResource
* @memberOf! ()
*
@@ -58317,55 +71661,77 @@ export namespace compute_beta {
* compute.projects.enableXpnHost
* @desc Enable this project as a shared VPC host project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.projects.enableXpnHost(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.enableXpnHost({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.enableXpnHost
* @memberOf! ()
*
@@ -58441,59 +71807,85 @@ export namespace compute_beta {
* compute.projects.enableXpnResource
* @desc Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.enableXpnResource({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "xpnResource": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.projects.enableXpnResource(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.enableXpnResource
* @memberOf! ()
*
@@ -58570,55 +71962,62 @@ export namespace compute_beta {
* compute.projects.get
* @desc Returns the specified Project resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.projects.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commonInstanceMetadata": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultNetworkTier": "my_defaultNetworkTier",
+ * // "defaultServiceAccount": "my_defaultServiceAccount",
+ * // "description": "my_description",
+ * // "enabledFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "quotas": [],
+ * // "selfLink": "my_selfLink",
+ * // "usageExportLocation": {},
+ * // "xpnProjectStatus": "my_xpnProjectStatus"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.get
* @memberOf! ()
*
@@ -58691,55 +72090,61 @@ export namespace compute_beta {
* compute.projects.getXpnHost
* @desc Gets the shared VPC host project that this project links to. May be empty if no link exists.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.projects.getXpnHost(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.getXpnHost({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commonInstanceMetadata": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultNetworkTier": "my_defaultNetworkTier",
+ * // "defaultServiceAccount": "my_defaultServiceAccount",
+ * // "description": "my_description",
+ * // "enabledFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "quotas": [],
+ * // "selfLink": "my_selfLink",
+ * // "usageExportLocation": {},
+ * // "xpnProjectStatus": "my_xpnProjectStatus"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.getXpnHost
* @memberOf! ()
*
@@ -58812,68 +72217,69 @@ export namespace compute_beta {
* compute.projects.getXpnResources
* @desc Gets service resources (a.k.a service project) associated with this host project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var resourcesPage = response['resources'];
- * if (!resourcesPage) {
- * return;
- * }
- * for (var i = 0; i < resourcesPage.length; i++) {
- * // TODO: Change code below to process each resource in `resourcesPage`:
- * console.log(JSON.stringify(resourcesPage[i], null, 2));
- * }
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.getXpnResources({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
*
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.projects.getXpnResources(request, handlePage);
- * }
- * };
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
*
- * compute.projects.getXpnResources(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.getXpnResources
* @memberOf! ()
*
@@ -58956,72 +72362,80 @@ export namespace compute_beta {
* compute.projects.listXpnHosts
* @desc Lists all shared VPC host projects visible to the user in an organization.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.listXpnHosts({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "organization": "my_organization"
+ * // }
* },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.projects.listXpnHosts(request, handlePage);
- * }
- * };
- *
- * compute.projects.listXpnHosts(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.listXpnHosts
* @memberOf! ()
*
@@ -59101,59 +72515,86 @@ export namespace compute_beta {
* compute.projects.moveDisk
* @desc Moves a persistent disk from one zone to another.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.moveDisk({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "destinationZone": "my_destinationZone",
+ * // "targetDisk": "my_targetDisk"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.projects.moveDisk(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.moveDisk
* @memberOf! ()
*
@@ -59230,59 +72671,86 @@ export namespace compute_beta {
* compute.projects.moveInstance
* @desc Moves an instance and its attached persistent disks from one zone to another.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.moveInstance({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "destinationZone": "my_destinationZone",
+ * // "targetInstance": "my_targetInstance"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.projects.moveInstance(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.moveInstance
* @memberOf! ()
*
@@ -59359,59 +72827,87 @@ export namespace compute_beta {
* compute.projects.setCommonInstanceMetadata
* @desc Sets metadata common to all instances within the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.setCommonInstanceMetadata({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.projects.setCommonInstanceMetadata(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.setCommonInstanceMetadata
* @memberOf! ()
*
@@ -59490,6 +72986,86 @@ export namespace compute_beta {
/**
* compute.projects.setDefaultNetworkTier
* @desc Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.setDefaultNetworkTier({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkTier": "my_networkTier"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.projects.setDefaultNetworkTier
* @memberOf! ()
*
@@ -59568,59 +73144,89 @@ export namespace compute_beta {
* compute.projects.setUsageExportBucket
* @desc Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/devstorage.full_control',
+ * 'https://www.googleapis.com/auth/devstorage.read_only',
+ * 'https://www.googleapis.com/auth/devstorage.read_write',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.setUsageExportBucket({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bucketName": "my_bucketName",
+ * // "reportNamePrefix": "my_reportNamePrefix"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.projects.setUsageExportBucket(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.setUsageExportBucket
* @memberOf! ()
*
@@ -59970,61 +73576,81 @@ export namespace compute_beta {
* compute.regionAutoscalers.delete
* @desc Deletes the specified autoscaler.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.delete({
+ * // Name of the autoscaler to delete.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the autoscaler to delete.
- * autoscaler: 'my-autoscaler', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionAutoscalers.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionAutoscalers.delete
* @memberOf! ()
*
@@ -60103,61 +73729,66 @@ export namespace compute_beta {
* compute.regionAutoscalers.get
* @desc Returns the specified autoscaler.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.get({
+ * // Name of the autoscaler to return.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the autoscaler to return.
- * autoscaler: 'my-autoscaler', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionAutoscalers.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionAutoscalers.get
* @memberOf! ()
*
@@ -60235,62 +73866,99 @@ export namespace compute_beta {
* compute.regionAutoscalers.insert
* @desc Creates an autoscaler in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionAutoscalers.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionAutoscalers.insert
* @memberOf! ()
*
@@ -60369,71 +74037,75 @@ export namespace compute_beta {
* compute.regionAutoscalers.list
* @desc Retrieves a list of autoscalers contained within the specified region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regionAutoscalers.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.regionAutoscalers.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionAutoscalers.list
* @memberOf! ()
*
@@ -60516,63 +74188,101 @@ export namespace compute_beta {
* compute.regionAutoscalers.patch
* @desc Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.patch({
+ * // Name of the autoscaler to patch.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionAutoscalers.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionAutoscalers.patch
* @memberOf! ()
*
@@ -60652,65 +74362,62 @@ export namespace compute_beta {
* compute.regionAutoscalers.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.regionAutoscalers.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionAutoscalers.testIamPermissions
* @memberOf! ()
*
@@ -60793,63 +74500,101 @@ export namespace compute_beta {
* compute.regionAutoscalers.update
* @desc Updates an autoscaler in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.update({
+ * // Name of the autoscaler to update.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionAutoscalers.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionAutoscalers.update
* @memberOf! ()
*
@@ -61121,61 +74866,81 @@ export namespace compute_beta {
* compute.regionBackendServices.delete
* @desc Deletes the specified regional BackendService resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.delete({
+ * // Name of the BackendService resource to delete.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the BackendService resource to delete.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionBackendServices.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionBackendServices.delete
* @memberOf! ()
*
@@ -61254,61 +75019,84 @@ export namespace compute_beta {
* compute.regionBackendServices.get
* @desc Returns the specified regional BackendService resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.get({
+ * // Name of the BackendService resource to return.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the BackendService resource to return.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionBackendServices.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "securitySettings": {},
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionBackendServices.get
* @memberOf! ()
*
@@ -61386,64 +75174,64 @@ export namespace compute_beta {
* compute.regionBackendServices.getHealth
* @desc Gets the most recent health check results for this regional BackendService.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.getHealth({
+ * // Name of the BackendService resource for which to get health.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the BackendService resource to which the queried instance belongs.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "group": "my_group"
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.regionBackendServices.getHealth(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "annotations": {},
+ * // "healthStatus": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionBackendServices.getHealth
* @memberOf! ()
*
@@ -61529,62 +75317,117 @@ export namespace compute_beta {
* compute.regionBackendServices.insert
* @desc Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Understanding backend services for more information.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "securitySettings": {},
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionBackendServices.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionBackendServices.insert
* @memberOf! ()
*
@@ -61663,71 +75506,75 @@ export namespace compute_beta {
* compute.regionBackendServices.list
* @desc Retrieves the list of regional BackendService resources available to the specified project in the given region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regionBackendServices.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.regionBackendServices.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionBackendServices.list
* @memberOf! ()
*
@@ -61808,66 +75655,119 @@ export namespace compute_beta {
* compute.regionBackendServices.patch
* @desc Updates the specified regional BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.patch({
+ * // Name of the BackendService resource to patch.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the BackendService resource to patch.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "securitySettings": {},
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionBackendServices.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionBackendServices.patch
* @memberOf! ()
*
@@ -61947,65 +75847,62 @@ export namespace compute_beta {
* compute.regionBackendServices.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.regionBackendServices.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionBackendServices.testIamPermissions
* @memberOf! ()
*
@@ -62088,66 +75985,119 @@ export namespace compute_beta {
* compute.regionBackendServices.update
* @desc Updates the specified regional BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.update({
+ * // Name of the BackendService resource to update.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the BackendService resource to update.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "securitySettings": {},
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionBackendServices.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionBackendServices.update
* @memberOf! ()
*
@@ -62444,68 +76394,75 @@ export namespace compute_beta {
* compute.regionCommitments.aggregatedList
* @desc Retrieves an aggregated list of commitments.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regionCommitments.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionCommitments.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.regionCommitments.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionCommitments.aggregatedList
* @memberOf! ()
*
@@ -62590,61 +76547,68 @@ export namespace compute_beta {
* compute.regionCommitments.get
* @desc Returns the specified commitment resource. Gets a list of available commitments by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionCommitments.get({
+ * // Name of the commitment to return.
+ * commitment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the commitment to return.
- * commitment: 'my-commitment', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionCommitments.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTimestamp": "my_endTimestamp",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "region": "my_region",
+ * // "reservations": [],
+ * // "resources": [],
+ * // "selfLink": "my_selfLink",
+ * // "startTimestamp": "my_startTimestamp",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "type": "my_type"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionCommitments.get
* @memberOf! ()
*
@@ -62722,62 +76686,101 @@ export namespace compute_beta {
* compute.regionCommitments.insert
* @desc Creates a commitment in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionCommitments.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTimestamp": "my_endTimestamp",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "region": "my_region",
+ * // "reservations": [],
+ * // "resources": [],
+ * // "selfLink": "my_selfLink",
+ * // "startTimestamp": "my_startTimestamp",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "type": "my_type"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionCommitments.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionCommitments.insert
* @memberOf! ()
*
@@ -62856,71 +76859,75 @@ export namespace compute_beta {
* compute.regionCommitments.list
* @desc Retrieves a list of commitments contained within the specified region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionCommitments.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regionCommitments.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.regionCommitments.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionCommitments.list
* @memberOf! ()
*
@@ -63000,6 +77007,90 @@ export namespace compute_beta {
/**
* compute.regionCommitments.updateReservations
* @desc Transfers GPUs or local SSDs between reservations within commitments.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionCommitments.updateReservations({
+ * // Name of the commitment for which the reservation is being updated.
+ * commitment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "reservations": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionCommitments.updateReservations
* @memberOf! ()
*
@@ -63224,6 +77315,90 @@ export namespace compute_beta {
/**
* compute.regionDisks.addResourcePolicies
* @desc Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.addResourcePolicies({
+ * // The disk name for this request.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.addResourcePolicies
* @memberOf! ()
*
@@ -63302,6 +77477,110 @@ export namespace compute_beta {
/**
* compute.regionDisks.createSnapshot
* @desc Creates a snapshot of this regional disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.createSnapshot({
+ * // Name of the regional persistent disk to snapshot.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoCreated": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "downloadBytes": "my_downloadBytes",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "snapshotEncryptionKey": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "status": "my_status",
+ * // "storageBytes": "my_storageBytes",
+ * // "storageBytesStatus": "my_storageBytesStatus",
+ * // "storageLocations": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.createSnapshot
* @memberOf! ()
*
@@ -63380,6 +77659,82 @@ export namespace compute_beta {
/**
* compute.regionDisks.delete
* @desc Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.delete({
+ * // Name of the regional persistent disk to delete.
+ * disk: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.delete
* @memberOf! ()
*
@@ -63457,6 +77812,86 @@ export namespace compute_beta {
/**
* compute.regionDisks.get
* @desc Returns a specified regional persistent disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.get({
+ * // Name of the regional persistent disk to return.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskEncryptionKey": {},
+ * // "eraseWindowsVssSignature": false,
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "lastAttachTimestamp": "my_lastAttachTimestamp",
+ * // "lastDetachTimestamp": "my_lastDetachTimestamp",
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "options": "my_options",
+ * // "physicalBlockSizeBytes": "my_physicalBlockSizeBytes",
+ * // "region": "my_region",
+ * // "replicaZones": [],
+ * // "resourcePolicies": [],
+ * // "selfLink": "my_selfLink",
+ * // "sizeGb": "my_sizeGb",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "status": "my_status",
+ * // "storageType": "my_storageType",
+ * // "type": "my_type",
+ * // "users": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.get
* @memberOf! ()
*
@@ -63530,6 +77965,62 @@ export namespace compute_beta {
/**
* compute.regionDisks.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.getIamPolicy
* @memberOf! ()
*
@@ -63605,6 +78096,121 @@ export namespace compute_beta {
/**
* compute.regionDisks.insert
* @desc Creates a persistent regional disk in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Optional. Source image to restore onto a disk.
+ * sourceImage: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskEncryptionKey": {},
+ * // "eraseWindowsVssSignature": false,
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "lastAttachTimestamp": "my_lastAttachTimestamp",
+ * // "lastDetachTimestamp": "my_lastDetachTimestamp",
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "options": "my_options",
+ * // "physicalBlockSizeBytes": "my_physicalBlockSizeBytes",
+ * // "region": "my_region",
+ * // "replicaZones": [],
+ * // "resourcePolicies": [],
+ * // "selfLink": "my_selfLink",
+ * // "sizeGb": "my_sizeGb",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "status": "my_status",
+ * // "storageType": "my_storageType",
+ * // "type": "my_type",
+ * // "users": [],
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.insert
* @memberOf! ()
*
@@ -63683,6 +78289,76 @@ export namespace compute_beta {
/**
* compute.regionDisks.list
* @desc Retrieves the list of persistent disks contained within the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.list
* @memberOf! ()
*
@@ -63759,6 +78435,90 @@ export namespace compute_beta {
/**
* compute.regionDisks.removeResourcePolicies
* @desc Removes resource policies from a regional disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.removeResourcePolicies({
+ * // The disk name for this request.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.removeResourcePolicies
* @memberOf! ()
*
@@ -63839,6 +78599,90 @@ export namespace compute_beta {
/**
* compute.regionDisks.resize
* @desc Resizes the specified regional persistent disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.resize({
+ * // Name of the regional persistent disk.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sizeGb": "my_sizeGb"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.resize
* @memberOf! ()
*
@@ -63917,6 +78761,69 @@ export namespace compute_beta {
/**
* compute.regionDisks.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.setIamPolicy
* @memberOf! ()
*
@@ -63992,6 +78899,91 @@ export namespace compute_beta {
/**
* compute.regionDisks.setLabels
* @desc Sets the labels on the target regional disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.setLabels
* @memberOf! ()
*
@@ -64070,6 +79062,63 @@ export namespace compute_beta {
/**
* compute.regionDisks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.testIamPermissions
* @memberOf! ()
*
@@ -64481,6 +79530,65 @@ export namespace compute_beta {
/**
* compute.regionDiskTypes.get
* @desc Returns the specified regional disk type. Gets a list of available disk types by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDiskTypes.get({
+ * // Name of the disk type to return.
+ * diskType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultDiskSizeGb": "my_defaultDiskSizeGb",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "validDiskSize": "my_validDiskSize",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDiskTypes.get
* @memberOf! ()
*
@@ -64555,6 +79663,76 @@ export namespace compute_beta {
/**
* compute.regionDiskTypes.list
* @desc Retrieves a list of regional disk types available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDiskTypes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDiskTypes.list
* @memberOf! ()
*
@@ -64694,6 +79872,82 @@ export namespace compute_beta {
/**
* compute.regionHealthChecks.delete
* @desc Deletes the specified HealthCheck resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.delete({
+ * // Name of the HealthCheck resource to delete.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.delete
* @memberOf! ()
*
@@ -64771,6 +80025,72 @@ export namespace compute_beta {
/**
* compute.regionHealthChecks.get
* @desc Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.get({
+ * // Name of the HealthCheck resource to return.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "unhealthyThreshold": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.get
* @memberOf! ()
*
@@ -64847,6 +80167,105 @@ export namespace compute_beta {
/**
* compute.regionHealthChecks.insert
* @desc Creates a HealthCheck resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.insert
* @memberOf! ()
*
@@ -64924,6 +80343,76 @@ export namespace compute_beta {
/**
* compute.regionHealthChecks.list
* @desc Retrieves the list of HealthCheck resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.list
* @memberOf! ()
*
@@ -65003,6 +80492,107 @@ export namespace compute_beta {
/**
* compute.regionHealthChecks.patch
* @desc Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.patch({
+ * // Name of the HealthCheck resource to patch.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.patch
* @memberOf! ()
*
@@ -65081,6 +80671,107 @@ export namespace compute_beta {
/**
* compute.regionHealthChecks.update
* @desc Updates a HealthCheck resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.update({
+ * // Name of the HealthCheck resource to update.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.update
* @memberOf! ()
*
@@ -65326,6 +81017,82 @@ export namespace compute_beta {
/**
* compute.regionHealthCheckServices.delete
* @desc Deletes the specified regional HealthCheckService.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthCheckServices.delete({
+ * // Name of the HealthCheckService to delete. The name must be 1-63 characters long, and comply with RFC1035.
+ * healthCheckService: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthCheckServices.delete
* @memberOf! ()
*
@@ -65403,6 +81170,67 @@ export namespace compute_beta {
/**
* compute.regionHealthCheckServices.get
* @desc Returns the specified regional HealthCheckService resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthCheckServices.get({
+ * // Name of the HealthCheckService to update. The name must be 1-63 characters long, and comply with RFC1035.
+ * healthCheckService: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "healthStatusAggregationPolicy": "my_healthStatusAggregationPolicy",
+ * // "healthStatusAggregationStrategy": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "networkEndpointGroups": [],
+ * // "notificationEndpoints": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthCheckServices.get
* @memberOf! ()
*
@@ -65479,6 +81307,100 @@ export namespace compute_beta {
/**
* compute.regionHealthCheckServices.insert
* @desc Creates a regional HealthCheckService resource in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthCheckServices.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "healthStatusAggregationPolicy": "my_healthStatusAggregationPolicy",
+ * // "healthStatusAggregationStrategy": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "networkEndpointGroups": [],
+ * // "notificationEndpoints": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthCheckServices.insert
* @memberOf! ()
*
@@ -65556,6 +81478,76 @@ export namespace compute_beta {
/**
* compute.regionHealthCheckServices.list
* @desc Lists all the HealthCheckService resources that have been configured for the specified project in the given region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthCheckServices.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthCheckServices.list
* @memberOf! ()
*
@@ -65637,6 +81629,102 @@ export namespace compute_beta {
/**
* compute.regionHealthCheckServices.patch
* @desc Updates the specified regional HealthCheckService resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthCheckServices.patch({
+ * // Name of the HealthCheckService to update. The name must be 1-63 characters long, and comply with RFC1035.
+ * healthCheckService: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "healthStatusAggregationPolicy": "my_healthStatusAggregationPolicy",
+ * // "healthStatusAggregationStrategy": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "networkEndpointGroups": [],
+ * // "notificationEndpoints": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthCheckServices.patch
* @memberOf! ()
*
@@ -65854,65 +81942,89 @@ export namespace compute_beta {
* compute.regionInstanceGroupManagers.abandonInstances
* @desc Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.abandonInstances({
+ * // Name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.abandonInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.abandonInstances
* @memberOf! ()
*
@@ -65991,6 +82103,88 @@ export namespace compute_beta {
/**
* compute.regionInstanceGroupManagers.applyUpdatesToInstances
* @desc Apply updates to selected instances the managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.applyUpdatesToInstances(
+ * {
+ * // The name of the managed instance group, should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request, should conform to RFC1035.
+ * region: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": [],
+ * // "minimalAction": "my_minimalAction",
+ * // "mostDisruptiveAllowedAction": "my_mostDisruptiveAllowedAction"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.applyUpdatesToInstances
* @memberOf! ()
*
@@ -66070,6 +82264,90 @@ export namespace compute_beta {
/**
* compute.regionInstanceGroupManagers.createInstances
* @desc Creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.createInstances({
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region where the managed instance group is located. It should conform to RFC1035.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.createInstances
* @memberOf! ()
*
@@ -66149,61 +82427,81 @@ export namespace compute_beta {
* compute.regionInstanceGroupManagers.delete
* @desc Deletes the specified managed instance group and all of the instances in that group.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.delete({
+ * // Name of the managed instance group to delete.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the managed instance group to delete.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.delete
* @memberOf! ()
*
@@ -66282,65 +82580,89 @@ export namespace compute_beta {
* compute.regionInstanceGroupManagers.deleteInstances
* @desc Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.deleteInstances({
+ * // Name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.deleteInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.deleteInstances
* @memberOf! ()
*
@@ -66419,6 +82741,86 @@ export namespace compute_beta {
/**
* compute.regionInstanceGroupManagers.deletePerInstanceConfigs
* @desc Deletes selected per-instance configs for the managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.deletePerInstanceConfigs(
+ * {
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request, should conform to RFC1035.
+ * region: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "names": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.deletePerInstanceConfigs
* @memberOf! ()
*
@@ -66499,61 +82901,78 @@ export namespace compute_beta {
* compute.regionInstanceGroupManagers.get
* @desc Returns all of the details about the specified managed instance group.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.get({
+ * // Name of the managed instance group to return.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the managed instance group to return.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "failoverAction": "my_failoverAction",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "pendingActions": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "statefulPolicy": {},
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.get
* @memberOf! ()
*
@@ -66633,62 +83052,111 @@ export namespace compute_beta {
* compute.regionInstanceGroupManagers.insert
* @desc Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A regional managed instance group can contain up to 2000 instances.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "failoverAction": "my_failoverAction",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "pendingActions": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "statefulPolicy": {},
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.insert
* @memberOf! ()
*
@@ -66767,71 +83235,75 @@ export namespace compute_beta {
* compute.regionInstanceGroupManagers.list
* @desc Retrieves the list of managed instance groups that are contained within the specified region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regionInstanceGroupManagers.list(request, handlePage);
- * }
- * };
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.regionInstanceGroupManagers.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.list
* @memberOf! ()
*
@@ -66920,6 +83392,74 @@ export namespace compute_beta {
/**
* compute.regionInstanceGroupManagers.listErrors
* @desc Lists all errors thrown by actions on instances for a given regional managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.listErrors({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}.
+ * instanceGroupManager: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request. This should conform to RFC1035.
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.listErrors
* @memberOf! ()
*
@@ -67026,74 +83566,73 @@ export namespace compute_beta {
* compute.regionInstanceGroupManagers.listManagedInstances
* @desc Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.listManagedInstances({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var managedInstancesPage = response['managedInstances'];
- * if (!managedInstancesPage) {
- * return;
- * }
- * for (var i = 0; i < managedInstancesPage.length; i++) {
- * // TODO: Change code below to process each resource in `managedInstancesPage`:
- * console.log(JSON.stringify(managedInstancesPage[i], null, 2));
- * }
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regionInstanceGroupManagers.listManagedInstances(request, handlePage);
- * }
- * };
+ * // Example response
+ * // {
+ * // "managedInstances": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
*
- * compute.regionInstanceGroupManagers.listManagedInstances(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.listManagedInstances
* @memberOf! ()
*
@@ -67198,6 +83737,75 @@ export namespace compute_beta {
/**
* compute.regionInstanceGroupManagers.listPerInstanceConfigs
* @desc Lists all of the per-instance configs defined for the managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.listPerInstanceConfigs({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request, should conform to RFC1035.
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.listPerInstanceConfigs
* @memberOf! ()
*
@@ -67303,66 +83911,113 @@ export namespace compute_beta {
* compute.regionInstanceGroupManagers.patch
* @desc Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.patch({
+ * // The name of the instance group manager.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // The name of the instance group manager.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "failoverAction": "my_failoverAction",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "pendingActions": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "statefulPolicy": {},
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.patch
* @memberOf! ()
*
@@ -67441,6 +84096,92 @@ export namespace compute_beta {
/**
* compute.regionInstanceGroupManagers.patchPerInstanceConfigs
* @desc Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.patchPerInstanceConfigs(
+ * {
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request, should conform to RFC1035.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "perInstanceConfigs": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.patchPerInstanceConfigs
* @memberOf! ()
*
@@ -67522,65 +84263,89 @@ export namespace compute_beta {
* compute.regionInstanceGroupManagers.recreateInstances
* @desc Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.recreateInstances({
+ * // Name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.recreateInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.recreateInstances
* @memberOf! ()
*
@@ -67660,64 +84425,83 @@ export namespace compute_beta {
* compute.regionInstanceGroupManagers.resize
* @desc Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.resize({
+ * // Name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Number of instances that should exist in this instance group manager.
- * size: 0, // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.resize(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * size: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.resize
* @memberOf! ()
*
@@ -67797,65 +84581,89 @@ export namespace compute_beta {
* compute.regionInstanceGroupManagers.setAutoHealingPolicies
* @desc Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Please use Patch instead.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.setAutoHealingPolicies({
+ * // Name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.setAutoHealingPolicies(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.setAutoHealingPolicies
* @memberOf! ()
*
@@ -67937,65 +84745,89 @@ export namespace compute_beta {
* compute.regionInstanceGroupManagers.setInstanceTemplate
* @desc Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.setInstanceTemplate({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instanceTemplate": "my_instanceTemplate"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.setInstanceTemplate(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.setInstanceTemplate
* @memberOf! ()
*
@@ -68075,65 +84907,90 @@ export namespace compute_beta {
* compute.regionInstanceGroupManagers.setTargetPools
* @desc Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.setTargetPools({
+ * // Name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "targetPools": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.setTargetPools(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.setTargetPools
* @memberOf! ()
*
@@ -68213,65 +85070,62 @@ export namespace compute_beta {
* compute.regionInstanceGroupManagers.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.testIamPermissions
* @memberOf! ()
*
@@ -68354,66 +85208,113 @@ export namespace compute_beta {
* compute.regionInstanceGroupManagers.update
* @desc Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.update({
+ * // The name of the instance group manager.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // The name of the instance group manager.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "failoverAction": "my_failoverAction",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "pendingActions": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceAccount": "my_serviceAccount",
+ * // "statefulPolicy": {},
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.update
* @memberOf! ()
*
@@ -68492,6 +85393,92 @@ export namespace compute_beta {
/**
* compute.regionInstanceGroupManagers.updatePerInstanceConfigs
* @desc Insert or update (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.updatePerInstanceConfigs(
+ * {
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request, should conform to RFC1035.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "perInstanceConfigs": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.updatePerInstanceConfigs
* @memberOf! ()
*
@@ -69212,61 +86199,66 @@ export namespace compute_beta {
* compute.regionInstanceGroups.get
* @desc Returns the specified instance group resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroups.get({
+ * // Name of the instance group resource to return.
+ * instanceGroup: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the instance group resource to return.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroups.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroups.get
* @memberOf! ()
*
@@ -69344,71 +86336,75 @@ export namespace compute_beta {
* compute.regionInstanceGroups.list
* @desc Retrieves the list of instance group resources contained within the specified region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroups.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regionInstanceGroups.list(request, handlePage);
- * }
- * };
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.regionInstanceGroups.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroups.list
* @memberOf! ()
*
@@ -69491,78 +86487,86 @@ export namespace compute_beta {
* compute.regionInstanceGroups.listInstances
* @desc Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroups.listInstances({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Name of the regional instance group for which we want to list the instances.
+ * instanceGroup: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the regional instance group for which we want to list the instances.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instanceState": "my_instanceState",
+ * // "portName": "my_portName"
+ * // }
* },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regionInstanceGroups.listInstances(request, handlePage);
- * }
- * };
- *
- * compute.regionInstanceGroups.listInstances(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroups.listInstances
* @memberOf! ()
*
@@ -69654,65 +86658,90 @@ export namespace compute_beta {
* compute.regionInstanceGroups.setNamedPorts
* @desc Sets the named ports for the specified regional instance group.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroups.setNamedPorts({
+ * // The name of the regional instance group where the named ports are updated.
+ * instanceGroup: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // The name of the regional instance group where the named ports are updated.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "namedPorts": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroups.setNamedPorts(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroups.setNamedPorts
* @memberOf! ()
*
@@ -69792,65 +86821,62 @@ export namespace compute_beta {
* compute.regionInstanceGroups.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroups.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroups.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroups.testIamPermissions
* @memberOf! ()
*
@@ -70087,6 +87113,82 @@ export namespace compute_beta {
/**
* compute.regionNotificationEndpoints.delete
* @desc Deletes the specified NotificationEndpoint in the given region
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionNotificationEndpoints.delete({
+ * // Name of the NotificationEndpoint resource to delete.
+ * notificationEndpoint: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionNotificationEndpoints.delete
* @memberOf! ()
*
@@ -70164,6 +87266,62 @@ export namespace compute_beta {
/**
* compute.regionNotificationEndpoints.get
* @desc Returns the specified NotificationEndpoint resource in the given region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionNotificationEndpoints.get({
+ * // Name of the NotificationEndpoint resource to return.
+ * notificationEndpoint: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "grpcSettings": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionNotificationEndpoints.get
* @memberOf! ()
*
@@ -70242,6 +87400,95 @@ export namespace compute_beta {
/**
* compute.regionNotificationEndpoints.insert
* @desc Create a NotificationEndpoint in the specified project in the given region using the parameters that are included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionNotificationEndpoints.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "grpcSettings": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionNotificationEndpoints.insert
* @memberOf! ()
*
@@ -70319,6 +87566,76 @@ export namespace compute_beta {
/**
* compute.regionNotificationEndpoints.list
* @desc Lists the NotificationEndpoints for a project in the given region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionNotificationEndpoints.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionNotificationEndpoints.list
* @memberOf! ()
*
@@ -70510,58 +87827,48 @@ export namespace compute_beta {
* compute.regionOperations.delete
* @desc Deletes the specified region-specific Operations resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionOperations.delete({
+ * // Name of the Operations resource to delete.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the Operations resource to delete.
- * operation: 'my-operation', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionOperations.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionOperations.delete
* @memberOf! ()
*
@@ -70637,61 +87944,76 @@ export namespace compute_beta {
* compute.regionOperations.get
* @desc Retrieves the specified region-specific Operations resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionOperations.get({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the Operations resource to return.
- * operation: 'my-operation', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionOperations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionOperations.get
* @memberOf! ()
*
@@ -70769,71 +88091,75 @@ export namespace compute_beta {
* compute.regionOperations.list
* @desc Retrieves a list of Operation resources contained within the specified region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionOperations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regionOperations.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.regionOperations.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionOperations.list
* @memberOf! ()
*
@@ -70913,6 +88239,77 @@ export namespace compute_beta {
/**
* compute.regionOperations.wait
* @desc Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be `DONE` or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not `DONE`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionOperations.wait({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionOperations.wait
* @memberOf! ()
*
@@ -71090,58 +88487,61 @@ export namespace compute_beta {
* compute.regions.get
* @desc Returns the specified Region resource. Gets a list of available regions by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regions.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region resource to return.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regions.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "quotas": [],
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "zones": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regions.get
* @memberOf! ()
*
@@ -71214,68 +88614,73 @@ export namespace compute_beta {
* compute.regions.list
* @desc Retrieves the list of region resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regions.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regions.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.regions.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regions.list
* @memberOf! ()
*
@@ -71403,6 +88808,82 @@ export namespace compute_beta {
/**
* compute.regionSslCertificates.delete
* @desc Deletes the specified SslCertificate resource in the region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionSslCertificates.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the SslCertificate resource to delete.
+ * sslCertificate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionSslCertificates.delete
* @memberOf! ()
*
@@ -71480,6 +88961,68 @@ export namespace compute_beta {
/**
* compute.regionSslCertificates.get
* @desc Returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionSslCertificates.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the SslCertificate resource to return.
+ * sslCertificate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificate": "my_certificate",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "managed": {},
+ * // "name": "my_name",
+ * // "privateKey": "my_privateKey",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfManaged": {},
+ * // "subjectAlternativeNames": [],
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionSslCertificates.get
* @memberOf! ()
*
@@ -71556,6 +89099,101 @@ export namespace compute_beta {
/**
* compute.regionSslCertificates.insert
* @desc Creates a SslCertificate resource in the specified project and region using the data included in the request
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionSslCertificates.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "certificate": "my_certificate",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "managed": {},
+ * // "name": "my_name",
+ * // "privateKey": "my_privateKey",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfManaged": {},
+ * // "subjectAlternativeNames": [],
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionSslCertificates.insert
* @memberOf! ()
*
@@ -71633,6 +89271,76 @@ export namespace compute_beta {
/**
* compute.regionSslCertificates.list
* @desc Retrieves the list of SslCertificate resources available to the specified project in the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionSslCertificates.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionSslCertificates.list
* @memberOf! ()
*
@@ -71821,6 +89529,82 @@ export namespace compute_beta {
/**
* compute.regionTargetHttpProxies.delete
* @desc Deletes the specified TargetHttpProxy resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpProxies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpProxy resource to delete.
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpProxies.delete
* @memberOf! ()
*
@@ -71898,6 +89682,63 @@ export namespace compute_beta {
/**
* compute.regionTargetHttpProxies.get
* @desc Returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpProxies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the TargetHttpProxy resource to return.
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyBind": false,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpProxies.get
* @memberOf! ()
*
@@ -71974,6 +89815,96 @@ export namespace compute_beta {
/**
* compute.regionTargetHttpProxies.insert
* @desc Creates a TargetHttpProxy resource in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpProxies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyBind": false,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpProxies.insert
* @memberOf! ()
*
@@ -72051,6 +89982,76 @@ export namespace compute_beta {
/**
* compute.regionTargetHttpProxies.list
* @desc Retrieves the list of TargetHttpProxy resources available to the specified project in the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpProxies.list
* @memberOf! ()
*
@@ -72130,6 +90131,90 @@ export namespace compute_beta {
/**
* compute.regionTargetHttpProxies.setUrlMap
* @desc Changes the URL map for TargetHttpProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpProxies.setUrlMap({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpProxy to set a URL map for.
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "urlMap": "my_urlMap"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpProxies.setUrlMap
* @memberOf! ()
*
@@ -72346,6 +90431,82 @@ export namespace compute_beta {
/**
* compute.regionTargetHttpsProxies.delete
* @desc Deletes the specified TargetHttpsProxy resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy resource to delete.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.delete
* @memberOf! ()
*
@@ -72423,6 +90584,68 @@ export namespace compute_beta {
/**
* compute.regionTargetHttpsProxies.get
* @desc Returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the TargetHttpsProxy resource to return.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "authentication": "my_authentication",
+ * // "authorization": "my_authorization",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyBind": false,
+ * // "quicOverride": "my_quicOverride",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.get
* @memberOf! ()
*
@@ -72499,6 +90722,101 @@ export namespace compute_beta {
/**
* compute.regionTargetHttpsProxies.insert
* @desc Creates a TargetHttpsProxy resource in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "authentication": "my_authentication",
+ * // "authorization": "my_authorization",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyBind": false,
+ * // "quicOverride": "my_quicOverride",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.insert
* @memberOf! ()
*
@@ -72576,6 +90894,76 @@ export namespace compute_beta {
/**
* compute.regionTargetHttpsProxies.list
* @desc Retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.list
* @memberOf! ()
*
@@ -72657,6 +91045,90 @@ export namespace compute_beta {
/**
* compute.regionTargetHttpsProxies.setSslCertificates
* @desc Replaces SslCertificates for TargetHttpsProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.setSslCertificates({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy resource to set an SslCertificates resource for.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sslCertificates": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.setSslCertificates
* @memberOf! ()
*
@@ -72735,6 +91207,90 @@ export namespace compute_beta {
/**
* compute.regionTargetHttpsProxies.setUrlMap
* @desc Changes the URL map for TargetHttpsProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.setUrlMap({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy to set a URL map for.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "urlMap": "my_urlMap"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.setUrlMap
* @memberOf! ()
*
@@ -72980,6 +91536,78 @@ export namespace compute_beta {
/**
* compute.regionUrlMaps.delete
* @desc Deletes the specified UrlMap resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
+ * requestId: 'placeholder-value',
+ * // Name of the UrlMap resource to delete.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.delete
* @memberOf! ()
*
@@ -73057,6 +91685,69 @@ export namespace compute_beta {
/**
* compute.regionUrlMaps.get
* @desc Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the UrlMap resource to return.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.get
* @memberOf! ()
*
@@ -73131,6 +91822,98 @@ export namespace compute_beta {
/**
* compute.regionUrlMaps.insert
* @desc Creates a UrlMap resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.insert
* @memberOf! ()
*
@@ -73208,6 +91991,87 @@ export namespace compute_beta {
/**
* compute.regionUrlMaps.invalidateCache
* @desc Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.invalidateCache({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
+ * requestId: 'placeholder-value',
+ * // Name of the UrlMap scoping this request.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "host": "my_host",
+ * // "path": "my_path"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.invalidateCache
* @memberOf! ()
*
@@ -73286,6 +92150,76 @@ export namespace compute_beta {
/**
* compute.regionUrlMaps.list
* @desc Retrieves the list of UrlMap resources available to the specified project in the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.list
* @memberOf! ()
*
@@ -73365,6 +92299,100 @@ export namespace compute_beta {
/**
* compute.regionUrlMaps.patch
* @desc Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.patch({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
+ * requestId: 'placeholder-value',
+ * // Name of the UrlMap resource to patch.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.patch
* @memberOf! ()
*
@@ -73443,6 +92471,100 @@ export namespace compute_beta {
/**
* compute.regionUrlMaps.update
* @desc Updates the specified UrlMap resource with the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.update({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
+ * requestId: 'placeholder-value',
+ * // Name of the UrlMap resource to update.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.update
* @memberOf! ()
*
@@ -73521,6 +92643,62 @@ export namespace compute_beta {
/**
* compute.regionUrlMaps.validate
* @desc Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.validate({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the UrlMap resource to be validated as.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resource": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "result": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.validate
* @memberOf! ()
*
@@ -73823,6 +93001,76 @@ export namespace compute_beta {
/**
* compute.reservations.aggregatedList
* @desc Retrieves an aggregated list of reservations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.aggregatedList
* @memberOf! ()
*
@@ -73909,6 +93157,82 @@ export namespace compute_beta {
/**
* compute.reservations.delete
* @desc Deletes the specified reservation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the reservation to delete.
+ * reservation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.delete
* @memberOf! ()
*
@@ -73986,6 +93310,65 @@ export namespace compute_beta {
/**
* compute.reservations.get
* @desc Retrieves information about the specified reservation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the reservation to retrieve.
+ * reservation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commitment": "my_commitment",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "specificReservation": {},
+ * // "specificReservationRequired": false,
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.get
* @memberOf! ()
*
@@ -74061,6 +93444,62 @@ export namespace compute_beta {
/**
* compute.reservations.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.getIamPolicy
* @memberOf! ()
*
@@ -74136,6 +93575,98 @@ export namespace compute_beta {
/**
* compute.reservations.insert
* @desc Creates a new reservation. For more information, read Reserving zonal resources.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "commitment": "my_commitment",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "specificReservation": {},
+ * // "specificReservationRequired": false,
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.insert
* @memberOf! ()
*
@@ -74213,6 +93744,76 @@ export namespace compute_beta {
/**
* compute.reservations.list
* @desc A list of all the reservations that have been configured for the specified project in specified zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.list
* @memberOf! ()
*
@@ -74292,6 +93893,90 @@ export namespace compute_beta {
/**
* compute.reservations.resize
* @desc Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.resize({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the reservation to update.
+ * reservation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "specificSkuCount": "my_specificSkuCount"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.resize
* @memberOf! ()
*
@@ -74370,6 +94055,69 @@ export namespace compute_beta {
/**
* compute.reservations.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.setIamPolicy
* @memberOf! ()
*
@@ -74445,6 +94193,63 @@ export namespace compute_beta {
/**
* compute.reservations.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.testIamPermissions
* @memberOf! ()
*
@@ -74769,6 +94574,77 @@ export namespace compute_beta {
/**
* compute.resourcePolicies.aggregatedList
* @desc Retrieves an aggregated list of resource policies.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.aggregatedList
* @memberOf! ()
*
@@ -74857,6 +94733,82 @@ export namespace compute_beta {
/**
* compute.resourcePolicies.delete
* @desc Deletes the specified resource policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the resource policy to delete.
+ * resourcePolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.delete
* @memberOf! ()
*
@@ -74934,6 +94886,64 @@ export namespace compute_beta {
/**
* compute.resourcePolicies.get
* @desc Retrieves all information of the specified resource policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the resource policy to retrieve.
+ * resourcePolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "groupPlacementPolicy": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "snapshotSchedulePolicy": {},
+ * // "status": "my_status"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.get
* @memberOf! ()
*
@@ -75010,6 +95020,62 @@ export namespace compute_beta {
/**
* compute.resourcePolicies.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.getIamPolicy
* @memberOf! ()
*
@@ -75085,6 +95151,97 @@ export namespace compute_beta {
/**
* compute.resourcePolicies.insert
* @desc Creates a new resource policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "groupPlacementPolicy": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "snapshotSchedulePolicy": {},
+ * // "status": "my_status"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.insert
* @memberOf! ()
*
@@ -75162,6 +95319,77 @@ export namespace compute_beta {
/**
* compute.resourcePolicies.list
* @desc A list all the resource policies that have been configured for the specified project in specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.list
* @memberOf! ()
*
@@ -75241,6 +95469,69 @@ export namespace compute_beta {
/**
* compute.resourcePolicies.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.setIamPolicy
* @memberOf! ()
*
@@ -75316,6 +95607,63 @@ export namespace compute_beta {
/**
* compute.resourcePolicies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.testIamPermissions
* @memberOf! ()
*
@@ -75613,68 +95961,75 @@ export namespace compute_beta {
* compute.routers.aggregatedList
* @desc Retrieves an aggregated list of routers.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.routers.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.routers.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.aggregatedList
* @memberOf! ()
*
@@ -75758,61 +96113,81 @@ export namespace compute_beta {
* compute.routers.delete
* @desc Deletes the specified Router resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the Router resource to delete.
- * router: 'my-router', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.routers.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.delete
* @memberOf! ()
*
@@ -75890,61 +96265,65 @@ export namespace compute_beta {
* compute.routers.get
* @desc Returns the specified Router resource. Gets a list of available routers by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* // Name of the Router resource to return.
- * router: 'my-router', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.routers.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bgp": {},
+ * // "bgpPeers": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nats": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.get
* @memberOf! ()
*
@@ -76018,6 +96397,80 @@ export namespace compute_beta {
/**
* compute.routers.getNatMappingInfo
* @desc Retrieves runtime Nat mapping information of VM endpoints.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.getNatMappingInfo({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Name of the nat service to filter the Nat Mapping information. If it is omitted, all nats for this router will be returned. Name should conform to RFC1035.
+ * natName: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the Router resource to query for Nat Mapping information of VM endpoints.
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "result": [],
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routers.getNatMappingInfo
* @memberOf! ()
*
@@ -76107,61 +96560,55 @@ export namespace compute_beta {
* compute.routers.getRouterStatus
* @desc Retrieves runtime information of the specified router.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.getRouterStatus({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* // Name of the Router resource to query.
- * router: 'my-router', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
*
- * compute.routers.getRouterStatus(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "result": {}
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.getRouterStatus
* @memberOf! ()
*
@@ -76243,62 +96690,98 @@ export namespace compute_beta {
* compute.routers.insert
* @desc Creates a Router resource in the specified project and region using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bgp": {},
+ * // "bgpPeers": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nats": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.routers.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.insert
* @memberOf! ()
*
@@ -76376,71 +96859,75 @@ export namespace compute_beta {
* compute.routers.list
* @desc Retrieves a list of Router resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.routers.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.routers.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.list
* @memberOf! ()
*
@@ -76520,66 +97007,100 @@ export namespace compute_beta {
* compute.routers.patch
* @desc Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.patch({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the Router resource to patch.
- * router: 'my-router', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bgp": {},
+ * // "bgpPeers": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nats": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.routers.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.patch
* @memberOf! ()
*
@@ -76658,65 +97179,73 @@ export namespace compute_beta {
* compute.routers.preview
* @desc Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.preview({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* // Name of the Router resource to query.
- * router: 'my-router', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bgp": {},
+ * // "bgpPeers": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nats": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.routers.preview(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "resource": {}
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.preview
* @memberOf! ()
*
@@ -76798,65 +97327,62 @@ export namespace compute_beta {
* compute.routers.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.routers.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.testIamPermissions
* @memberOf! ()
*
@@ -76939,66 +97465,100 @@ export namespace compute_beta {
* compute.routers.update
* @desc Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.update({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the Router resource to update.
- * router: 'my-router', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bgp": {},
+ * // "bgpPeers": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nats": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.routers.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.update
* @memberOf! ()
*
@@ -77379,58 +97939,79 @@ export namespace compute_beta {
* compute.routes.delete
* @desc Deletes the specified Route resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routes.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the Route resource to delete.
- * route: 'my-route', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.routes.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * route: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routes.delete
* @memberOf! ()
*
@@ -77506,58 +98087,70 @@ export namespace compute_beta {
* compute.routes.get
* @desc Returns the specified Route resource. Gets a list of available routes by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routes.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the Route resource to return.
- * route: 'my-route', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.routes.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * route: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "destRange": "my_destRange",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "nextHopGateway": "my_nextHopGateway",
+ * // "nextHopIlb": "my_nextHopIlb",
+ * // "nextHopInstance": "my_nextHopInstance",
+ * // "nextHopInterconnectAttachment": "my_nextHopInterconnectAttachment",
+ * // "nextHopIp": "my_nextHopIp",
+ * // "nextHopNetwork": "my_nextHopNetwork",
+ * // "nextHopPeering": "my_nextHopPeering",
+ * // "nextHopVpnTunnel": "my_nextHopVpnTunnel",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "tags": [],
+ * // "warnings": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routes.get
* @memberOf! ()
*
@@ -77630,59 +98223,103 @@ export namespace compute_beta {
* compute.routes.insert
* @desc Creates a Route resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routes.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "destRange": "my_destRange",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "nextHopGateway": "my_nextHopGateway",
+ * // "nextHopIlb": "my_nextHopIlb",
+ * // "nextHopInstance": "my_nextHopInstance",
+ * // "nextHopInterconnectAttachment": "my_nextHopInterconnectAttachment",
+ * // "nextHopIp": "my_nextHopIp",
+ * // "nextHopNetwork": "my_nextHopNetwork",
+ * // "nextHopPeering": "my_nextHopPeering",
+ * // "nextHopVpnTunnel": "my_nextHopVpnTunnel",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "tags": [],
+ * // "warnings": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.routes.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routes.insert
* @memberOf! ()
*
@@ -77758,68 +98395,73 @@ export namespace compute_beta {
* compute.routes.list
* @desc Retrieves the list of Route resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.routes.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.routes.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routes.list
* @memberOf! ()
*
@@ -77897,62 +98539,60 @@ export namespace compute_beta {
* compute.routes.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routes.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.routes.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routes.testIamPermissions
* @memberOf! ()
*
@@ -78143,6 +98783,94 @@ export namespace compute_beta {
/**
* compute.securityPolicies.addRule
* @desc Inserts a rule into a security policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.addRule({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the security policy to update.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // If true, the request will not be committed.
+ * validateOnly: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "direction": "my_direction",
+ * // "enableLogging": false,
+ * // "kind": "my_kind",
+ * // "match": {},
+ * // "preview": false,
+ * // "priority": 0,
+ * // "ruleTupleCount": 0,
+ * // "targetResources": [],
+ * // "targetServiceAccounts": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.addRule
* @memberOf! ()
*
@@ -78221,58 +98949,79 @@ export namespace compute_beta {
* compute.securityPolicies.delete
* @desc Deletes the specified policy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the security policy to delete.
- * securityPolicy: 'my-security-policy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.securityPolicies.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.securityPolicies.delete
* @memberOf! ()
*
@@ -78350,58 +99099,67 @@ export namespace compute_beta {
* compute.securityPolicies.get
* @desc List all of the ordered rules present in a single specified policy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the security policy to get.
- * securityPolicy: 'my-security-policy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.securityPolicies.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "associations": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "ruleTupleCount": 0,
+ * // "rules": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "type": "my_type"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.securityPolicies.get
* @memberOf! ()
*
@@ -78477,6 +99235,65 @@ export namespace compute_beta {
/**
* compute.securityPolicies.getRule
* @desc Gets a rule at the specified priority.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.getRule({
+ * // The priority of the rule to get from the security policy.
+ * priority: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the security policy to which the queried rule belongs.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "direction": "my_direction",
+ * // "enableLogging": false,
+ * // "kind": "my_kind",
+ * // "match": {},
+ * // "preview": false,
+ * // "priority": 0,
+ * // "ruleTupleCount": 0,
+ * // "targetResources": [],
+ * // "targetServiceAccounts": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.getRule
* @memberOf! ()
*
@@ -78554,59 +99371,102 @@ export namespace compute_beta {
* compute.securityPolicies.insert
* @desc Creates a new policy in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // If true, the request will not be committed.
+ * validateOnly: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "associations": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "ruleTupleCount": 0,
+ * // "rules": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "type": "my_type"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.securityPolicies.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.securityPolicies.insert
* @memberOf! ()
*
@@ -78685,68 +99545,72 @@ export namespace compute_beta {
* compute.securityPolicies.list
* @desc List all the policies that have been configured for the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.securityPolicies.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.securityPolicies.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.securityPolicies.list
* @memberOf! ()
*
@@ -78825,6 +99689,68 @@ export namespace compute_beta {
/**
* compute.securityPolicies.listPreconfiguredExpressionSets
* @desc Gets the current list of preconfigured Web Application Firewall (WAF) expressions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.listPreconfiguredExpressionSets({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "preconfiguredExpressionSets": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.listPreconfiguredExpressionSets
* @memberOf! ()
*
@@ -78930,63 +99856,102 @@ export namespace compute_beta {
* compute.securityPolicies.patch
* @desc Patches the specified policy with the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.patch({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the security policy to update.
- * securityPolicy: 'my-security-policy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "associations": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parent": "my_parent",
+ * // "ruleTupleCount": 0,
+ * // "rules": [],
+ * // "selfLink": "my_selfLink",
+ * // "selfLinkWithId": "my_selfLinkWithId",
+ * // "type": "my_type"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.securityPolicies.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.securityPolicies.patch
* @memberOf! ()
*
@@ -79064,6 +100029,96 @@ export namespace compute_beta {
/**
* compute.securityPolicies.patchRule
* @desc Patches a rule at the specified priority.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.patchRule({
+ * // The priority of the rule to patch.
+ * priority: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the security policy to update.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // If true, the request will not be committed.
+ * validateOnly: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "direction": "my_direction",
+ * // "enableLogging": false,
+ * // "kind": "my_kind",
+ * // "match": {},
+ * // "preview": false,
+ * // "priority": 0,
+ * // "ruleTupleCount": 0,
+ * // "targetResources": [],
+ * // "targetServiceAccounts": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.patchRule
* @memberOf! ()
*
@@ -79142,6 +100197,76 @@ export namespace compute_beta {
/**
* compute.securityPolicies.removeRule
* @desc Deletes a rule at the specified priority.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.removeRule({
+ * // The priority of the rule to remove from the security policy.
+ * priority: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the security policy to update.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.removeRule
* @memberOf! ()
*
@@ -79218,6 +100343,83 @@ export namespace compute_beta {
/**
* compute.securityPolicies.setLabels
* @desc Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.setLabels
* @memberOf! ()
*
@@ -79295,62 +100497,60 @@ export namespace compute_beta {
* compute.securityPolicies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.securityPolicies.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.securityPolicies.testIamPermissions
* @memberOf! ()
*
@@ -79718,58 +100918,79 @@ export namespace compute_beta {
* compute.snapshots.delete
* @desc Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot. For more information, see Deleting snapshots.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the Snapshot resource to delete.
- * snapshot: 'my-snapshot', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.snapshots.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * snapshot: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.snapshots.delete
* @memberOf! ()
*
@@ -79846,58 +101067,72 @@ export namespace compute_beta {
* compute.snapshots.get
* @desc Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the Snapshot resource to return.
- * snapshot: 'my-snapshot', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.snapshots.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * snapshot: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoCreated": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "downloadBytes": "my_downloadBytes",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "snapshotEncryptionKey": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "status": "my_status",
+ * // "storageBytes": "my_storageBytes",
+ * // "storageBytesStatus": "my_storageBytesStatus",
+ * // "storageLocations": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.snapshots.get
* @memberOf! ()
*
@@ -79970,6 +101205,60 @@ export namespace compute_beta {
/**
* compute.snapshots.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.snapshots.getIamPolicy
* @memberOf! ()
*
@@ -80045,68 +101334,73 @@ export namespace compute_beta {
* compute.snapshots.list
* @desc Retrieves the list of Snapshot resources contained within the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.snapshots.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.snapshots.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.snapshots.list
* @memberOf! ()
*
@@ -80183,6 +101477,67 @@ export namespace compute_beta {
/**
* compute.snapshots.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.snapshots.setIamPolicy
* @memberOf! ()
*
@@ -80258,62 +101613,82 @@ export namespace compute_beta {
* compute.snapshots.setLabels
* @desc Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.snapshots.setLabels(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.snapshots.setLabels
* @memberOf! ()
*
@@ -80391,62 +101766,60 @@ export namespace compute_beta {
* compute.snapshots.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.snapshots.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.snapshots.testIamPermissions
* @memberOf! ()
*
@@ -80679,6 +102052,76 @@ export namespace compute_beta {
/**
* compute.sslCertificates.aggregatedList
* @desc Retrieves the list of all SslCertificate resources, regional and global, available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslCertificates.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Name of the project scoping this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslCertificates.aggregatedList
* @memberOf! ()
*
@@ -80768,58 +102211,79 @@ export namespace compute_beta {
* compute.sslCertificates.delete
* @desc Deletes the specified SslCertificate resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslCertificates.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the SslCertificate resource to delete.
- * sslCertificate: 'my-ssl-certificate', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.sslCertificates.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * sslCertificate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.sslCertificates.delete
* @memberOf! ()
*
@@ -80897,58 +102361,65 @@ export namespace compute_beta {
* compute.sslCertificates.get
* @desc Returns the specified SslCertificate resource. Gets a list of available SSL certificates by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslCertificates.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the SslCertificate resource to return.
- * sslCertificate: 'my-ssl-certificate', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.sslCertificates.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * sslCertificate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificate": "my_certificate",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "managed": {},
+ * // "name": "my_name",
+ * // "privateKey": "my_privateKey",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfManaged": {},
+ * // "subjectAlternativeNames": [],
+ * // "type": "my_type"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.sslCertificates.get
* @memberOf! ()
*
@@ -81025,59 +102496,98 @@ export namespace compute_beta {
* compute.sslCertificates.insert
* @desc Creates a SslCertificate resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslCertificates.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "certificate": "my_certificate",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "managed": {},
+ * // "name": "my_name",
+ * // "privateKey": "my_privateKey",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfManaged": {},
+ * // "subjectAlternativeNames": [],
+ * // "type": "my_type"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.sslCertificates.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.sslCertificates.insert
* @memberOf! ()
*
@@ -81155,68 +102665,73 @@ export namespace compute_beta {
* compute.sslCertificates.list
* @desc Retrieves the list of SslCertificate resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.sslCertificates.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslCertificates.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.sslCertificates.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.sslCertificates.list
* @memberOf! ()
*
@@ -81296,62 +102811,60 @@ export namespace compute_beta {
* compute.sslCertificates.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslCertificates.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.sslCertificates.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.sslCertificates.testIamPermissions
* @memberOf! ()
*
@@ -81578,6 +103091,80 @@ export namespace compute_beta {
/**
* compute.sslPolicies.delete
* @desc Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the SSL policy to delete. The name must be 1-63 characters long, and comply with RFC1035.
+ * sslPolicy: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.delete
* @memberOf! ()
*
@@ -81654,6 +103241,64 @@ export namespace compute_beta {
/**
* compute.sslPolicies.get
* @desc Lists all of the ordered rules present in a single specified policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035.
+ * sslPolicy: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customFeatures": [],
+ * // "description": "my_description",
+ * // "enabledFeatures": [],
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "minTlsVersion": "my_minTlsVersion",
+ * // "name": "my_name",
+ * // "profile": "my_profile",
+ * // "selfLink": "my_selfLink",
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.get
* @memberOf! ()
*
@@ -81728,6 +103373,97 @@ export namespace compute_beta {
/**
* compute.sslPolicies.insert
* @desc Returns the specified SSL policy resource. Gets a list of available SSL policies by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customFeatures": [],
+ * // "description": "my_description",
+ * // "enabledFeatures": [],
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "minTlsVersion": "my_minTlsVersion",
+ * // "name": "my_name",
+ * // "profile": "my_profile",
+ * // "selfLink": "my_selfLink",
+ * // "warnings": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.insert
* @memberOf! ()
*
@@ -81803,6 +103539,74 @@ export namespace compute_beta {
/**
* compute.sslPolicies.list
* @desc Lists all the SSL policies that have been configured for the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.list
* @memberOf! ()
*
@@ -81879,6 +103683,69 @@ export namespace compute_beta {
/**
* compute.sslPolicies.listAvailableFeatures
* @desc Lists all features that can be specified in the SSL policy when using custom profile.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.listAvailableFeatures({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "features": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.listAvailableFeatures
* @memberOf! ()
*
@@ -81974,6 +103841,99 @@ export namespace compute_beta {
/**
* compute.sslPolicies.patch
* @desc Patches the specified SSL policy with the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.patch({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035.
+ * sslPolicy: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customFeatures": [],
+ * // "description": "my_description",
+ * // "enabledFeatures": [],
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "minTlsVersion": "my_minTlsVersion",
+ * // "name": "my_name",
+ * // "profile": "my_profile",
+ * // "selfLink": "my_selfLink",
+ * // "warnings": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.patch
* @memberOf! ()
*
@@ -82051,6 +104011,61 @@ export namespace compute_beta {
/**
* compute.sslPolicies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.testIamPermissions
* @memberOf! ()
*
@@ -82297,68 +104312,75 @@ export namespace compute_beta {
* compute.subnetworks.aggregatedList
* @desc Retrieves an aggregated list of subnetworks.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.subnetworks.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.subnetworks.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.aggregatedList
* @memberOf! ()
*
@@ -82443,61 +104465,81 @@ export namespace compute_beta {
* compute.subnetworks.delete
* @desc Deletes the specified subnetwork.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the Subnetwork resource to delete.
- * subnetwork: 'my-subnetwork', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.subnetworks.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * subnetwork: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.delete
* @memberOf! ()
*
@@ -82576,65 +104618,89 @@ export namespace compute_beta {
* compute.subnetworks.expandIpCidrRange
* @desc Expands the IP CIDR range of the subnetwork to a specified value.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.expandIpCidrRange({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the Subnetwork resource to update.
- * subnetwork: 'my-subnetwork', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * subnetwork: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "ipCidrRange": "my_ipCidrRange"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.subnetworks.expandIpCidrRange(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.expandIpCidrRange
* @memberOf! ()
*
@@ -82714,61 +104780,75 @@ export namespace compute_beta {
* compute.subnetworks.get
* @desc Returns the specified subnetwork. Gets a list of available subnetworks list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* // Name of the Subnetwork resource to return.
- * subnetwork: 'my-subnetwork', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.subnetworks.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * subnetwork: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "allowSubnetCidrRoutesOverlap": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableFlowLogs": false,
+ * // "fingerprint": "my_fingerprint",
+ * // "gatewayAddress": "my_gatewayAddress",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "ipv6CidrRange": "my_ipv6CidrRange",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "privateIpGoogleAccess": false,
+ * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess",
+ * // "privateIpv6GoogleAccessServiceAccounts": [],
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "role": "my_role",
+ * // "secondaryIpRanges": [],
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.get
* @memberOf! ()
*
@@ -82845,61 +104925,61 @@ export namespace compute_beta {
* compute.subnetworks.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.getIamPolicy({
+ * // Requested IAM Policy version.
+ * optionsRequestedPolicyVersion: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.subnetworks.getIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.getIamPolicy
* @memberOf! ()
*
@@ -82976,62 +105056,108 @@ export namespace compute_beta {
* compute.subnetworks.insert
* @desc Creates a subnetwork in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "allowSubnetCidrRoutesOverlap": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableFlowLogs": false,
+ * // "fingerprint": "my_fingerprint",
+ * // "gatewayAddress": "my_gatewayAddress",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "ipv6CidrRange": "my_ipv6CidrRange",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "privateIpGoogleAccess": false,
+ * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess",
+ * // "privateIpv6GoogleAccessServiceAccounts": [],
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "role": "my_role",
+ * // "secondaryIpRanges": [],
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.subnetworks.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.insert
* @memberOf! ()
*
@@ -83110,71 +105236,75 @@ export namespace compute_beta {
* compute.subnetworks.list
* @desc Retrieves a list of subnetworks available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.subnetworks.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.subnetworks.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.list
* @memberOf! ()
*
@@ -83253,6 +105383,74 @@ export namespace compute_beta {
/**
* compute.subnetworks.listUsable
* @desc Retrieves an aggregated list of all usable subnetworks in the project. The list contains all of the subnetworks in the project and the subnetworks that were shared by a Shared VPC host project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.listUsable({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.listUsable
* @memberOf! ()
*
@@ -83341,66 +105539,112 @@ export namespace compute_beta {
* compute.subnetworks.patch
* @desc Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingerprint of the subnetwork resource being patched.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.patch({
+ * // The drain timeout specifies the upper bound in seconds on the amount of time allowed to drain connections from the current ACTIVE subnetwork to the current BACKUP subnetwork. The drain timeout is only applicable when the following conditions are true: - the subnetwork being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork being patched has role = BACKUP - the patch request is setting the role to ACTIVE. Note that after this patch operation the roles of the ACTIVE and BACKUP subnetworks will be swapped.
+ * drainTimeoutSeconds: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the Subnetwork resource to patch.
- * subnetwork: 'my-subnetwork', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * subnetwork: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "allowSubnetCidrRoutesOverlap": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableFlowLogs": false,
+ * // "fingerprint": "my_fingerprint",
+ * // "gatewayAddress": "my_gatewayAddress",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "ipv6CidrRange": "my_ipv6CidrRange",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "privateIpGoogleAccess": false,
+ * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess",
+ * // "privateIpv6GoogleAccessServiceAccounts": [],
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "role": "my_role",
+ * // "secondaryIpRanges": [],
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.subnetworks.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.patch
* @memberOf! ()
*
@@ -83481,65 +105725,68 @@ export namespace compute_beta {
* compute.subnetworks.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.setIamPolicy({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.subnetworks.setIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.setIamPolicy
* @memberOf! ()
*
@@ -83616,65 +105863,89 @@ export namespace compute_beta {
* compute.subnetworks.setPrivateIpGoogleAccess
* @desc Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.setPrivateIpGoogleAccess({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the Subnetwork resource.
- * subnetwork: 'my-subnetwork', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * subnetwork: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "privateIpGoogleAccess": false
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.subnetworks.setPrivateIpGoogleAccess(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.setPrivateIpGoogleAccess
* @memberOf! ()
*
@@ -83756,65 +106027,62 @@ export namespace compute_beta {
* compute.subnetworks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.subnetworks.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.testIamPermissions
* @memberOf! ()
*
@@ -84228,6 +106496,76 @@ export namespace compute_beta {
/**
* compute.targetHttpProxies.aggregatedList
* @desc Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Name of the project scoping this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpProxies.aggregatedList
* @memberOf! ()
*
@@ -84317,58 +106655,79 @@ export namespace compute_beta {
* compute.targetHttpProxies.delete
* @desc Deletes the specified TargetHttpProxy resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetHttpProxy resource to delete.
- * targetHttpProxy: 'my-target-http-proxy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpProxies.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpProxies.delete
* @memberOf! ()
*
@@ -84446,58 +106805,60 @@ export namespace compute_beta {
* compute.targetHttpProxies.get
* @desc Returns the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the TargetHttpProxy resource to return.
- * targetHttpProxy: 'my-target-http-proxy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpProxies.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyBind": false,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpProxies.get
* @memberOf! ()
*
@@ -84574,59 +106935,93 @@ export namespace compute_beta {
* compute.targetHttpProxies.insert
* @desc Creates a TargetHttpProxy resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyBind": false,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "urlMap": "my_urlMap"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpProxies.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpProxies.insert
* @memberOf! ()
*
@@ -84704,68 +107099,73 @@ export namespace compute_beta {
* compute.targetHttpProxies.list
* @desc Retrieves the list of TargetHttpProxy resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetHttpProxies.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetHttpProxies.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpProxies.list
* @memberOf! ()
*
@@ -84845,62 +107245,87 @@ export namespace compute_beta {
* compute.targetHttpProxies.setUrlMap
* @desc Changes the URL map for TargetHttpProxy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.setUrlMap({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetHttpProxy to set a URL map for.
- * targetHttpProxy: 'my-target-http-proxy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "urlMap": "my_urlMap"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpProxies.setUrlMap(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpProxies.setUrlMap
* @memberOf! ()
*
@@ -84979,62 +107404,60 @@ export namespace compute_beta {
* compute.targetHttpProxies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.targetHttpProxies.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpProxies.testIamPermissions
* @memberOf! ()
*
@@ -85286,6 +107709,76 @@ export namespace compute_beta {
/**
* compute.targetHttpsProxies.aggregatedList
* @desc Retrieves the list of all TargetHttpsProxy resources, regional and global, available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Name of the project scoping this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpsProxies.aggregatedList
* @memberOf! ()
*
@@ -85375,58 +107868,79 @@ export namespace compute_beta {
* compute.targetHttpsProxies.delete
* @desc Deletes the specified TargetHttpsProxy resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetHttpsProxy resource to delete.
- * targetHttpsProxy: 'my-target-https-proxy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpsProxies.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpsProxies.delete
* @memberOf! ()
*
@@ -85504,58 +108018,65 @@ export namespace compute_beta {
* compute.targetHttpsProxies.get
* @desc Returns the specified TargetHttpsProxy resource. Gets a list of available target HTTPS proxies by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the TargetHttpsProxy resource to return.
- * targetHttpsProxy: 'my-target-https-proxy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpsProxies.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "authentication": "my_authentication",
+ * // "authorization": "my_authorization",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyBind": false,
+ * // "quicOverride": "my_quicOverride",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpsProxies.get
* @memberOf! ()
*
@@ -85632,59 +108153,98 @@ export namespace compute_beta {
* compute.targetHttpsProxies.insert
* @desc Creates a TargetHttpsProxy resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "authentication": "my_authentication",
+ * // "authorization": "my_authorization",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyBind": false,
+ * // "quicOverride": "my_quicOverride",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy",
+ * // "urlMap": "my_urlMap"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpsProxies.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpsProxies.insert
* @memberOf! ()
*
@@ -85762,68 +108322,73 @@ export namespace compute_beta {
* compute.targetHttpsProxies.list
* @desc Retrieves the list of TargetHttpsProxy resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetHttpsProxies.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetHttpsProxies.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpsProxies.list
* @memberOf! ()
*
@@ -85904,6 +108469,88 @@ export namespace compute_beta {
/**
* compute.targetHttpsProxies.setQuicOverride
* @desc Sets the QUIC override policy for TargetHttpsProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.setQuicOverride({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy resource to set the QUIC override policy for. The name should conform to RFC1035.
+ * targetHttpsProxy: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "quicOverride": "my_quicOverride"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpsProxies.setQuicOverride
* @memberOf! ()
*
@@ -85982,62 +108629,87 @@ export namespace compute_beta {
* compute.targetHttpsProxies.setSslCertificates
* @desc Replaces SslCertificates for TargetHttpsProxy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.setSslCertificates({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetHttpsProxy resource to set an SslCertificates resource for.
- * targetHttpsProxy: 'my-target-https-proxy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sslCertificates": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpsProxies.setSslCertificates(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpsProxies.setSslCertificates
* @memberOf! ()
*
@@ -86115,6 +108787,88 @@ export namespace compute_beta {
/**
* compute.targetHttpsProxies.setSslPolicy
* @desc Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.setSslPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy resource whose SSL policy is to be set. The name must be 1-63 characters long, and comply with RFC1035.
+ * targetHttpsProxy: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sslPolicy": "my_sslPolicy"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpsProxies.setSslPolicy
* @memberOf! ()
*
@@ -86193,62 +108947,87 @@ export namespace compute_beta {
* compute.targetHttpsProxies.setUrlMap
* @desc Changes the URL map for TargetHttpsProxy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.setUrlMap({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetHttpsProxy resource whose URL map is to be set.
- * targetHttpsProxy: 'my-target-https-proxy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "urlMap": "my_urlMap"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpsProxies.setUrlMap(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpsProxies.setUrlMap
* @memberOf! ()
*
@@ -86327,62 +109106,60 @@ export namespace compute_beta {
* compute.targetHttpsProxies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.targetHttpsProxies.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpsProxies.testIamPermissions
* @memberOf! ()
*
@@ -86710,68 +109487,75 @@ export namespace compute_beta {
* compute.targetInstances.aggregatedList
* @desc Retrieves an aggregated list of target instances.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetInstances.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetInstances.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetInstances.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetInstances.aggregatedList
* @memberOf! ()
*
@@ -86861,61 +109645,81 @@ export namespace compute_beta {
* compute.targetInstances.delete
* @desc Deletes the specified TargetInstance resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetInstances.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the zone scoping this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetInstance resource to delete.
- * targetInstance: 'my-target-instance', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetInstances.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetInstance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Name of the zone scoping this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetInstances.delete
* @memberOf! ()
*
@@ -86994,61 +109798,62 @@ export namespace compute_beta {
* compute.targetInstances.get
* @desc Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetInstances.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the zone scoping this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the TargetInstance resource to return.
- * targetInstance: 'my-target-instance', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetInstances.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetInstance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Name of the zone scoping this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "instance": "my_instance",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "natPolicy": "my_natPolicy",
+ * // "selfLink": "my_selfLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetInstances.get
* @memberOf! ()
*
@@ -87126,62 +109931,95 @@ export namespace compute_beta {
* compute.targetInstances.insert
* @desc Creates a TargetInstance resource in the specified project and zone using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetInstances.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the zone scoping this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "instance": "my_instance",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "natPolicy": "my_natPolicy",
+ * // "selfLink": "my_selfLink",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetInstances.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetInstances.insert
* @memberOf! ()
*
@@ -87260,71 +110098,75 @@ export namespace compute_beta {
* compute.targetInstances.list
* @desc Retrieves a list of TargetInstance resources available to the specified project and zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetInstances.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the zone scoping this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetInstances.list(request, handlePage);
- * }
- * };
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetInstances.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetInstances.list
* @memberOf! ()
*
@@ -87405,65 +110247,62 @@ export namespace compute_beta {
* compute.targetInstances.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetInstances.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.targetInstances.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetInstances.testIamPermissions
* @memberOf! ()
*
@@ -87712,65 +110551,89 @@ export namespace compute_beta {
* compute.targetPools.addHealthCheck
* @desc Adds health check URLs to a target pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.addHealthCheck({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the target pool to add a health check to.
- * targetPool: 'my-target-pool', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "healthChecks": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetPools.addHealthCheck(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.addHealthCheck
* @memberOf! ()
*
@@ -87850,65 +110713,89 @@ export namespace compute_beta {
* compute.targetPools.addInstance
* @desc Adds an instance to a target pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.addInstance({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetPool resource to add instances to.
- * targetPool: 'my-target-pool', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetPools.addInstance(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.addInstance
* @memberOf! ()
*
@@ -87988,68 +110875,75 @@ export namespace compute_beta {
* compute.targetPools.aggregatedList
* @desc Retrieves an aggregated list of target pools.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetPools.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetPools.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.aggregatedList
* @memberOf! ()
*
@@ -88134,61 +111028,81 @@ export namespace compute_beta {
* compute.targetPools.delete
* @desc Deletes the specified target pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetPool resource to delete.
- * targetPool: 'my-target-pool', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetPools.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.delete
* @memberOf! ()
*
@@ -88267,61 +111181,65 @@ export namespace compute_beta {
* compute.targetPools.get
* @desc Returns the specified target pool. Gets a list of available target pools by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* // Name of the TargetPool resource to return.
- * targetPool: 'my-target-pool', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetPools.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "backupPool": "my_backupPool",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "failoverRatio": {},
+ * // "healthChecks": [],
+ * // "id": "my_id",
+ * // "instances": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.get
* @memberOf! ()
*
@@ -88398,65 +111316,63 @@ export namespace compute_beta {
* compute.targetPools.getHealth
* @desc Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.getHealth({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* // Name of the TargetPool resource to which the queried instance belongs.
- * targetPool: 'my-target-pool', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instance": "my_instance"
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.targetPools.getHealth(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "healthStatus": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.getHealth
* @memberOf! ()
*
@@ -88539,62 +111455,98 @@ export namespace compute_beta {
* compute.targetPools.insert
* @desc Creates a target pool in the specified project and region using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "backupPool": "my_backupPool",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "failoverRatio": {},
+ * // "healthChecks": [],
+ * // "id": "my_id",
+ * // "instances": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetPools.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.insert
* @memberOf! ()
*
@@ -88673,71 +111625,75 @@ export namespace compute_beta {
* compute.targetPools.list
* @desc Retrieves a list of target pools available to the specified project and region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetPools.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetPools.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.list
* @memberOf! ()
*
@@ -88817,65 +111773,89 @@ export namespace compute_beta {
* compute.targetPools.removeHealthCheck
* @desc Removes health check URL from a target pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.removeHealthCheck({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the target pool to remove health checks from.
- * targetPool: 'my-target-pool', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "healthChecks": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetPools.removeHealthCheck(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.removeHealthCheck
* @memberOf! ()
*
@@ -88955,65 +111935,89 @@ export namespace compute_beta {
* compute.targetPools.removeInstance
* @desc Removes instance URL from a target pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.removeInstance({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetPool resource to remove instances from.
- * targetPool: 'my-target-pool', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetPools.removeInstance(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.removeInstance
* @memberOf! ()
*
@@ -89093,65 +112097,91 @@ export namespace compute_beta {
* compute.targetPools.setBackup
* @desc Changes a backup target pool's configurations.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.setBackup({
+ * // New failoverRatio value for the target pool.
+ * failoverRatio: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetPool resource to set a backup pool for.
- * targetPool: 'my-target-pool', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "target": "my_target"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetPools.setBackup(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.setBackup
* @memberOf! ()
*
@@ -89232,65 +112262,62 @@ export namespace compute_beta {
* compute.targetPools.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.targetPools.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.testIamPermissions
* @memberOf! ()
*
@@ -89711,58 +112738,79 @@ export namespace compute_beta {
* compute.targetSslProxies.delete
* @desc Deletes the specified TargetSslProxy resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetSslProxy resource to delete.
- * targetSslProxy: 'my-target-ssl-proxy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetSslProxies.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetSslProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetSslProxies.delete
* @memberOf! ()
*
@@ -89840,58 +112888,61 @@ export namespace compute_beta {
* compute.targetSslProxies.get
* @desc Returns the specified TargetSslProxy resource. Gets a list of available target SSL proxies by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the TargetSslProxy resource to return.
- * targetSslProxy: 'my-target-ssl-proxy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetSslProxies.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetSslProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyHeader": "my_proxyHeader",
+ * // "selfLink": "my_selfLink",
+ * // "service": "my_service",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetSslProxies.get
* @memberOf! ()
*
@@ -89968,59 +113019,94 @@ export namespace compute_beta {
* compute.targetSslProxies.insert
* @desc Creates a TargetSslProxy resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyHeader": "my_proxyHeader",
+ * // "selfLink": "my_selfLink",
+ * // "service": "my_service",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetSslProxies.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetSslProxies.insert
* @memberOf! ()
*
@@ -90098,68 +113184,73 @@ export namespace compute_beta {
* compute.targetSslProxies.list
* @desc Retrieves the list of TargetSslProxy resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetSslProxies.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetSslProxies.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetSslProxies.list
* @memberOf! ()
*
@@ -90239,62 +113330,87 @@ export namespace compute_beta {
* compute.targetSslProxies.setBackendService
* @desc Changes the BackendService for TargetSslProxy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.setBackendService({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetSslProxy resource whose BackendService resource is to be set.
- * targetSslProxy: 'my-target-ssl-proxy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetSslProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "service": "my_service"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetSslProxies.setBackendService(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetSslProxies.setBackendService
* @memberOf! ()
*
@@ -90373,62 +113489,87 @@ export namespace compute_beta {
* compute.targetSslProxies.setProxyHeader
* @desc Changes the ProxyHeaderType for TargetSslProxy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.setProxyHeader({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetSslProxy resource whose ProxyHeader is to be set.
- * targetSslProxy: 'my-target-ssl-proxy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetSslProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "proxyHeader": "my_proxyHeader"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetSslProxies.setProxyHeader(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetSslProxies.setProxyHeader
* @memberOf! ()
*
@@ -90507,62 +113648,87 @@ export namespace compute_beta {
* compute.targetSslProxies.setSslCertificates
* @desc Changes SslCertificates for TargetSslProxy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.setSslCertificates({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetSslProxy resource whose SslCertificate resource is to be set.
- * targetSslProxy: 'my-target-ssl-proxy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetSslProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sslCertificates": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetSslProxies.setSslCertificates(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetSslProxies.setSslCertificates
* @memberOf! ()
*
@@ -90640,6 +113806,88 @@ export namespace compute_beta {
/**
* compute.targetSslProxies.setSslPolicy
* @desc Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.setSslPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetSslProxy resource whose SSL policy is to be set. The name must be 1-63 characters long, and comply with RFC1035.
+ * targetSslProxy: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sslPolicy": "my_sslPolicy"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetSslProxies.setSslPolicy
* @memberOf! ()
*
@@ -90718,62 +113966,60 @@ export namespace compute_beta {
* compute.targetSslProxies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.targetSslProxies.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetSslProxies.testIamPermissions
* @memberOf! ()
*
@@ -91069,58 +114315,79 @@ export namespace compute_beta {
* compute.targetTcpProxies.delete
* @desc Deletes the specified TargetTcpProxy resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetTcpProxy resource to delete.
- * targetTcpProxy: 'my-target-tcp-proxy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetTcpProxies.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetTcpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetTcpProxies.delete
* @memberOf! ()
*
@@ -91198,58 +114465,59 @@ export namespace compute_beta {
* compute.targetTcpProxies.get
* @desc Returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the TargetTcpProxy resource to return.
- * targetTcpProxy: 'my-target-tcp-proxy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetTcpProxies.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetTcpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyHeader": "my_proxyHeader",
+ * // "selfLink": "my_selfLink",
+ * // "service": "my_service"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetTcpProxies.get
* @memberOf! ()
*
@@ -91326,59 +114594,92 @@ export namespace compute_beta {
* compute.targetTcpProxies.insert
* @desc Creates a TargetTcpProxy resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyHeader": "my_proxyHeader",
+ * // "selfLink": "my_selfLink",
+ * // "service": "my_service"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetTcpProxies.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetTcpProxies.insert
* @memberOf! ()
*
@@ -91456,68 +114757,73 @@ export namespace compute_beta {
* compute.targetTcpProxies.list
* @desc Retrieves the list of TargetTcpProxy resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetTcpProxies.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetTcpProxies.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetTcpProxies.list
* @memberOf! ()
*
@@ -91597,62 +114903,87 @@ export namespace compute_beta {
* compute.targetTcpProxies.setBackendService
* @desc Changes the BackendService for TargetTcpProxy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.setBackendService({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetTcpProxy resource whose BackendService resource is to be set.
- * targetTcpProxy: 'my-target-tcp-proxy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetTcpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "service": "my_service"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetTcpProxies.setBackendService(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetTcpProxies.setBackendService
* @memberOf! ()
*
@@ -91731,62 +115062,87 @@ export namespace compute_beta {
* compute.targetTcpProxies.setProxyHeader
* @desc Changes the ProxyHeaderType for TargetTcpProxy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.setProxyHeader({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetTcpProxy resource whose ProxyHeader is to be set.
- * targetTcpProxy: 'my-target-tcp-proxy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetTcpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "proxyHeader": "my_proxyHeader"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetTcpProxies.setProxyHeader(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetTcpProxies.setProxyHeader
* @memberOf! ()
*
@@ -92008,68 +115364,75 @@ export namespace compute_beta {
* compute.targetVpnGateways.aggregatedList
* @desc Retrieves an aggregated list of target VPN gateways.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetVpnGateways.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetVpnGateways.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetVpnGateways.aggregatedList
* @memberOf! ()
*
@@ -92159,61 +115522,81 @@ export namespace compute_beta {
* compute.targetVpnGateways.delete
* @desc Deletes the specified target VPN gateway.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the target VPN gateway to delete.
- * targetVpnGateway: 'my-target-vpn-gateway', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetVpnGateways.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetVpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetVpnGateways.delete
* @memberOf! ()
*
@@ -92292,61 +115675,66 @@ export namespace compute_beta {
* compute.targetVpnGateways.get
* @desc Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* // Name of the target VPN gateway to return.
- * targetVpnGateway: 'my-target-vpn-gateway', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetVpnGateways.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetVpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "forwardingRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "tunnels": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetVpnGateways.get
* @memberOf! ()
*
@@ -92424,62 +115812,99 @@ export namespace compute_beta {
* compute.targetVpnGateways.insert
* @desc Creates a target VPN gateway in the specified project and region using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "forwardingRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "tunnels": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetVpnGateways.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetVpnGateways.insert
* @memberOf! ()
*
@@ -92558,71 +115983,75 @@ export namespace compute_beta {
* compute.targetVpnGateways.list
* @desc Retrieves a list of target VPN gateways available to the specified project and region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetVpnGateways.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetVpnGateways.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetVpnGateways.list
* @memberOf! ()
*
@@ -92704,6 +116133,91 @@ export namespace compute_beta {
/**
* compute.targetVpnGateways.setLabels
* @desc Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetVpnGateways.setLabels
* @memberOf! ()
*
@@ -92783,65 +116297,62 @@ export namespace compute_beta {
* compute.targetVpnGateways.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.targetVpnGateways.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetVpnGateways.testIamPermissions
* @memberOf! ()
*
@@ -93118,6 +116629,76 @@ export namespace compute_beta {
/**
* compute.urlMaps.aggregatedList
* @desc Retrieves the list of all UrlMap resources, regional and global, available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Name of the project scoping this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.urlMaps.aggregatedList
* @memberOf! ()
*
@@ -93201,58 +116782,79 @@ export namespace compute_beta {
* compute.urlMaps.delete
* @desc Deletes the specified UrlMap resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the UrlMap resource to delete.
- * urlMap: 'my-url-map', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.urlMaps.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.urlMaps.delete
* @memberOf! ()
*
@@ -93329,58 +116931,66 @@ export namespace compute_beta {
* compute.urlMaps.get
* @desc Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the UrlMap resource to return.
- * urlMap: 'my-url-map', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.urlMaps.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.urlMaps.get
* @memberOf! ()
*
@@ -93454,59 +117064,99 @@ export namespace compute_beta {
* compute.urlMaps.insert
* @desc Creates a UrlMap resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.urlMaps.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.urlMaps.insert
* @memberOf! ()
*
@@ -93582,62 +117232,88 @@ export namespace compute_beta {
* compute.urlMaps.invalidateCache
* @desc Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.invalidateCache({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the UrlMap scoping this request.
- * urlMap: 'my-url-map', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "host": "my_host",
+ * // "path": "my_path"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.urlMaps.invalidateCache(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.urlMaps.invalidateCache
* @memberOf! ()
*
@@ -93716,68 +117392,73 @@ export namespace compute_beta {
* compute.urlMaps.list
* @desc Retrieves the list of UrlMap resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.urlMaps.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.urlMaps.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.urlMaps.list
* @memberOf! ()
*
@@ -93855,63 +117536,101 @@ export namespace compute_beta {
* compute.urlMaps.patch
* @desc Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.patch({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the UrlMap resource to patch.
- * urlMap: 'my-url-map', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.urlMaps.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.urlMaps.patch
* @memberOf! ()
*
@@ -93989,62 +117708,60 @@ export namespace compute_beta {
* compute.urlMaps.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.urlMaps.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.urlMaps.testIamPermissions
* @memberOf! ()
*
@@ -94126,63 +117843,101 @@ export namespace compute_beta {
* compute.urlMaps.update
* @desc Updates the specified UrlMap resource with the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.update({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the UrlMap resource to update.
- * urlMap: 'my-url-map', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.urlMaps.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.urlMaps.update
* @memberOf! ()
*
@@ -94260,62 +118015,59 @@ export namespace compute_beta {
* compute.urlMaps.validate
* @desc Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.validate({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the UrlMap resource to be validated as.
- * urlMap: 'my-url-map', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resource": {}
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.urlMaps.validate(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "result": {}
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.urlMaps.validate
* @memberOf! ()
*
@@ -94630,6 +118382,76 @@ export namespace compute_beta {
/**
* compute.vpnGateways.aggregatedList
* @desc Retrieves an aggregated list of VPN gateways.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.aggregatedList
* @memberOf! ()
*
@@ -94713,6 +118535,82 @@ export namespace compute_beta {
/**
* compute.vpnGateways.delete
* @desc Deletes the specified VPN gateway.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the VPN gateway to delete.
+ * vpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.delete
* @memberOf! ()
*
@@ -94790,6 +118688,65 @@ export namespace compute_beta {
/**
* compute.vpnGateways.get
* @desc Returns the specified VPN gateway. Gets a list of available VPN gateways by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the VPN gateway to return.
+ * vpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "vpnInterfaces": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.get
* @memberOf! ()
*
@@ -94865,6 +118822,55 @@ export namespace compute_beta {
/**
* compute.vpnGateways.getStatus
* @desc Returns the status for the specified VPN gateway.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.getStatus({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the VPN gateway to return.
+ * vpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "result": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.getStatus
* @memberOf! ()
*
@@ -94950,6 +118956,98 @@ export namespace compute_beta {
/**
* compute.vpnGateways.insert
* @desc Creates a VPN gateway in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "vpnInterfaces": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.insert
* @memberOf! ()
*
@@ -95027,6 +119125,76 @@ export namespace compute_beta {
/**
* compute.vpnGateways.list
* @desc Retrieves a list of VPN gateways available to the specified project and region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.list
* @memberOf! ()
*
@@ -95105,6 +119273,91 @@ export namespace compute_beta {
/**
* compute.vpnGateways.setLabels
* @desc Sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.setLabels
* @memberOf! ()
*
@@ -95372,68 +119625,75 @@ export namespace compute_beta {
* compute.vpnTunnels.aggregatedList
* @desc Retrieves an aggregated list of VPN tunnels.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.vpnTunnels.aggregatedList(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.vpnTunnels.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.vpnTunnels.aggregatedList
* @memberOf! ()
*
@@ -95517,61 +119777,81 @@ export namespace compute_beta {
* compute.vpnTunnels.delete
* @desc Deletes the specified VpnTunnel resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the VpnTunnel resource to delete.
- * vpnTunnel: 'my-vpn-tunnel', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.vpnTunnels.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * vpnTunnel: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.vpnTunnels.delete
* @memberOf! ()
*
@@ -95650,61 +119930,77 @@ export namespace compute_beta {
* compute.vpnTunnels.get
* @desc Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* // Name of the VpnTunnel resource to return.
- * vpnTunnel: 'my-vpn-tunnel', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.vpnTunnels.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * vpnTunnel: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "detailedStatus": "my_detailedStatus",
+ * // "id": "my_id",
+ * // "ikeVersion": 0,
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "localTrafficSelector": [],
+ * // "name": "my_name",
+ * // "peerExternalGateway": "my_peerExternalGateway",
+ * // "peerExternalGatewayInterface": 0,
+ * // "peerGcpGateway": "my_peerGcpGateway",
+ * // "peerIp": "my_peerIp",
+ * // "region": "my_region",
+ * // "remoteTrafficSelector": [],
+ * // "router": "my_router",
+ * // "selfLink": "my_selfLink",
+ * // "sharedSecret": "my_sharedSecret",
+ * // "sharedSecretHash": "my_sharedSecretHash",
+ * // "status": "my_status",
+ * // "targetVpnGateway": "my_targetVpnGateway",
+ * // "vpnGateway": "my_vpnGateway",
+ * // "vpnGatewayInterface": 0
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.vpnTunnels.get
* @memberOf! ()
*
@@ -95781,62 +120077,110 @@ export namespace compute_beta {
* compute.vpnTunnels.insert
* @desc Creates a VpnTunnel resource in the specified project and region using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "detailedStatus": "my_detailedStatus",
+ * // "id": "my_id",
+ * // "ikeVersion": 0,
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "localTrafficSelector": [],
+ * // "name": "my_name",
+ * // "peerExternalGateway": "my_peerExternalGateway",
+ * // "peerExternalGatewayInterface": 0,
+ * // "peerGcpGateway": "my_peerGcpGateway",
+ * // "peerIp": "my_peerIp",
+ * // "region": "my_region",
+ * // "remoteTrafficSelector": [],
+ * // "router": "my_router",
+ * // "selfLink": "my_selfLink",
+ * // "sharedSecret": "my_sharedSecret",
+ * // "sharedSecretHash": "my_sharedSecretHash",
+ * // "status": "my_status",
+ * // "targetVpnGateway": "my_targetVpnGateway",
+ * // "vpnGateway": "my_vpnGateway",
+ * // "vpnGatewayInterface": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.vpnTunnels.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.vpnTunnels.insert
* @memberOf! ()
*
@@ -95915,71 +120259,75 @@ export namespace compute_beta {
* compute.vpnTunnels.list
* @desc Retrieves a list of VpnTunnel resources contained in the specified project and region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.vpnTunnels.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.vpnTunnels.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.vpnTunnels.list
* @memberOf! ()
*
@@ -96058,6 +120406,91 @@ export namespace compute_beta {
/**
* compute.vpnTunnels.setLabels
* @desc Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnTunnels.setLabels
* @memberOf! ()
*
@@ -96137,65 +120570,62 @@ export namespace compute_beta {
* compute.vpnTunnels.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.testIamPermissions({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.vpnTunnels.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.vpnTunnels.testIamPermissions
* @memberOf! ()
*
@@ -96471,58 +120901,48 @@ export namespace compute_beta {
* compute.zoneOperations.delete
* @desc Deletes the specified zone-specific Operations resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneOperations.delete({
+ * // Name of the Operations resource to delete.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the Operations resource to delete.
- * operation: 'my-operation', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.zoneOperations.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.zoneOperations.delete
* @memberOf! ()
*
@@ -96598,61 +121018,76 @@ export namespace compute_beta {
* compute.zoneOperations.get
* @desc Retrieves the specified zone-specific Operations resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneOperations.get({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the Operations resource to return.
- * operation: 'my-operation', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.zoneOperations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.zoneOperations.get
* @memberOf! ()
*
@@ -96730,71 +121165,75 @@ export namespace compute_beta {
* compute.zoneOperations.list
* @desc Retrieves a list of Operation resources contained within the specified zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneOperations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the zone for request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.zoneOperations.list(request, handlePage);
- * }
- * };
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.zoneOperations.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.zoneOperations.list
* @memberOf! ()
*
@@ -96874,6 +121313,77 @@ export namespace compute_beta {
/**
* compute.zoneOperations.wait
* @desc Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be `DONE` or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not `DONE`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneOperations.wait({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.zoneOperations.wait
* @memberOf! ()
*
@@ -97051,58 +121561,61 @@ export namespace compute_beta {
* compute.zones.get
* @desc Returns the specified Zone resource. Gets a list of available zones by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zones.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the zone resource to return.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.zones.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "availableCpuPlatforms": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.zones.get
* @memberOf! ()
*
@@ -97175,68 +121688,73 @@ export namespace compute_beta {
* compute.zones.list
* @desc Retrieves the list of Zone resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('beta');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.zones.list(request, handlePage);
- * }
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zones.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.zones.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.zones.list
* @memberOf! ()
*
diff --git a/src/apis/compute/v1.ts b/src/apis/compute/v1.ts
index 36e37e26544..da5f84bc72f 100644
--- a/src/apis/compute/v1.ts
+++ b/src/apis/compute/v1.ts
@@ -11431,68 +11431,75 @@ export namespace compute_v1 {
* compute.acceleratorTypes.aggregatedList
* @desc Retrieves an aggregated list of accelerator types.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.acceleratorTypes.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.acceleratorTypes.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.acceleratorTypes.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.acceleratorTypes.aggregatedList
* @memberOf! ()
*
@@ -11582,61 +11589,62 @@ export namespace compute_v1 {
* compute.acceleratorTypes.get
* @desc Returns the specified accelerator type.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.acceleratorTypes.get({
+ * // Name of the accelerator type to return.
+ * acceleratorType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the accelerator type to return.
- * acceleratorType: 'my-accelerator-type', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.acceleratorTypes.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "maximumCardsPerInstance": 0,
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.acceleratorTypes.get
* @memberOf! ()
*
@@ -11714,71 +11722,75 @@ export namespace compute_v1 {
* compute.acceleratorTypes.list
* @desc Retrieves a list of accelerator types available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.acceleratorTypes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.acceleratorTypes.list(request, handlePage);
- * }
- * };
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.acceleratorTypes.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.acceleratorTypes.list
* @memberOf! ()
*
@@ -11951,68 +11963,75 @@ export namespace compute_v1 {
* compute.addresses.aggregatedList
* @desc Retrieves an aggregated list of addresses.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.addresses.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.addresses.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.addresses.aggregatedList
* @memberOf! ()
*
@@ -12096,61 +12115,81 @@ export namespace compute_v1 {
* compute.addresses.delete
* @desc Deletes the specified address resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.delete({
+ * // Name of the address resource to delete.
+ * address: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the address resource to delete.
- * address: 'my-address', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.addresses.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.addresses.delete
* @memberOf! ()
*
@@ -12228,61 +12267,70 @@ export namespace compute_v1 {
* compute.addresses.get
* @desc Returns the specified address resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.get({
+ * // Name of the address resource to return.
+ * address: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the address resource to return.
- * address: 'my-address', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.addresses.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": "my_address",
+ * // "addressType": "my_addressType",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "prefixLength": 0,
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "subnetwork": "my_subnetwork",
+ * // "users": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.addresses.get
* @memberOf! ()
*
@@ -12357,62 +12405,103 @@ export namespace compute_v1 {
* compute.addresses.insert
* @desc Creates an address resource in the specified project by using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": "my_address",
+ * // "addressType": "my_addressType",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "prefixLength": 0,
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "subnetwork": "my_subnetwork",
+ * // "users": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.addresses.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.addresses.insert
* @memberOf! ()
*
@@ -12490,71 +12579,75 @@ export namespace compute_v1 {
* compute.addresses.list
* @desc Retrieves a list of addresses contained within the specified region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.addresses.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.addresses.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.addresses.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.addresses.list
* @memberOf! ()
*
@@ -12771,68 +12864,75 @@ export namespace compute_v1 {
* compute.autoscalers.aggregatedList
* @desc Retrieves an aggregated list of autoscalers.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.autoscalers.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.autoscalers.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.autoscalers.aggregatedList
* @memberOf! ()
*
@@ -12916,61 +13016,81 @@ export namespace compute_v1 {
* compute.autoscalers.delete
* @desc Deletes the specified autoscaler.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.delete({
+ * // Name of the autoscaler to delete.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the autoscaler to delete.
- * autoscaler: 'my-autoscaler', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.autoscalers.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.autoscalers.delete
* @memberOf! ()
*
@@ -13049,61 +13169,66 @@ export namespace compute_v1 {
* compute.autoscalers.get
* @desc Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.get({
+ * // Name of the autoscaler to return.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the autoscaler to return.
- * autoscaler: 'my-autoscaler', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.autoscalers.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.autoscalers.get
* @memberOf! ()
*
@@ -13180,62 +13305,99 @@ export namespace compute_v1 {
* compute.autoscalers.insert
* @desc Creates an autoscaler in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.autoscalers.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.autoscalers.insert
* @memberOf! ()
*
@@ -13314,71 +13476,75 @@ export namespace compute_v1 {
* compute.autoscalers.list
* @desc Retrieves a list of autoscalers contained within the specified zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.autoscalers.list(request, handlePage);
- * }
- * };
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.autoscalers.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.autoscalers.list
* @memberOf! ()
*
@@ -13458,63 +13624,101 @@ export namespace compute_v1 {
* compute.autoscalers.patch
* @desc Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.patch({
+ * // Name of the autoscaler to patch.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.autoscalers.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.autoscalers.patch
* @memberOf! ()
*
@@ -13594,63 +13798,101 @@ export namespace compute_v1 {
* compute.autoscalers.update
* @desc Updates an autoscaler in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.autoscalers.update({
+ * // Name of the autoscaler to update.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.autoscalers.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.autoscalers.update
* @memberOf! ()
*
@@ -13926,6 +14168,89 @@ export namespace compute_v1 {
/**
* compute.backendBuckets.addSignedUrlKey
* @desc Adds a key for validating requests with signed URLs for this backend bucket.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.addSignedUrlKey({
+ * // Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.
+ * backendBucket: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "keyName": "my_keyName",
+ * // "keyValue": "my_keyValue"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendBuckets.addSignedUrlKey
* @memberOf! ()
*
@@ -14004,58 +14329,79 @@ export namespace compute_v1 {
* compute.backendBuckets.delete
* @desc Deletes the specified BackendBucket resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.delete({
* // Name of the BackendBucket resource to delete.
- * backendBucket: 'my-backend-bucket', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.backendBuckets.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * backendBucket: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendBuckets.delete
* @memberOf! ()
*
@@ -14132,6 +14478,82 @@ export namespace compute_v1 {
/**
* compute.backendBuckets.deleteSignedUrlKey
* @desc Deletes a key for validating requests with signed URLs for this backend bucket.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.deleteSignedUrlKey({
+ * // Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.
+ * backendBucket: 'placeholder-value',
+ * // The name of the Signed URL Key to delete.
+ * keyName: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendBuckets.deleteSignedUrlKey
* @memberOf! ()
*
@@ -14210,58 +14632,60 @@ export namespace compute_v1 {
* compute.backendBuckets.get
* @desc Returns the specified BackendBucket resource. Gets a list of available backend buckets by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.get({
* // Name of the BackendBucket resource to return.
- * backendBucket: 'my-backend-bucket', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.backendBuckets.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * backendBucket: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bucketName": "my_bucketName",
+ * // "cdnPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableCdn": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendBuckets.get
* @memberOf! ()
*
@@ -14338,59 +14762,93 @@ export namespace compute_v1 {
* compute.backendBuckets.insert
* @desc Creates a BackendBucket resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bucketName": "my_bucketName",
+ * // "cdnPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableCdn": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.backendBuckets.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendBuckets.insert
* @memberOf! ()
*
@@ -14467,68 +14925,73 @@ export namespace compute_v1 {
* compute.backendBuckets.list
* @desc Retrieves the list of BackendBucket resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.backendBuckets.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.backendBuckets.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendBuckets.list
* @memberOf! ()
*
@@ -14607,63 +15070,95 @@ export namespace compute_v1 {
* compute.backendBuckets.patch
* @desc Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.patch({
* // Name of the BackendBucket resource to patch.
- * backendBucket: 'my-backend-bucket', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * backendBucket: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bucketName": "my_bucketName",
+ * // "cdnPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableCdn": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.backendBuckets.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendBuckets.patch
* @memberOf! ()
*
@@ -14742,63 +15237,95 @@ export namespace compute_v1 {
* compute.backendBuckets.update
* @desc Updates the specified BackendBucket resource with the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendBuckets.update({
* // Name of the BackendBucket resource to update.
- * backendBucket: 'my-backend-bucket', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * backendBucket: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bucketName": "my_bucketName",
+ * // "cdnPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableCdn": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.backendBuckets.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendBuckets.update
* @memberOf! ()
*
@@ -15068,6 +15595,89 @@ export namespace compute_v1 {
/**
* compute.backendServices.addSignedUrlKey
* @desc Adds a key for validating requests with signed URLs for this backend service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.addSignedUrlKey({
+ * // Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.
+ * backendService: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "keyName": "my_keyName",
+ * // "keyValue": "my_keyValue"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendServices.addSignedUrlKey
* @memberOf! ()
*
@@ -15146,68 +15756,75 @@ export namespace compute_v1 {
* compute.backendServices.aggregatedList
* @desc Retrieves the list of all BackendService resources, regional and global, available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Name of the project scoping this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.backendServices.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.backendServices.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.aggregatedList
* @memberOf! ()
*
@@ -15297,58 +15914,79 @@ export namespace compute_v1 {
* compute.backendServices.delete
* @desc Deletes the specified BackendService resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.delete({
* // Name of the BackendService resource to delete.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.backendServices.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.delete
* @memberOf! ()
*
@@ -15425,6 +16063,82 @@ export namespace compute_v1 {
/**
* compute.backendServices.deleteSignedUrlKey
* @desc Deletes a key for validating requests with signed URLs for this backend service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.deleteSignedUrlKey({
+ * // Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.
+ * backendService: 'placeholder-value',
+ * // The name of the Signed URL Key to delete.
+ * keyName: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendServices.deleteSignedUrlKey
* @memberOf! ()
*
@@ -15503,58 +16217,81 @@ export namespace compute_v1 {
* compute.backendServices.get
* @desc Returns the specified BackendService resource. Gets a list of available backend services.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.get({
* // Name of the BackendService resource to return.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.backendServices.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.get
* @memberOf! ()
*
@@ -15631,61 +16368,61 @@ export namespace compute_v1 {
* compute.backendServices.getHealth
* @desc Gets the most recent health check results for this BackendService. Example request body: { "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" }
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.getHealth({
* // Name of the BackendService resource to which the queried instance belongs.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
*
- * auth: authClient,
- * };
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "group": "my_group"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
*
- * compute.backendServices.getHealth(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "healthStatus": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.getHealth
* @memberOf! ()
*
@@ -15770,59 +16507,114 @@ export namespace compute_v1 {
* compute.backendServices.insert
* @desc Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Understanding backend services for more information.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.backendServices.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.insert
* @memberOf! ()
*
@@ -15899,68 +16691,73 @@ export namespace compute_v1 {
* compute.backendServices.list
* @desc Retrieves the list of BackendService resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.backendServices.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.backendServices.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.list
* @memberOf! ()
*
@@ -16039,63 +16836,116 @@ export namespace compute_v1 {
* compute.backendServices.patch
* @desc Patches the specified BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.patch({
* // Name of the BackendService resource to patch.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.backendServices.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.patch
* @memberOf! ()
*
@@ -16173,6 +17023,88 @@ export namespace compute_v1 {
/**
* compute.backendServices.setSecurityPolicy
* @desc Sets the security policy for the specified backend service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.setSecurityPolicy({
+ * // Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.
+ * backendService: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "securityPolicy": "my_securityPolicy"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.backendServices.setSecurityPolicy
* @memberOf! ()
*
@@ -16251,63 +17183,116 @@ export namespace compute_v1 {
* compute.backendServices.update
* @desc Updates the specified BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.backendServices.update({
* // Name of the BackendService resource to update.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.backendServices.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.backendServices.update
* @memberOf! ()
*
@@ -16655,6 +17640,90 @@ export namespace compute_v1 {
/**
* compute.disks.addResourcePolicies
* @desc Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.addResourcePolicies({
+ * // The disk name for this request.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.addResourcePolicies
* @memberOf! ()
*
@@ -16734,68 +17803,75 @@ export namespace compute_v1 {
* compute.disks.aggregatedList
* @desc Retrieves an aggregated list of persistent disks.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.disks.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.disks.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.disks.aggregatedList
* @memberOf! ()
*
@@ -16877,65 +17953,111 @@ export namespace compute_v1 {
* compute.disks.createSnapshot
* @desc Creates a snapshot of a specified persistent disk.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.createSnapshot({
+ * // Name of the persistent disk to snapshot.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // [Input Only] Specifies to create an application consistent snapshot by informing the OS to prepare for the snapshot process. Currently only supported on Windows instances using the Volume Shadow Copy Service (VSS).
+ * guestFlush: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the persistent disk to snapshot.
- * disk: 'my-disk', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoCreated": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "downloadBytes": "my_downloadBytes",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "snapshotEncryptionKey": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "status": "my_status",
+ * // "storageBytes": "my_storageBytes",
+ * // "storageBytesStatus": "my_storageBytesStatus",
+ * // "storageLocations": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.disks.createSnapshot(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.disks.createSnapshot
* @memberOf! ()
*
@@ -17016,61 +18138,81 @@ export namespace compute_v1 {
* compute.disks.delete
* @desc Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.delete({
+ * // Name of the persistent disk to delete.
+ * disk: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the persistent disk to delete.
- * disk: 'my-disk', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.disks.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.disks.delete
* @memberOf! ()
*
@@ -17148,61 +18290,83 @@ export namespace compute_v1 {
* compute.disks.get
* @desc Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.get({
+ * // Name of the persistent disk to return.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the persistent disk to return.
- * disk: 'my-disk', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.disks.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskEncryptionKey": {},
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "lastAttachTimestamp": "my_lastAttachTimestamp",
+ * // "lastDetachTimestamp": "my_lastDetachTimestamp",
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "options": "my_options",
+ * // "physicalBlockSizeBytes": "my_physicalBlockSizeBytes",
+ * // "region": "my_region",
+ * // "replicaZones": [],
+ * // "resourcePolicies": [],
+ * // "selfLink": "my_selfLink",
+ * // "sizeGb": "my_sizeGb",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "status": "my_status",
+ * // "type": "my_type",
+ * // "users": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.disks.get
* @memberOf! ()
*
@@ -17276,6 +18440,60 @@ export namespace compute_v1 {
/**
* compute.disks.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.getIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.getIamPolicy
* @memberOf! ()
*
@@ -17351,62 +18569,118 @@ export namespace compute_v1 {
* compute.disks.insert
* @desc Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Optional. Source image to restore onto a disk.
+ * sourceImage: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskEncryptionKey": {},
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "lastAttachTimestamp": "my_lastAttachTimestamp",
+ * // "lastDetachTimestamp": "my_lastDetachTimestamp",
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "options": "my_options",
+ * // "physicalBlockSizeBytes": "my_physicalBlockSizeBytes",
+ * // "region": "my_region",
+ * // "replicaZones": [],
+ * // "resourcePolicies": [],
+ * // "selfLink": "my_selfLink",
+ * // "sizeGb": "my_sizeGb",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "status": "my_status",
+ * // "type": "my_type",
+ * // "users": [],
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.disks.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.disks.insert
* @memberOf! ()
*
@@ -17484,71 +18758,75 @@ export namespace compute_v1 {
* compute.disks.list
* @desc Retrieves a list of persistent disks contained within the specified zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.disks.list(request, handlePage);
- * }
- * };
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.disks.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.disks.list
* @memberOf! ()
*
@@ -17624,6 +18902,90 @@ export namespace compute_v1 {
/**
* compute.disks.removeResourcePolicies
* @desc Removes resource policies from a disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.removeResourcePolicies({
+ * // The disk name for this request.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.removeResourcePolicies
* @memberOf! ()
*
@@ -17705,65 +19067,89 @@ export namespace compute_v1 {
* compute.disks.resize
* @desc Resizes the specified persistent disk. You can only increase the size of the disk.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.resize({
+ * // The name of the persistent disk.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the persistent disk.
- * disk: 'my-disk', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sizeGb": "my_sizeGb"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.disks.resize(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.disks.resize
* @memberOf! ()
*
@@ -17841,6 +19227,69 @@ export namespace compute_v1 {
/**
* compute.disks.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.setIamPolicy
* @memberOf! ()
*
@@ -17917,65 +19366,90 @@ export namespace compute_v1 {
* compute.disks.setLabels
* @desc Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.setLabels({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.disks.setLabels(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.disks.setLabels
* @memberOf! ()
*
@@ -18053,6 +19527,63 @@ export namespace compute_v1 {
/**
* compute.disks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.disks.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.disks.testIamPermissions
* @memberOf! ()
*
@@ -18493,68 +20024,75 @@ export namespace compute_v1 {
* compute.diskTypes.aggregatedList
* @desc Retrieves an aggregated list of disk types.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.diskTypes.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.diskTypes.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.diskTypes.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.diskTypes.aggregatedList
* @memberOf! ()
*
@@ -18638,61 +20176,64 @@ export namespace compute_v1 {
* compute.diskTypes.get
* @desc Returns the specified disk type. Gets a list of available disk types by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.diskTypes.get({
+ * // Name of the disk type to return.
+ * diskType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the disk type to return.
- * diskType: 'my-disk-type', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.diskTypes.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultDiskSizeGb": "my_defaultDiskSizeGb",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "validDiskSize": "my_validDiskSize",
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.diskTypes.get
* @memberOf! ()
*
@@ -18767,71 +20308,75 @@ export namespace compute_v1 {
* compute.diskTypes.list
* @desc Retrieves a list of disk types available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.diskTypes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.diskTypes.list(request, handlePage);
- * }
- * };
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.diskTypes.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.diskTypes.list
* @memberOf! ()
*
@@ -18999,6 +20544,80 @@ export namespace compute_v1 {
/**
* compute.externalVpnGateways.delete
* @desc Deletes the specified externalVpnGateway.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.delete({
+ * // Name of the externalVpnGateways to delete.
+ * externalVpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.delete
* @memberOf! ()
*
@@ -19075,6 +20694,62 @@ export namespace compute_v1 {
/**
* compute.externalVpnGateways.get
* @desc Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.get({
+ * // Name of the externalVpnGateway to return.
+ * externalVpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "redundancyType": "my_redundancyType",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.get
* @memberOf! ()
*
@@ -19150,6 +20825,95 @@ export namespace compute_v1 {
/**
* compute.externalVpnGateways.insert
* @desc Creates a ExternalVpnGateway in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "redundancyType": "my_redundancyType",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.insert
* @memberOf! ()
*
@@ -19226,6 +20990,75 @@ export namespace compute_v1 {
/**
* compute.externalVpnGateways.list
* @desc Retrieves the list of ExternalVpnGateway available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.list
* @memberOf! ()
*
@@ -19306,6 +21139,83 @@ export namespace compute_v1 {
/**
* compute.externalVpnGateways.setLabels
* @desc Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.setLabels
* @memberOf! ()
*
@@ -19382,6 +21292,61 @@ export namespace compute_v1 {
/**
* compute.externalVpnGateways.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.externalVpnGateways.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.externalVpnGateways.testIamPermissions
* @memberOf! ()
*
@@ -19598,58 +21563,79 @@ export namespace compute_v1 {
* compute.firewalls.delete
* @desc Deletes the specified firewall.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.delete({
* // Name of the firewall rule to delete.
- * firewall: 'my-firewall', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.firewalls.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * firewall: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.firewalls.delete
* @memberOf! ()
*
@@ -19726,58 +21712,70 @@ export namespace compute_v1 {
* compute.firewalls.get
* @desc Returns the specified firewall.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.get({
* // Name of the firewall rule to return.
- * firewall: 'my-firewall', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.firewalls.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * firewall: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "allowed": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "denied": [],
+ * // "description": "my_description",
+ * // "destinationRanges": [],
+ * // "direction": "my_direction",
+ * // "disabled": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "sourceRanges": [],
+ * // "sourceServiceAccounts": [],
+ * // "sourceTags": [],
+ * // "targetServiceAccounts": [],
+ * // "targetTags": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.firewalls.get
* @memberOf! ()
*
@@ -19851,59 +21849,103 @@ export namespace compute_v1 {
* compute.firewalls.insert
* @desc Creates a firewall rule in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "allowed": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "denied": [],
+ * // "description": "my_description",
+ * // "destinationRanges": [],
+ * // "direction": "my_direction",
+ * // "disabled": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "sourceRanges": [],
+ * // "sourceServiceAccounts": [],
+ * // "sourceTags": [],
+ * // "targetServiceAccounts": [],
+ * // "targetTags": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.firewalls.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.firewalls.insert
* @memberOf! ()
*
@@ -19979,68 +22021,73 @@ export namespace compute_v1 {
* compute.firewalls.list
* @desc Retrieves the list of firewall rules available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.firewalls.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.firewalls.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.firewalls.list
* @memberOf! ()
*
@@ -20118,63 +22165,105 @@ export namespace compute_v1 {
* compute.firewalls.patch
* @desc Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.patch({
* // Name of the firewall rule to patch.
- * firewall: 'my-firewall', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * firewall: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "allowed": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "denied": [],
+ * // "description": "my_description",
+ * // "destinationRanges": [],
+ * // "direction": "my_direction",
+ * // "disabled": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "sourceRanges": [],
+ * // "sourceServiceAccounts": [],
+ * // "sourceTags": [],
+ * // "targetServiceAccounts": [],
+ * // "targetTags": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.firewalls.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.firewalls.patch
* @memberOf! ()
*
@@ -20252,63 +22341,105 @@ export namespace compute_v1 {
* compute.firewalls.update
* @desc Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.firewalls.update({
* // Name of the firewall rule to update.
- * firewall: 'my-firewall', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * firewall: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "allowed": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "denied": [],
+ * // "description": "my_description",
+ * // "destinationRanges": [],
+ * // "direction": "my_direction",
+ * // "disabled": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "sourceRanges": [],
+ * // "sourceServiceAccounts": [],
+ * // "sourceTags": [],
+ * // "targetServiceAccounts": [],
+ * // "targetTags": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.firewalls.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.firewalls.update
* @memberOf! ()
*
@@ -20523,68 +22654,75 @@ export namespace compute_v1 {
* compute.forwardingRules.aggregatedList
* @desc Retrieves an aggregated list of forwarding rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.forwardingRules.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.forwardingRules.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.forwardingRules.aggregatedList
* @memberOf! ()
*
@@ -20674,61 +22812,81 @@ export namespace compute_v1 {
* compute.forwardingRules.delete
* @desc Deletes the specified ForwardingRule resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.delete({
+ * // Name of the ForwardingRule resource to delete.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the ForwardingRule resource to delete.
- * forwardingRule: 'my-forwarding-rule', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.forwardingRules.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.forwardingRules.delete
* @memberOf! ()
*
@@ -20807,61 +22965,78 @@ export namespace compute_v1 {
* compute.forwardingRules.get
* @desc Returns the specified ForwardingRule resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.get({
+ * // Name of the ForwardingRule resource to return.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the ForwardingRule resource to return.
- * forwardingRule: 'my-forwarding-rule', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.forwardingRules.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.forwardingRules.get
* @memberOf! ()
*
@@ -20939,62 +23114,111 @@ export namespace compute_v1 {
* compute.forwardingRules.insert
* @desc Creates a ForwardingRule resource in the specified project and region using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.forwardingRules.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.forwardingRules.insert
* @memberOf! ()
*
@@ -21073,71 +23297,75 @@ export namespace compute_v1 {
* compute.forwardingRules.list
* @desc Retrieves a list of ForwardingRule resources available to the specified project and region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.forwardingRules.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.forwardingRules.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.forwardingRules.list
* @memberOf! ()
*
@@ -21217,6 +23445,114 @@ export namespace compute_v1 {
/**
* compute.forwardingRules.patch
* @desc Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.patch({
+ * // Name of the ForwardingRule resource to patch.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.forwardingRules.patch
* @memberOf! ()
*
@@ -21296,65 +23632,89 @@ export namespace compute_v1 {
* compute.forwardingRules.setTarget
* @desc Changes target URL for forwarding rule. The new target should be of the same type as the old target.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.forwardingRules.setTarget({
+ * // Name of the ForwardingRule resource in which target is to be set.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the ForwardingRule resource in which target is to be set.
- * forwardingRule: 'my-forwarding-rule', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "target": "my_target"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.forwardingRules.setTarget(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.forwardingRules.setTarget
* @memberOf! ()
*
@@ -21633,58 +23993,79 @@ export namespace compute_v1 {
* compute.globalAddresses.delete
* @desc Deletes the specified address resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalAddresses.delete({
* // Name of the address resource to delete.
- * address: 'my-address', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.globalAddresses.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * address: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalAddresses.delete
* @memberOf! ()
*
@@ -21762,58 +24143,68 @@ export namespace compute_v1 {
* compute.globalAddresses.get
* @desc Returns the specified address resource. Gets a list of available addresses by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalAddresses.get({
* // Name of the address resource to return.
- * address: 'my-address', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.globalAddresses.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * address: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": "my_address",
+ * // "addressType": "my_addressType",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "prefixLength": 0,
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "subnetwork": "my_subnetwork",
+ * // "users": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalAddresses.get
* @memberOf! ()
*
@@ -21888,59 +24279,101 @@ export namespace compute_v1 {
* compute.globalAddresses.insert
* @desc Creates an address resource in the specified project by using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalAddresses.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": "my_address",
+ * // "addressType": "my_addressType",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "prefixLength": 0,
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "subnetwork": "my_subnetwork",
+ * // "users": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.globalAddresses.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalAddresses.insert
* @memberOf! ()
*
@@ -22017,68 +24450,73 @@ export namespace compute_v1 {
* compute.globalAddresses.list
* @desc Retrieves a list of global addresses.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalAddresses.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.globalAddresses.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.globalAddresses.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalAddresses.list
* @memberOf! ()
*
@@ -22250,58 +24688,79 @@ export namespace compute_v1 {
* compute.globalForwardingRules.delete
* @desc Deletes the specified GlobalForwardingRule resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.delete({
* // Name of the ForwardingRule resource to delete.
- * forwardingRule: 'my-forwarding-rule', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.globalForwardingRules.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalForwardingRules.delete
* @memberOf! ()
*
@@ -22379,58 +24838,76 @@ export namespace compute_v1 {
* compute.globalForwardingRules.get
* @desc Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.get({
* // Name of the ForwardingRule resource to return.
- * forwardingRule: 'my-forwarding-rule', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.globalForwardingRules.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalForwardingRules.get
* @memberOf! ()
*
@@ -22507,59 +24984,109 @@ export namespace compute_v1 {
* compute.globalForwardingRules.insert
* @desc Creates a GlobalForwardingRule resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.globalForwardingRules.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalForwardingRules.insert
* @memberOf! ()
*
@@ -22636,68 +25163,73 @@ export namespace compute_v1 {
* compute.globalForwardingRules.list
* @desc Retrieves a list of GlobalForwardingRule resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.globalForwardingRules.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.globalForwardingRules.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalForwardingRules.list
* @memberOf! ()
*
@@ -22775,6 +25307,112 @@ export namespace compute_v1 {
/**
* compute.globalForwardingRules.patch
* @desc Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.patch({
+ * // Name of the ForwardingRule resource to patch.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPAddress": "my_IPAddress",
+ * // "IPProtocol": "my_IPProtocol",
+ * // "allPorts": false,
+ * // "allowGlobalAccess": false,
+ * // "backendService": "my_backendService",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "ipVersion": "my_ipVersion",
+ * // "isMirroringCollector": false,
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "metadataFilters": [],
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkTier": "my_networkTier",
+ * // "portRange": "my_portRange",
+ * // "ports": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serviceLabel": "my_serviceLabel",
+ * // "serviceName": "my_serviceName",
+ * // "subnetwork": "my_subnetwork",
+ * // "target": "my_target"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalForwardingRules.patch
* @memberOf! ()
*
@@ -22853,62 +25491,87 @@ export namespace compute_v1 {
* compute.globalForwardingRules.setTarget
* @desc Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalForwardingRules.setTarget({
* // Name of the ForwardingRule resource in which target is to be set.
- * forwardingRule: 'my-forwarding-rule', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * forwardingRule: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "target": "my_target"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.globalForwardingRules.setTarget(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalForwardingRules.setTarget
* @memberOf! ()
*
@@ -23129,6 +25792,88 @@ export namespace compute_v1 {
/**
* compute.globalNetworkEndpointGroups.attachNetworkEndpoints
* @desc Attach a network endpoint to the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.attachNetworkEndpoints({
+ * // The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkEndpoints": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.attachNetworkEndpoints
* @memberOf! ()
*
@@ -23208,6 +25953,80 @@ export namespace compute_v1 {
/**
* compute.globalNetworkEndpointGroups.delete
* @desc Deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are backend services referencing it.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.delete({
+ * // The name of the network endpoint group to delete. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.delete
* @memberOf! ()
*
@@ -23284,6 +26103,88 @@ export namespace compute_v1 {
/**
* compute.globalNetworkEndpointGroups.detachNetworkEndpoints
* @desc Detach the network endpoint from the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.detachNetworkEndpoints({
+ * // The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkEndpoints": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.detachNetworkEndpoints
* @memberOf! ()
*
@@ -23363,6 +26264,64 @@ export namespace compute_v1 {
/**
* compute.globalNetworkEndpointGroups.get
* @desc Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.get({
+ * // The name of the network endpoint group. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultPort": 0,
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkEndpointType": "my_networkEndpointType",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.get
* @memberOf! ()
*
@@ -23440,6 +26399,97 @@ export namespace compute_v1 {
/**
* compute.globalNetworkEndpointGroups.insert
* @desc Creates a network endpoint group in the specified project using the parameters that are included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultPort": 0,
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkEndpointType": "my_networkEndpointType",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.insert
* @memberOf! ()
*
@@ -23516,6 +26566,74 @@ export namespace compute_v1 {
/**
* compute.globalNetworkEndpointGroups.list
* @desc Retrieves the list of network endpoint groups that are located in the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.list
* @memberOf! ()
*
@@ -23596,6 +26714,75 @@ export namespace compute_v1 {
/**
* compute.globalNetworkEndpointGroups.listNetworkEndpoints
* @desc Lists the network endpoints in the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalNetworkEndpointGroups.listNetworkEndpoints({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalNetworkEndpointGroups.listNetworkEndpoints
* @memberOf! ()
*
@@ -23874,68 +27061,75 @@ export namespace compute_v1 {
* compute.globalOperations.aggregatedList
* @desc Retrieves an aggregated list of all operations.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOperations.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.globalOperations.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.globalOperations.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalOperations.aggregatedList
* @memberOf! ()
*
@@ -24019,55 +27213,46 @@ export namespace compute_v1 {
* compute.globalOperations.delete
* @desc Deletes the specified Operations resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOperations.delete({
* // Name of the Operations resource to delete.
- * operation: 'my-operation', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.globalOperations.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalOperations.delete
* @memberOf! ()
*
@@ -24142,58 +27327,74 @@ export namespace compute_v1 {
* compute.globalOperations.get
* @desc Retrieves the specified Operations resource. Gets a list of operations by making a `list()` request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOperations.get({
* // Name of the Operations resource to return.
- * operation: 'my-operation', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.globalOperations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalOperations.get
* @memberOf! ()
*
@@ -24270,68 +27471,73 @@ export namespace compute_v1 {
* compute.globalOperations.list
* @desc Retrieves a list of Operation resources contained within the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOperations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.globalOperations.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.globalOperations.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.globalOperations.list
* @memberOf! ()
*
@@ -24409,6 +27615,75 @@ export namespace compute_v1 {
/**
* compute.globalOperations.wait
* @desc Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be `DONE` or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not `DONE`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.globalOperations.wait({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.globalOperations.wait
* @memberOf! ()
*
@@ -24600,6 +27875,76 @@ export namespace compute_v1 {
/**
* compute.healthChecks.aggregatedList
* @desc Retrieves the list of all HealthCheck resources, regional and global, available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Name of the project scoping this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.healthChecks.aggregatedList
* @memberOf! ()
*
@@ -24686,58 +28031,79 @@ export namespace compute_v1 {
* compute.healthChecks.delete
* @desc Deletes the specified HealthCheck resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.delete({
* // Name of the HealthCheck resource to delete.
- * healthCheck: 'my-health-check', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.healthChecks.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.healthChecks.delete
* @memberOf! ()
*
@@ -24815,58 +28181,68 @@ export namespace compute_v1 {
* compute.healthChecks.get
* @desc Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.get({
* // Name of the HealthCheck resource to return.
- * healthCheck: 'my-health-check', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.healthChecks.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "unhealthyThreshold": 0
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.healthChecks.get
* @memberOf! ()
*
@@ -24942,59 +28318,101 @@ export namespace compute_v1 {
* compute.healthChecks.insert
* @desc Creates a HealthCheck resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.healthChecks.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.healthChecks.insert
* @memberOf! ()
*
@@ -25071,68 +28489,73 @@ export namespace compute_v1 {
* compute.healthChecks.list
* @desc Retrieves the list of HealthCheck resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.healthChecks.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.healthChecks.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.healthChecks.list
* @memberOf! ()
*
@@ -25211,63 +28634,103 @@ export namespace compute_v1 {
* compute.healthChecks.patch
* @desc Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.patch({
* // Name of the HealthCheck resource to patch.
- * healthCheck: 'my-health-check', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.healthChecks.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.healthChecks.patch
* @memberOf! ()
*
@@ -25346,63 +28809,103 @@ export namespace compute_v1 {
* compute.healthChecks.update
* @desc Updates a HealthCheck resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.healthChecks.update({
* // Name of the HealthCheck resource to update.
- * healthCheck: 'my-health-check', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.healthChecks.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.healthChecks.update
* @memberOf! ()
*
@@ -25655,58 +29158,79 @@ export namespace compute_v1 {
* compute.httpHealthChecks.delete
* @desc Deletes the specified HttpHealthCheck resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.delete({
* // Name of the HttpHealthCheck resource to delete.
- * httpHealthCheck: 'my-http-health-check', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.httpHealthChecks.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpHealthChecks.delete
* @memberOf! ()
*
@@ -25784,58 +29308,64 @@ export namespace compute_v1 {
* compute.httpHealthChecks.get
* @desc Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.get({
* // Name of the HttpHealthCheck resource to return.
- * httpHealthCheck: 'my-http-health-check', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.httpHealthChecks.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpHealthChecks.get
* @memberOf! ()
*
@@ -25912,59 +29442,97 @@ export namespace compute_v1 {
* compute.httpHealthChecks.insert
* @desc Creates a HttpHealthCheck resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.httpHealthChecks.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpHealthChecks.insert
* @memberOf! ()
*
@@ -26041,68 +29609,73 @@ export namespace compute_v1 {
* compute.httpHealthChecks.list
* @desc Retrieves the list of HttpHealthCheck resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.httpHealthChecks.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.httpHealthChecks.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpHealthChecks.list
* @memberOf! ()
*
@@ -26181,63 +29754,99 @@ export namespace compute_v1 {
* compute.httpHealthChecks.patch
* @desc Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.patch({
* // Name of the HttpHealthCheck resource to patch.
- * httpHealthCheck: 'my-http-health-check', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.httpHealthChecks.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpHealthChecks.patch
* @memberOf! ()
*
@@ -26316,63 +29925,99 @@ export namespace compute_v1 {
* compute.httpHealthChecks.update
* @desc Updates a HttpHealthCheck resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpHealthChecks.update({
* // Name of the HttpHealthCheck resource to update.
- * httpHealthCheck: 'my-http-health-check', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.httpHealthChecks.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpHealthChecks.update
* @memberOf! ()
*
@@ -26594,58 +30239,79 @@ export namespace compute_v1 {
* compute.httpsHealthChecks.delete
* @desc Deletes the specified HttpsHealthCheck resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.delete({
* // Name of the HttpsHealthCheck resource to delete.
- * httpsHealthCheck: 'my-https-health-check', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.httpsHealthChecks.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpsHealthChecks.delete
* @memberOf! ()
*
@@ -26723,58 +30389,64 @@ export namespace compute_v1 {
* compute.httpsHealthChecks.get
* @desc Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.get({
* // Name of the HttpsHealthCheck resource to return.
- * httpsHealthCheck: 'my-https-health-check', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.httpsHealthChecks.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpsHealthChecks.get
* @memberOf! ()
*
@@ -26851,59 +30523,97 @@ export namespace compute_v1 {
* compute.httpsHealthChecks.insert
* @desc Creates a HttpsHealthCheck resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.httpsHealthChecks.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpsHealthChecks.insert
* @memberOf! ()
*
@@ -26981,68 +30691,73 @@ export namespace compute_v1 {
* compute.httpsHealthChecks.list
* @desc Retrieves the list of HttpsHealthCheck resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.httpsHealthChecks.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.httpsHealthChecks.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpsHealthChecks.list
* @memberOf! ()
*
@@ -27124,63 +30839,99 @@ export namespace compute_v1 {
* compute.httpsHealthChecks.patch
* @desc Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.patch({
* // Name of the HttpsHealthCheck resource to patch.
- * httpsHealthCheck: 'my-https-health-check', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.httpsHealthChecks.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpsHealthChecks.patch
* @memberOf! ()
*
@@ -27259,63 +31010,99 @@ export namespace compute_v1 {
* compute.httpsHealthChecks.update
* @desc Updates a HttpsHealthCheck resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.httpsHealthChecks.update({
* // Name of the HttpsHealthCheck resource to update.
- * httpsHealthCheck: 'my-https-health-check', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "host": "my_host",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "port": 0,
+ * // "requestPath": "my_requestPath",
+ * // "selfLink": "my_selfLink",
+ * // "timeoutSec": 0,
+ * // "unhealthyThreshold": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.httpsHealthChecks.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.httpsHealthChecks.update
* @memberOf! ()
*
@@ -27537,58 +31324,79 @@ export namespace compute_v1 {
* compute.images.delete
* @desc Deletes the specified image.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.delete({
* // Name of the image resource to delete.
- * image: 'my-image', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.images.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * image: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.images.delete
* @memberOf! ()
*
@@ -27664,62 +31472,91 @@ export namespace compute_v1 {
* compute.images.deprecate
* @desc Sets the deprecation status of an image. If an empty request body is given, clears the deprecation status instead.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.deprecate({
* // Image name.
- * image: 'my-image', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * image: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deleted": "my_deleted",
+ * // "deprecated": "my_deprecated",
+ * // "obsolete": "my_obsolete",
+ * // "replacement": "my_replacement",
+ * // "state": "my_state"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.images.deprecate(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.images.deprecate
* @memberOf! ()
*
@@ -27797,58 +31634,81 @@ export namespace compute_v1 {
* compute.images.get
* @desc Returns the specified image. Gets a list of available images by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.get({
* // Name of the image resource to return.
- * image: 'my-image', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.images.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * image: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "archiveSizeBytes": "my_archiveSizeBytes",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "family": "my_family",
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "imageEncryptionKey": {},
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "rawDisk": {},
+ * // "selfLink": "my_selfLink",
+ * // "shieldedInstanceInitialState": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "sourceType": "my_sourceType",
+ * // "status": "my_status",
+ * // "storageLocations": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.images.get
* @memberOf! ()
*
@@ -27921,58 +31781,81 @@ export namespace compute_v1 {
* compute.images.getFromFamily
* @desc Returns the latest image that is part of an image family and is not deprecated.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.getFromFamily({
* // Name of the image family to search for.
- * family: 'my-family', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.images.getFromFamily(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * family: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "archiveSizeBytes": "my_archiveSizeBytes",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "family": "my_family",
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "imageEncryptionKey": {},
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "rawDisk": {},
+ * // "selfLink": "my_selfLink",
+ * // "shieldedInstanceInitialState": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "sourceType": "my_sourceType",
+ * // "status": "my_status",
+ * // "storageLocations": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.images.getFromFamily
* @memberOf! ()
*
@@ -28046,6 +31929,58 @@ export namespace compute_v1 {
/**
* compute.images.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.getIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.images.getIamPolicy
* @memberOf! ()
*
@@ -28120,59 +32055,119 @@ export namespace compute_v1 {
* compute.images.insert
* @desc Creates an image in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/devstorage.full_control',
+ * 'https://www.googleapis.com/auth/devstorage.read_only',
+ * 'https://www.googleapis.com/auth/devstorage.read_write',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.insert({
+ * // Force image creation if true.
+ * forceCreate: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "archiveSizeBytes": "my_archiveSizeBytes",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "family": "my_family",
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "imageEncryptionKey": {},
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "rawDisk": {},
+ * // "selfLink": "my_selfLink",
+ * // "shieldedInstanceInitialState": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "sourceType": "my_sourceType",
+ * // "status": "my_status",
+ * // "storageLocations": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.images.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.images.insert
* @memberOf! ()
*
@@ -28249,68 +32244,73 @@ export namespace compute_v1 {
* compute.images.list
* @desc Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.images.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.images.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.images.list
* @memberOf! ()
*
@@ -28387,6 +32387,67 @@ export namespace compute_v1 {
/**
* compute.images.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.images.setIamPolicy
* @memberOf! ()
*
@@ -28462,62 +32523,82 @@ export namespace compute_v1 {
* compute.images.setLabels
* @desc Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.setLabels({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.images.setLabels(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.images.setLabels
* @memberOf! ()
*
@@ -28593,6 +32674,61 @@ export namespace compute_v1 {
/**
* compute.images.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.images.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.images.testIamPermissions
* @memberOf! ()
*
@@ -28885,65 +33021,89 @@ export namespace compute_v1 {
* compute.instanceGroupManagers.abandonInstances
* @desc Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.abandonInstances({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.abandonInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.abandonInstances
* @memberOf! ()
*
@@ -29023,68 +33183,75 @@ export namespace compute_v1 {
* compute.instanceGroupManagers.aggregatedList
* @desc Retrieves the list of managed instance groups and groups them by zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instanceGroupManagers.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.instanceGroupManagers.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.aggregatedList
* @memberOf! ()
*
@@ -29173,6 +33340,86 @@ export namespace compute_v1 {
/**
* compute.instanceGroupManagers.applyUpdatesToInstances
* @desc Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.applyUpdatesToInstances({
+ * // The name of the managed instance group, should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the managed instance group is located. Should conform to RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": [],
+ * // "minimalAction": "my_minimalAction",
+ * // "mostDisruptiveAllowedAction": "my_mostDisruptiveAllowedAction"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.applyUpdatesToInstances
* @memberOf! ()
*
@@ -29252,6 +33499,90 @@ export namespace compute_v1 {
/**
* compute.instanceGroupManagers.createInstances
* @desc Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.createInstances({
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the managed instance group is located. It should conform to RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.createInstances
* @memberOf! ()
*
@@ -29331,61 +33662,81 @@ export namespace compute_v1 {
* compute.instanceGroupManagers.delete
* @desc Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.delete({
+ * // The name of the managed instance group to delete.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group to delete.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.delete
* @memberOf! ()
*
@@ -29464,65 +33815,89 @@ export namespace compute_v1 {
* compute.instanceGroupManagers.deleteInstances
* @desc Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.deleteInstances({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.deleteInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.deleteInstances
* @memberOf! ()
*
@@ -29602,61 +33977,74 @@ export namespace compute_v1 {
* compute.instanceGroupManagers.get
* @desc Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.get({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.get
* @memberOf! ()
*
@@ -29736,62 +34124,107 @@ export namespace compute_v1 {
* compute.instanceGroupManagers.insert
* @desc Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where you want to create the managed instance group.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.insert
* @memberOf! ()
*
@@ -29870,71 +34303,75 @@ export namespace compute_v1 {
* compute.instanceGroupManagers.list
* @desc Retrieves a list of managed instance groups that are contained within the specified project and zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instanceGroupManagers.list(request, handlePage);
- * }
- * };
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.instanceGroupManagers.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.list
* @memberOf! ()
*
@@ -30016,6 +34453,74 @@ export namespace compute_v1 {
/**
* compute.instanceGroupManagers.listErrors
* @desc Lists all errors thrown by actions on instances for a given managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.listErrors({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}.
+ * instanceGroupManager: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the managed instance group is located. It should conform to RFC1035.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.listErrors
* @memberOf! ()
*
@@ -30114,61 +34619,73 @@ export namespace compute_v1 {
* compute.instanceGroupManagers.listManagedInstances
* @desc Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.listManagedInstances({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * compute.instanceGroupManagers.listManagedInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "managedInstances": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.listManagedInstances
* @memberOf! ()
*
@@ -30273,6 +34790,110 @@ export namespace compute_v1 {
/**
* compute.instanceGroupManagers.patch
* @desc Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.patch({
+ * // The name of the instance group manager.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where you want to create the managed instance group.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceGroupManagers.patch
* @memberOf! ()
*
@@ -30352,65 +34973,89 @@ export namespace compute_v1 {
* compute.instanceGroupManagers.recreateInstances
* @desc Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.recreateInstances({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.recreateInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.recreateInstances
* @memberOf! ()
*
@@ -30490,66 +35135,83 @@ export namespace compute_v1 {
* compute.instanceGroupManagers.resize
* @desc Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including: + The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance. This list is subject to change. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.resize({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.
+ * size: 'placeholder-value',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * // The number of running instances that the managed instance group should maintain at any given time.
- * // The group automatically adds or removes instances to maintain the number of instances specified by
- * // this parameter.
- * size: 0, // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.resize(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.resize
* @memberOf! ()
*
@@ -30629,65 +35291,89 @@ export namespace compute_v1 {
* compute.instanceGroupManagers.setInstanceTemplate
* @desc Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.setInstanceTemplate({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instanceTemplate": "my_instanceTemplate"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.setInstanceTemplate(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.setInstanceTemplate
* @memberOf! ()
*
@@ -30767,65 +35453,90 @@ export namespace compute_v1 {
* compute.instanceGroupManagers.setTargetPools
* @desc Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroupManagers.setTargetPools({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the managed instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "targetPools": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroupManagers.setTargetPools(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroupManagers.setTargetPools
* @memberOf! ()
*
@@ -31374,65 +36085,89 @@ export namespace compute_v1 {
* compute.instanceGroups.addInstances
* @desc Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.addInstances({
+ * // The name of the instance group where you are adding instances.
+ * instanceGroup: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the instance group where you are adding instances.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroups.addInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.addInstances
* @memberOf! ()
*
@@ -31512,68 +36247,75 @@ export namespace compute_v1 {
* compute.instanceGroups.aggregatedList
* @desc Retrieves the list of instance groups and sorts them by zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instanceGroups.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.instanceGroups.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.aggregatedList
* @memberOf! ()
*
@@ -31661,61 +36403,81 @@ export namespace compute_v1 {
* compute.instanceGroups.delete
* @desc Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.delete({
+ * // The name of the instance group to delete.
+ * instanceGroup: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the instance group to delete.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroups.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.delete
* @memberOf! ()
*
@@ -31794,61 +36556,66 @@ export namespace compute_v1 {
* compute.instanceGroups.get
* @desc Returns the specified instance group. Gets a list of available instance groups by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.get({
+ * // The name of the instance group.
+ * instanceGroup: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone where the instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the instance group.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroups.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.get
* @memberOf! ()
*
@@ -31926,62 +36693,99 @@ export namespace compute_v1 {
* compute.instanceGroups.insert
* @desc Creates an instance group in the specified project using the parameters that are included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where you want to create the instance group.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroups.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.insert
* @memberOf! ()
*
@@ -32060,71 +36864,75 @@ export namespace compute_v1 {
* compute.instanceGroups.list
* @desc Retrieves the list of instance groups that are located in the specified project and zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone where the instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instanceGroups.list(request, handlePage);
- * }
- * };
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.instanceGroups.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.list
* @memberOf! ()
*
@@ -32205,78 +37013,85 @@ export namespace compute_v1 {
* compute.instanceGroups.listInstances
* @desc Lists the instances in the specified instance group.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.listInstances({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the instance group from which you want to generate a list of included instances.
+ * instanceGroup: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone where the instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the instance group from which you want to generate a list of included instances.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instanceState": "my_instanceState"
+ * // }
* },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instanceGroups.listInstances(request, handlePage);
- * }
- * };
- *
- * compute.instanceGroups.listInstances(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.listInstances
* @memberOf! ()
*
@@ -32366,65 +37181,89 @@ export namespace compute_v1 {
* compute.instanceGroups.removeInstances
* @desc Removes one or more instances from the specified instance group, but does not delete those instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.removeInstances({
+ * // The name of the instance group where the specified instances will be removed.
+ * instanceGroup: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the instance group where the specified instances will be removed.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroups.removeInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.removeInstances
* @memberOf! ()
*
@@ -32504,65 +37343,90 @@ export namespace compute_v1 {
* compute.instanceGroups.setNamedPorts
* @desc Sets the named ports for the specified instance group.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceGroups.setNamedPorts({
+ * // The name of the instance group where the named ports are updated.
+ * instanceGroup: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone where the instance group is located.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The name of the instance group where the named ports are updated.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "namedPorts": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceGroups.setNamedPorts(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceGroups.setNamedPorts
* @memberOf! ()
*
@@ -32911,68 +37775,97 @@ export namespace compute_v1 {
* compute.instances.addAccessConfig
* @desc Adds an access config to an instance's network interface.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.addAccessConfig({
* // The instance name for this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // The name of the network interface to add to this instance.
- * networkInterface: '', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * networkInterface: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "natIP": "my_natIP",
+ * // "networkTier": "my_networkTier",
+ * // "publicPtrDomainName": "my_publicPtrDomainName",
+ * // "setPublicPtr": false,
+ * // "type": "my_type"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.addAccessConfig(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.addAccessConfig
* @memberOf! ()
*
@@ -33052,6 +37945,90 @@ export namespace compute_v1 {
/**
* compute.instances.addResourcePolicies
* @desc Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.addResourcePolicies({
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.addResourcePolicies
* @memberOf! ()
*
@@ -33131,68 +38108,75 @@ export namespace compute_v1 {
* compute.instances.aggregatedList
* @desc Retrieves aggregated list of all of the instances in your project across all regions and zones.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instances.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.instances.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.aggregatedList
* @memberOf! ()
*
@@ -33276,65 +38260,105 @@ export namespace compute_v1 {
* compute.instances.attachDisk
* @desc Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.attachDisk({
+ * // Whether to force attach the disk even if it's currently attached to another instance.
+ * forceAttach: 'placeholder-value',
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The instance name for this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoDelete": false,
+ * // "boot": false,
+ * // "deviceName": "my_deviceName",
+ * // "diskEncryptionKey": {},
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "guestOsFeatures": [],
+ * // "index": 0,
+ * // "initializeParams": {},
+ * // "interface": "my_interface",
+ * // "kind": "my_kind",
+ * // "licenses": [],
+ * // "mode": "my_mode",
+ * // "shieldedInstanceInitialState": {},
+ * // "source": "my_source",
+ * // "type": "my_type"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.attachDisk(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.attachDisk
* @memberOf! ()
*
@@ -33415,61 +38439,81 @@ export namespace compute_v1 {
* compute.instances.delete
* @desc Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.delete({
+ * // Name of the instance resource to delete.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance resource to delete.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.delete
* @memberOf! ()
*
@@ -33547,67 +38591,85 @@ export namespace compute_v1 {
* compute.instances.deleteAccessConfig
* @desc Deletes an access config from an instance's network interface.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The instance name for this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.deleteAccessConfig({
* // The name of the access config to delete.
- * accessConfig: '', // TODO: Update placeholder value.
- *
+ * accessConfig: 'placeholder-value',
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // The name of the network interface.
- * networkInterface: '', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.deleteAccessConfig(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * networkInterface: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.deleteAccessConfig
* @memberOf! ()
*
@@ -33694,64 +38756,83 @@ export namespace compute_v1 {
* compute.instances.detachDisk
* @desc Detaches a disk from an instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.detachDisk({
+ * // The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.
+ * deviceName: 'placeholder-value',
+ * // Instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Instance name.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * // Disk device name to detach.
- * deviceName: '', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.detachDisk(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.detachDisk
* @memberOf! ()
*
@@ -33831,61 +38912,84 @@ export namespace compute_v1 {
* compute.instances.get
* @desc Returns the specified Instance resource. Gets a list of available instances by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.get({
+ * // Name of the instance resource to return.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance resource to return.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "canIpForward": false,
+ * // "cpuPlatform": "my_cpuPlatform",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deletionProtection": false,
+ * // "description": "my_description",
+ * // "disks": [],
+ * // "displayDevice": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "guestAccelerators": [],
+ * // "hostname": "my_hostname",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "machineType": "my_machineType",
+ * // "metadata": {},
+ * // "minCpuPlatform": "my_minCpuPlatform",
+ * // "name": "my_name",
+ * // "networkInterfaces": [],
+ * // "reservationAffinity": {},
+ * // "resourcePolicies": [],
+ * // "scheduling": {},
+ * // "selfLink": "my_selfLink",
+ * // "serviceAccounts": [],
+ * // "shieldedInstanceConfig": {},
+ * // "shieldedInstanceIntegrityPolicy": {},
+ * // "startRestricted": false,
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "tags": {},
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.get
* @memberOf! ()
*
@@ -33959,6 +39063,64 @@ export namespace compute_v1 {
/**
* compute.instances.getGuestAttributes
* @desc Returns the specified guest attributes entry.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getGuestAttributes({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Specifies the guest attributes path to be queried.
+ * queryPath: 'placeholder-value',
+ * // Specifies the key for the guest attributes entry.
+ * variableKey: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "queryPath": "my_queryPath",
+ * // "queryValue": {},
+ * // "selfLink": "my_selfLink",
+ * // "variableKey": "my_variableKey",
+ * // "variableValue": "my_variableValue"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.getGuestAttributes
* @memberOf! ()
*
@@ -34039,6 +39201,60 @@ export namespace compute_v1 {
/**
* compute.instances.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.getIamPolicy
* @memberOf! ()
*
@@ -34114,61 +39330,62 @@ export namespace compute_v1 {
* compute.instances.getSerialPortOutput
* @desc Returns the last 1 MB of serial port output from the specified instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getSerialPortOutput({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Specifies which COM or serial port to retrieve data from.
+ * port: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.
+ * start: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance scoping this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.getSerialPortOutput(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "contents": "my_contents",
+ * // "kind": "my_kind",
+ * // "next": "my_next",
+ * // "selfLink": "my_selfLink",
+ * // "start": "my_start"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.getSerialPortOutput
* @memberOf! ()
*
@@ -34249,6 +39466,57 @@ export namespace compute_v1 {
/**
* compute.instances.getShieldedInstanceIdentity
* @desc Returns the Shielded Instance Identity of an instance
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.getShieldedInstanceIdentity({
+ * // Name or id of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "encryptionKey": {},
+ * // "kind": "my_kind",
+ * // "signingKey": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.getShieldedInstanceIdentity
* @memberOf! ()
*
@@ -34330,62 +39598,124 @@ export namespace compute_v1 {
* compute.instances.insert
* @desc Creates an instance resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Specifies instance template to create the instance.
+ * //
+ * // This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
+ * // - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
+ * // - projects/project/global/instanceTemplates/instanceTemplate
+ * // - global/instanceTemplates/instanceTemplate
+ * sourceInstanceTemplate: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "canIpForward": false,
+ * // "cpuPlatform": "my_cpuPlatform",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deletionProtection": false,
+ * // "description": "my_description",
+ * // "disks": [],
+ * // "displayDevice": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "guestAccelerators": [],
+ * // "hostname": "my_hostname",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "machineType": "my_machineType",
+ * // "metadata": {},
+ * // "minCpuPlatform": "my_minCpuPlatform",
+ * // "name": "my_name",
+ * // "networkInterfaces": [],
+ * // "reservationAffinity": {},
+ * // "resourcePolicies": [],
+ * // "scheduling": {},
+ * // "selfLink": "my_selfLink",
+ * // "serviceAccounts": [],
+ * // "shieldedInstanceConfig": {},
+ * // "shieldedInstanceIntegrityPolicy": {},
+ * // "startRestricted": false,
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "tags": {},
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.insert
* @memberOf! ()
*
@@ -34463,71 +39793,75 @@ export namespace compute_v1 {
* compute.instances.list
* @desc Retrieves the list of instances contained within the specified zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instances.list(request, handlePage);
- * }
- * };
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.instances.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.list
* @memberOf! ()
*
@@ -34605,6 +39939,78 @@ export namespace compute_v1 {
/**
* compute.instances.listReferrers
* @desc Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.listReferrers({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.
+ * instance: '-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.listReferrers
* @memberOf! ()
*
@@ -34689,6 +40095,90 @@ export namespace compute_v1 {
/**
* compute.instances.removeResourcePolicies
* @desc Removes resource policies from an instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.removeResourcePolicies({
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.removeResourcePolicies
* @memberOf! ()
*
@@ -34770,61 +40260,81 @@ export namespace compute_v1 {
* compute.instances.reset
* @desc Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.reset({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance scoping this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.reset(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.reset
* @memberOf! ()
*
@@ -34902,61 +40412,83 @@ export namespace compute_v1 {
* compute.instances.setDeletionProtection
* @desc Sets deletion protection on the instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setDeletionProtection({
+ * // Whether the resource should be protected against deletion.
+ * deletionProtection: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setDeletionProtection(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setDeletionProtection
* @memberOf! ()
*
@@ -35038,67 +40570,85 @@ export namespace compute_v1 {
* compute.instances.setDiskAutoDelete
* @desc Sets the auto-delete flag for a disk attached to an instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setDiskAutoDelete({
+ * // Whether to auto-delete the disk when the instance is deleted.
+ * autoDelete: 'placeholder-value',
+ * // The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.
+ * deviceName: 'w[w.-]{0,254}',
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // The instance name.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * // Whether to auto-delete the disk when the instance is deleted.
- * autoDelete: false, // TODO: Update placeholder value.
- *
- * // The device name of the disk to modify.
- * deviceName: '', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setDiskAutoDelete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setDiskAutoDelete
* @memberOf! ()
*
@@ -35184,6 +40734,69 @@ export namespace compute_v1 {
/**
* compute.instances.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setIamPolicy
* @memberOf! ()
*
@@ -35260,65 +40873,90 @@ export namespace compute_v1 {
* compute.instances.setLabels
* @desc Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setLabels({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance scoping this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setLabels(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setLabels
* @memberOf! ()
*
@@ -35398,65 +41036,89 @@ export namespace compute_v1 {
* compute.instances.setMachineResources
* @desc Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setMachineResources({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance scoping this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "guestAccelerators": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setMachineResources(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setMachineResources
* @memberOf! ()
*
@@ -35536,65 +41198,89 @@ export namespace compute_v1 {
* compute.instances.setMachineType
* @desc Changes the machine type for a stopped instance to the machine type specified in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setMachineType({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance scoping this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "machineType": "my_machineType"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setMachineType(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setMachineType
* @memberOf! ()
*
@@ -35674,65 +41360,91 @@ export namespace compute_v1 {
* compute.instances.setMetadata
* @desc Sets metadata for the specified instance to the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setMetadata({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance scoping this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setMetadata(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setMetadata
* @memberOf! ()
*
@@ -35812,65 +41524,89 @@ export namespace compute_v1 {
* compute.instances.setMinCpuPlatform
* @desc Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setMinCpuPlatform({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance scoping this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "minCpuPlatform": "my_minCpuPlatform"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setMinCpuPlatform(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setMinCpuPlatform
* @memberOf! ()
*
@@ -35950,65 +41686,92 @@ export namespace compute_v1 {
* compute.instances.setScheduling
* @desc Sets an instance's scheduling options.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setScheduling({
+ * // Instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Instance name.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "automaticRestart": false,
+ * // "nodeAffinities": [],
+ * // "onHostMaintenance": "my_onHostMaintenance",
+ * // "preemptible": false
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setScheduling(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setScheduling
* @memberOf! ()
*
@@ -36088,65 +41851,90 @@ export namespace compute_v1 {
* compute.instances.setServiceAccount
* @desc Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setServiceAccount({
+ * // Name of the instance resource to start.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance resource to start.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "email": "my_email",
+ * // "scopes": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setServiceAccount(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setServiceAccount
* @memberOf! ()
*
@@ -36225,6 +42013,90 @@ export namespace compute_v1 {
/**
* compute.instances.setShieldedInstanceIntegrityPolicy
* @desc Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setShieldedInstanceIntegrityPolicy({
+ * // Name or id of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "updateAutoLearnPolicy": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.setShieldedInstanceIntegrityPolicy
* @memberOf! ()
*
@@ -36306,65 +42178,90 @@ export namespace compute_v1 {
* compute.instances.setTags
* @desc Sets network tags for the specified instance to the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.setTags({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance scoping this request.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "items": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.setTags(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.setTags
* @memberOf! ()
*
@@ -36443,6 +42340,76 @@ export namespace compute_v1 {
/**
* compute.instances.simulateMaintenanceEvent
* @desc Simulates a maintenance event on the instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.simulateMaintenanceEvent({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.simulateMaintenanceEvent
* @memberOf! ()
*
@@ -36522,61 +42489,81 @@ export namespace compute_v1 {
* compute.instances.start
* @desc Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.start({
+ * // Name of the instance resource to start.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance resource to start.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.start(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.start
* @memberOf! ()
*
@@ -36654,65 +42641,89 @@ export namespace compute_v1 {
* compute.instances.startWithEncryptionKey
* @desc Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.startWithEncryptionKey({
+ * // Name of the instance resource to start.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance resource to start.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "disks": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instances.startWithEncryptionKey(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.startWithEncryptionKey
* @memberOf! ()
*
@@ -36794,61 +42805,81 @@ export namespace compute_v1 {
* compute.instances.stop
* @desc Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.stop({
+ * // Name of the instance resource to stop.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the instance resource to stop.
- * instance: 'my-instance', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instances.stop(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instances.stop
* @memberOf! ()
*
@@ -36925,6 +42956,63 @@ export namespace compute_v1 {
/**
* compute.instances.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.testIamPermissions
* @memberOf! ()
*
@@ -37006,6 +43094,124 @@ export namespace compute_v1 {
/**
* compute.instances.update
* @desc Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.update({
+ * // Name of the instance resource to update.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Specifies the action to take when updating an instance even if the updated properties do not require it. If not specified, then Compute Engine acts based on the minimum action that the updated properties require.
+ * minimalAction: 'placeholder-value',
+ * // Specifies the most disruptive action that can be taken on the instance as part of the update. Compute Engine returns an error if the instance properties require a more disruptive action as part of the instance update. Valid options from lowest to highest are NO_EFFECT, REFRESH, and RESTART.
+ * mostDisruptiveAllowedAction: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "canIpForward": false,
+ * // "cpuPlatform": "my_cpuPlatform",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deletionProtection": false,
+ * // "description": "my_description",
+ * // "disks": [],
+ * // "displayDevice": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "guestAccelerators": [],
+ * // "hostname": "my_hostname",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "machineType": "my_machineType",
+ * // "metadata": {},
+ * // "minCpuPlatform": "my_minCpuPlatform",
+ * // "name": "my_name",
+ * // "networkInterfaces": [],
+ * // "reservationAffinity": {},
+ * // "resourcePolicies": [],
+ * // "scheduling": {},
+ * // "selfLink": "my_selfLink",
+ * // "serviceAccounts": [],
+ * // "shieldedInstanceConfig": {},
+ * // "shieldedInstanceIntegrityPolicy": {},
+ * // "startRestricted": false,
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "tags": {},
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.update
* @memberOf! ()
*
@@ -37085,6 +43291,98 @@ export namespace compute_v1 {
/**
* compute.instances.updateAccessConfig
* @desc Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.updateAccessConfig({
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the network interface where the access config is attached.
+ * networkInterface: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "natIP": "my_natIP",
+ * // "networkTier": "my_networkTier",
+ * // "publicPtrDomainName": "my_publicPtrDomainName",
+ * // "setPublicPtr": false,
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.updateAccessConfig
* @memberOf! ()
*
@@ -37164,6 +43462,90 @@ export namespace compute_v1 {
/**
* compute.instances.updateDisplayDevice
* @desc Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.updateDisplayDevice({
+ * // Name of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "enableDisplay": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.updateDisplayDevice
* @memberOf! ()
*
@@ -37242,6 +43624,99 @@ export namespace compute_v1 {
/**
* compute.instances.updateNetworkInterface
* @desc Updates an instance's network interface. This method follows PATCH semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.updateNetworkInterface({
+ * // The instance name for this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the network interface to update.
+ * networkInterface: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accessConfigs": [],
+ * // "aliasIpRanges": [],
+ * // "fingerprint": "my_fingerprint",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkIP": "my_networkIP",
+ * // "subnetwork": "my_subnetwork"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.updateNetworkInterface
* @memberOf! ()
*
@@ -37323,6 +43798,92 @@ export namespace compute_v1 {
/**
* compute.instances.updateShieldedInstanceConfig
* @desc Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instances.updateShieldedInstanceConfig({
+ * // Name or id of the instance scoping this request.
+ * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "enableIntegrityMonitoring": false,
+ * // "enableSecureBoot": false,
+ * // "enableVtpm": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instances.updateShieldedInstanceConfig
* @memberOf! ()
*
@@ -38510,58 +45071,79 @@ export namespace compute_v1 {
* compute.instanceTemplates.delete
* @desc Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.delete({
* // The name of the instance template to delete.
- * instanceTemplate: 'my-instance-template', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instanceTemplates.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * instanceTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceTemplates.delete
* @memberOf! ()
*
@@ -38639,58 +45221,60 @@ export namespace compute_v1 {
* compute.instanceTemplates.get
* @desc Returns the specified instance template. Gets a list of available instance templates by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.get({
* // The name of the instance template.
- * instanceTemplate: 'my-instance-template', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.instanceTemplates.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * instanceTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "properties": {},
+ * // "selfLink": "my_selfLink",
+ * // "sourceInstance": "my_sourceInstance",
+ * // "sourceInstanceParams": {}
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceTemplates.get
* @memberOf! ()
*
@@ -38766,6 +45350,58 @@ export namespace compute_v1 {
/**
* compute.instanceTemplates.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.getIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceTemplates.getIamPolicy
* @memberOf! ()
*
@@ -38840,59 +45476,93 @@ export namespace compute_v1 {
* compute.instanceTemplates.insert
* @desc Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "properties": {},
+ * // "selfLink": "my_selfLink",
+ * // "sourceInstance": "my_sourceInstance",
+ * // "sourceInstanceParams": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.instanceTemplates.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceTemplates.insert
* @memberOf! ()
*
@@ -38970,68 +45640,73 @@ export namespace compute_v1 {
* compute.instanceTemplates.list
* @desc Retrieves a list of instance templates that are contained within the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.instanceTemplates.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.instanceTemplates.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.instanceTemplates.list
* @memberOf! ()
*
@@ -39112,6 +45787,67 @@ export namespace compute_v1 {
/**
* compute.instanceTemplates.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceTemplates.setIamPolicy
* @memberOf! ()
*
@@ -39186,6 +45922,61 @@ export namespace compute_v1 {
/**
* compute.instanceTemplates.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.instanceTemplates.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.instanceTemplates.testIamPermissions
* @memberOf! ()
*
@@ -39418,68 +46209,75 @@ export namespace compute_v1 {
* compute.interconnectAttachments.aggregatedList
* @desc Retrieves an aggregated list of interconnect attachments.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.interconnectAttachments.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.interconnectAttachments.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnectAttachments.aggregatedList
* @memberOf! ()
*
@@ -39577,61 +46375,82 @@ export namespace compute_v1 {
* compute.interconnectAttachments.delete
* @desc Deletes the specified interconnect attachment.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.delete({
+ * // Name of the interconnect attachment to delete.
+ * interconnectAttachment:
+ * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the interconnect attachment to delete.
- * interconnectAttachment: 'my-interconnect-attachment', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.interconnectAttachments.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnectAttachments.delete
* @memberOf! ()
*
@@ -39710,61 +46529,78 @@ export namespace compute_v1 {
* compute.interconnectAttachments.get
* @desc Returns the specified interconnect attachment.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.get({
+ * // Name of the interconnect attachment to return.
+ * interconnectAttachment:
+ * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the interconnect attachment to return.
- * interconnectAttachment: 'my-interconnect-attachment', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.interconnectAttachments.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adminEnabled": false,
+ * // "bandwidth": "my_bandwidth",
+ * // "candidateSubnets": [],
+ * // "cloudRouterIpAddress": "my_cloudRouterIpAddress",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerRouterIpAddress": "my_customerRouterIpAddress",
+ * // "description": "my_description",
+ * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnect": "my_interconnect",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "pairingKey": "my_pairingKey",
+ * // "partnerAsn": "my_partnerAsn",
+ * // "partnerMetadata": {},
+ * // "privateInterconnectInfo": {},
+ * // "region": "my_region",
+ * // "router": "my_router",
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state",
+ * // "type": "my_type",
+ * // "vlanTag8021q": 0
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnectAttachments.get
* @memberOf! ()
*
@@ -39844,62 +46680,112 @@ export namespace compute_v1 {
* compute.interconnectAttachments.insert
* @desc Creates an InterconnectAttachment in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // If true, the request will not be committed.
+ * validateOnly: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adminEnabled": false,
+ * // "bandwidth": "my_bandwidth",
+ * // "candidateSubnets": [],
+ * // "cloudRouterIpAddress": "my_cloudRouterIpAddress",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerRouterIpAddress": "my_customerRouterIpAddress",
+ * // "description": "my_description",
+ * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnect": "my_interconnect",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "pairingKey": "my_pairingKey",
+ * // "partnerAsn": "my_partnerAsn",
+ * // "partnerMetadata": {},
+ * // "privateInterconnectInfo": {},
+ * // "region": "my_region",
+ * // "router": "my_router",
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state",
+ * // "type": "my_type",
+ * // "vlanTag8021q": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.interconnectAttachments.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnectAttachments.insert
* @memberOf! ()
*
@@ -39979,71 +46865,75 @@ export namespace compute_v1 {
* compute.interconnectAttachments.list
* @desc Retrieves the list of interconnect attachments contained within the specified region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.interconnectAttachments.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.interconnectAttachments.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnectAttachments.list
* @memberOf! ()
*
@@ -40130,6 +47020,114 @@ export namespace compute_v1 {
/**
* compute.interconnectAttachments.patch
* @desc Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectAttachments.patch({
+ * // Name of the interconnect attachment to patch.
+ * interconnectAttachment:
+ * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adminEnabled": false,
+ * // "bandwidth": "my_bandwidth",
+ * // "candidateSubnets": [],
+ * // "cloudRouterIpAddress": "my_cloudRouterIpAddress",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerRouterIpAddress": "my_customerRouterIpAddress",
+ * // "description": "my_description",
+ * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnect": "my_interconnect",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "pairingKey": "my_pairingKey",
+ * // "partnerAsn": "my_partnerAsn",
+ * // "partnerMetadata": {},
+ * // "privateInterconnectInfo": {},
+ * // "region": "my_region",
+ * // "router": "my_router",
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state",
+ * // "type": "my_type",
+ * // "vlanTag8021q": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnectAttachments.patch
* @memberOf! ()
*
@@ -40383,58 +47381,66 @@ export namespace compute_v1 {
* compute.interconnectLocations.get
* @desc Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectLocations.get({
* // Name of the interconnect location to return.
- * interconnectLocation: 'my-interconnect-location', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.interconnectLocations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * interconnectLocation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": "my_address",
+ * // "availabilityZone": "my_availabilityZone",
+ * // "city": "my_city",
+ * // "continent": "my_continent",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "facilityProvider": "my_facilityProvider",
+ * // "facilityProviderFacilityId": "my_facilityProviderFacilityId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "peeringdbFacilityId": "my_peeringdbFacilityId",
+ * // "regionInfos": [],
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnectLocations.get
* @memberOf! ()
*
@@ -40513,68 +47519,73 @@ export namespace compute_v1 {
* compute.interconnectLocations.list
* @desc Retrieves the list of interconnect locations available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnectLocations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.interconnectLocations.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.interconnectLocations.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnectLocations.list
* @memberOf! ()
*
@@ -40708,58 +47719,79 @@ export namespace compute_v1 {
* compute.interconnects.delete
* @desc Deletes the specified interconnect.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.delete({
* // Name of the interconnect to delete.
- * interconnect: 'my-interconnect', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.interconnects.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnects.delete
* @memberOf! ()
*
@@ -40837,58 +47869,73 @@ export namespace compute_v1 {
* compute.interconnects.get
* @desc Returns the specified interconnect. Get a list of available interconnects by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.get({
* // Name of the interconnect to return.
- * interconnect: 'my-interconnect', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.interconnects.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adminEnabled": false,
+ * // "circuitInfos": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerName": "my_customerName",
+ * // "description": "my_description",
+ * // "expectedOutages": [],
+ * // "googleIpAddress": "my_googleIpAddress",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnectAttachments": [],
+ * // "interconnectType": "my_interconnectType",
+ * // "kind": "my_kind",
+ * // "linkType": "my_linkType",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nocContactEmail": "my_nocContactEmail",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "peerIpAddress": "my_peerIpAddress",
+ * // "provisionedLinkCount": 0,
+ * // "requestedLinkCount": 0,
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnects.get
* @memberOf! ()
*
@@ -40964,6 +48011,53 @@ export namespace compute_v1 {
/**
* compute.interconnects.getDiagnostics
* @desc Returns the interconnectDiagnostics for the specified interconnect.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.getDiagnostics({
+ * // Name of the interconnect resource to query.
+ * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "result": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.interconnects.getDiagnostics
* @memberOf! ()
*
@@ -41051,59 +48145,106 @@ export namespace compute_v1 {
* compute.interconnects.insert
* @desc Creates a Interconnect in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adminEnabled": false,
+ * // "circuitInfos": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerName": "my_customerName",
+ * // "description": "my_description",
+ * // "expectedOutages": [],
+ * // "googleIpAddress": "my_googleIpAddress",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnectAttachments": [],
+ * // "interconnectType": "my_interconnectType",
+ * // "kind": "my_kind",
+ * // "linkType": "my_linkType",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nocContactEmail": "my_nocContactEmail",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "peerIpAddress": "my_peerIpAddress",
+ * // "provisionedLinkCount": 0,
+ * // "requestedLinkCount": 0,
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.interconnects.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnects.insert
* @memberOf! ()
*
@@ -41180,68 +48321,73 @@ export namespace compute_v1 {
* compute.interconnects.list
* @desc Retrieves the list of interconnect available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.interconnects.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.interconnects.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnects.list
* @memberOf! ()
*
@@ -41320,63 +48466,108 @@ export namespace compute_v1 {
* compute.interconnects.patch
* @desc Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.interconnects.patch({
* // Name of the interconnect to update.
- * interconnect: 'my-interconnect', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adminEnabled": false,
+ * // "circuitInfos": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customerName": "my_customerName",
+ * // "description": "my_description",
+ * // "expectedOutages": [],
+ * // "googleIpAddress": "my_googleIpAddress",
+ * // "googleReferenceId": "my_googleReferenceId",
+ * // "id": "my_id",
+ * // "interconnectAttachments": [],
+ * // "interconnectType": "my_interconnectType",
+ * // "kind": "my_kind",
+ * // "linkType": "my_linkType",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nocContactEmail": "my_nocContactEmail",
+ * // "operationalStatus": "my_operationalStatus",
+ * // "peerIpAddress": "my_peerIpAddress",
+ * // "provisionedLinkCount": 0,
+ * // "requestedLinkCount": 0,
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.interconnects.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.interconnects.patch
* @memberOf! ()
*
@@ -41588,6 +48779,61 @@ export namespace compute_v1 {
/**
* compute.licenseCodes.get
* @desc Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenseCodes.get({
+ * // Number corresponding to the License code resource to return.
+ * licenseCode: '[0-9]{0,61}?',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "licenseAlias": [],
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state",
+ * // "transferable": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenseCodes.get
* @memberOf! ()
*
@@ -41662,6 +48908,61 @@ export namespace compute_v1 {
/**
* compute.licenseCodes.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenseCodes.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenseCodes.testIamPermissions
* @memberOf! ()
*
@@ -41786,6 +49087,80 @@ export namespace compute_v1 {
/**
* compute.licenses.delete
* @desc Deletes the specified license. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.delete({
+ * // Name of the license resource to delete.
+ * license: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.delete
* @memberOf! ()
*
@@ -41862,58 +49237,61 @@ export namespace compute_v1 {
* compute.licenses.get
* @desc Returns the specified License resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.get({
* // Name of the License resource to return.
- * license: 'my-license', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.licenses.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * license: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "chargesUseFee": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "licenseCode": "my_licenseCode",
+ * // "name": "my_name",
+ * // "resourceRequirements": {},
+ * // "selfLink": "my_selfLink",
+ * // "transferable": false
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.licenses.get
* @memberOf! ()
*
@@ -41986,6 +49364,58 @@ export namespace compute_v1 {
/**
* compute.licenses.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.getIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.getIamPolicy
* @memberOf! ()
*
@@ -42059,6 +49489,98 @@ export namespace compute_v1 {
/**
* compute.licenses.insert
* @desc Create a License resource in the specified project. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/devstorage.full_control',
+ * 'https://www.googleapis.com/auth/devstorage.read_only',
+ * 'https://www.googleapis.com/auth/devstorage.read_write',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "chargesUseFee": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "licenseCode": "my_licenseCode",
+ * // "name": "my_name",
+ * // "resourceRequirements": {},
+ * // "selfLink": "my_selfLink",
+ * // "transferable": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.insert
* @memberOf! ()
*
@@ -42133,6 +49655,73 @@ export namespace compute_v1 {
/**
* compute.licenses.list
* @desc Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.list
* @memberOf! ()
*
@@ -42211,6 +49800,67 @@ export namespace compute_v1 {
/**
* compute.licenses.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.setIamPolicy
* @memberOf! ()
*
@@ -42285,6 +49935,61 @@ export namespace compute_v1 {
/**
* compute.licenses.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.licenses.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.licenses.testIamPermissions
* @memberOf! ()
*
@@ -42513,68 +50218,75 @@ export namespace compute_v1 {
* compute.machineTypes.aggregatedList
* @desc Retrieves an aggregated list of machine types.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineTypes.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.machineTypes.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.machineTypes.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.machineTypes.aggregatedList
* @memberOf! ()
*
@@ -42661,61 +50373,68 @@ export namespace compute_v1 {
* compute.machineTypes.get
* @desc Returns the specified machine type. Gets a list of available machine types by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineTypes.get({
+ * // Name of the machine type to return.
+ * machineType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the machine type to return.
- * machineType: 'my-machine-type', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.machineTypes.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "guestCpus": 0,
+ * // "id": "my_id",
+ * // "imageSpaceGb": 0,
+ * // "isSharedCpu": false,
+ * // "kind": "my_kind",
+ * // "maximumPersistentDisks": 0,
+ * // "maximumPersistentDisksSizeGb": "my_maximumPersistentDisksSizeGb",
+ * // "memoryMb": 0,
+ * // "name": "my_name",
+ * // "scratchDisks": [],
+ * // "selfLink": "my_selfLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.machineTypes.get
* @memberOf! ()
*
@@ -42792,71 +50511,75 @@ export namespace compute_v1 {
* compute.machineTypes.list
* @desc Retrieves a list of machine types available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.machineTypes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.machineTypes.list(request, handlePage);
- * }
- * };
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.machineTypes.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.machineTypes.list
* @memberOf! ()
*
@@ -43027,6 +50750,76 @@ export namespace compute_v1 {
/**
* compute.networkEndpointGroups.aggregatedList
* @desc Retrieves the list of network endpoint groups and sorts them by zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.aggregatedList
* @memberOf! ()
*
@@ -43115,6 +50908,90 @@ export namespace compute_v1 {
/**
* compute.networkEndpointGroups.attachNetworkEndpoints
* @desc Attach a list of network endpoints to the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.attachNetworkEndpoints({
+ * // The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkEndpoints": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.attachNetworkEndpoints
* @memberOf! ()
*
@@ -43195,6 +51072,82 @@ export namespace compute_v1 {
/**
* compute.networkEndpointGroups.delete
* @desc Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.delete({
+ * // The name of the network endpoint group to delete. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.delete
* @memberOf! ()
*
@@ -43272,6 +51225,90 @@ export namespace compute_v1 {
/**
* compute.networkEndpointGroups.detachNetworkEndpoints
* @desc Detach a list of network endpoints from the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.detachNetworkEndpoints({
+ * // The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkEndpoints": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.detachNetworkEndpoints
* @memberOf! ()
*
@@ -43352,6 +51389,66 @@ export namespace compute_v1 {
/**
* compute.networkEndpointGroups.get
* @desc Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.get({
+ * // The name of the network endpoint group. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultPort": 0,
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkEndpointType": "my_networkEndpointType",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.get
* @memberOf! ()
*
@@ -43430,6 +51527,99 @@ export namespace compute_v1 {
/**
* compute.networkEndpointGroups.insert
* @desc Creates a network endpoint group in the specified project using the parameters that are included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone where you want to create the network endpoint group. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultPort": 0,
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkEndpointType": "my_networkEndpointType",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.insert
* @memberOf! ()
*
@@ -43507,6 +51697,76 @@ export namespace compute_v1 {
/**
* compute.networkEndpointGroups.list
* @desc Retrieves the list of network endpoint groups that are located in the specified project and zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.list
* @memberOf! ()
*
@@ -43588,6 +51848,85 @@ export namespace compute_v1 {
/**
* compute.networkEndpointGroups.listNetworkEndpoints
* @desc Lists the network endpoints in the specified network endpoint group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.listNetworkEndpoints({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035.
+ * networkEndpointGroup: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone where the network endpoint group is located. It should comply with RFC1035.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "healthStatus": "my_healthStatus"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.listNetworkEndpoints
* @memberOf! ()
*
@@ -43692,6 +52031,63 @@ export namespace compute_v1 {
/**
* compute.networkEndpointGroups.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networkEndpointGroups.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networkEndpointGroups.testIamPermissions
* @memberOf! ()
*
@@ -44039,62 +52435,90 @@ export namespace compute_v1 {
* compute.networks.addPeering
* @desc Adds a peering to the specified network.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.addPeering({
* // Name of the network resource to add peering to.
- * network: 'my-network', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoCreateRoutes": false,
+ * // "name": "my_name",
+ * // "networkPeering": {},
+ * // "peerNetwork": "my_peerNetwork"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.networks.addPeering(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.networks.addPeering
* @memberOf! ()
*
@@ -44173,58 +52597,79 @@ export namespace compute_v1 {
* compute.networks.delete
* @desc Deletes the specified network.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.delete({
* // Name of the network to delete.
- * network: 'my-network', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.networks.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.networks.delete
* @memberOf! ()
*
@@ -44301,58 +52746,63 @@ export namespace compute_v1 {
* compute.networks.get
* @desc Returns the specified network. Gets a list of available networks by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.get({
* // Name of the network to return.
- * network: 'my-network', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.networks.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "IPv4Range": "my_IPv4Range",
+ * // "autoCreateSubnetworks": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "gatewayIPv4": "my_gatewayIPv4",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "peerings": [],
+ * // "routingConfig": {},
+ * // "selfLink": "my_selfLink",
+ * // "subnetworks": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.networks.get
* @memberOf! ()
*
@@ -44426,59 +52876,96 @@ export namespace compute_v1 {
* compute.networks.insert
* @desc Creates a network in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPv4Range": "my_IPv4Range",
+ * // "autoCreateSubnetworks": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "gatewayIPv4": "my_gatewayIPv4",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "peerings": [],
+ * // "routingConfig": {},
+ * // "selfLink": "my_selfLink",
+ * // "subnetworks": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.networks.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.networks.insert
* @memberOf! ()
*
@@ -44554,68 +53041,73 @@ export namespace compute_v1 {
* compute.networks.list
* @desc Retrieves the list of networks available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.networks.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.networks.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.networks.list
* @memberOf! ()
*
@@ -44692,6 +53184,82 @@ export namespace compute_v1 {
/**
* compute.networks.listPeeringRoutes
* @desc Lists the peering routes exchanged over peering connection.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.listPeeringRoutes({
+ * // The direction of the exchanged routes.
+ * direction: 'placeholder-value',
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Name of the network for this request.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The response will show routes exchanged over the given peering connection.
+ * peeringName: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region of the request. The response will include all subnet routes, static routes and dynamic routes in the region.
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.listPeeringRoutes
* @memberOf! ()
*
@@ -44782,63 +53350,98 @@ export namespace compute_v1 {
* compute.networks.patch
* @desc Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.patch({
* // Name of the network to update.
- * network: 'my-network', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "IPv4Range": "my_IPv4Range",
+ * // "autoCreateSubnetworks": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "gatewayIPv4": "my_gatewayIPv4",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "peerings": [],
+ * // "routingConfig": {},
+ * // "selfLink": "my_selfLink",
+ * // "subnetworks": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.networks.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.networks.patch
* @memberOf! ()
*
@@ -44916,62 +53519,87 @@ export namespace compute_v1 {
* compute.networks.removePeering
* @desc Removes a peering from the specified network.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.removePeering({
* // Name of the network resource to remove peering from.
- * network: 'my-network', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "name": "my_name"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.networks.removePeering(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.networks.removePeering
* @memberOf! ()
*
@@ -45050,58 +53678,79 @@ export namespace compute_v1 {
* compute.networks.switchToCustomMode
* @desc Switches the network mode from auto subnet mode to custom subnet mode.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.switchToCustomMode({
* // Name of the network to be updated.
- * network: 'my-network', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.networks.switchToCustomMode(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.networks.switchToCustomMode
* @memberOf! ()
*
@@ -45178,6 +53827,88 @@ export namespace compute_v1 {
/**
* compute.networks.updatePeering
* @desc Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.networks.updatePeering({
+ * // Name of the network resource which the updated peering is belonging to.
+ * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkPeering": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.networks.updatePeering
* @memberOf! ()
*
@@ -45507,6 +54238,90 @@ export namespace compute_v1 {
/**
* compute.nodeGroups.addNodes
* @desc Adds specified number of nodes to the node group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.addNodes({
+ * // Name of the NodeGroup resource.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "additionalNodeCount": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.addNodes
* @memberOf! ()
*
@@ -45585,6 +54400,76 @@ export namespace compute_v1 {
/**
* compute.nodeGroups.aggregatedList
* @desc Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.aggregatedList
* @memberOf! ()
*
@@ -45667,6 +54552,82 @@ export namespace compute_v1 {
/**
* compute.nodeGroups.delete
* @desc Deletes the specified NodeGroup resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.delete({
+ * // Name of the NodeGroup resource to delete.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.delete
* @memberOf! ()
*
@@ -45744,6 +54705,90 @@ export namespace compute_v1 {
/**
* compute.nodeGroups.deleteNodes
* @desc Deletes specified nodes from the node group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.deleteNodes({
+ * // Name of the NodeGroup resource whose nodes will be deleted.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "nodes": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.deleteNodes
* @memberOf! ()
*
@@ -45822,6 +54867,67 @@ export namespace compute_v1 {
/**
* compute.nodeGroups.get
* @desc Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the "nodes" field should not be used. Use nodeGroups.listNodes instead.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.get({
+ * // Name of the node group to return.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "maintenancePolicy": "my_maintenancePolicy",
+ * // "name": "my_name",
+ * // "nodeTemplate": "my_nodeTemplate",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.get
* @memberOf! ()
*
@@ -45897,6 +55003,60 @@ export namespace compute_v1 {
/**
* compute.nodeGroups.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.getIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.getIamPolicy
* @memberOf! ()
*
@@ -45971,6 +55131,102 @@ export namespace compute_v1 {
/**
* compute.nodeGroups.insert
* @desc Creates a NodeGroup resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.insert({
+ * // Initial count of nodes in the node group.
+ * initialNodeCount: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "maintenancePolicy": "my_maintenancePolicy",
+ * // "name": "my_name",
+ * // "nodeTemplate": "my_nodeTemplate",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.insert
* @memberOf! ()
*
@@ -46048,6 +55304,76 @@ export namespace compute_v1 {
/**
* compute.nodeGroups.list
* @desc Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.list
* @memberOf! ()
*
@@ -46125,6 +55451,78 @@ export namespace compute_v1 {
/**
* compute.nodeGroups.listNodes
* @desc Lists nodes in the node group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.listNodes({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Name of the NodeGroup resource whose nodes you want to list.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.listNodes
* @memberOf! ()
*
@@ -46205,6 +55603,102 @@ export namespace compute_v1 {
/**
* compute.nodeGroups.patch
* @desc Updates the specified node group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.patch({
+ * // Name of the NodeGroup resource to update.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "maintenancePolicy": "my_maintenancePolicy",
+ * // "name": "my_name",
+ * // "nodeTemplate": "my_nodeTemplate",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.patch
* @memberOf! ()
*
@@ -46282,6 +55776,69 @@ export namespace compute_v1 {
/**
* compute.nodeGroups.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.setIamPolicy
* @memberOf! ()
*
@@ -46357,6 +55914,90 @@ export namespace compute_v1 {
/**
* compute.nodeGroups.setNodeTemplate
* @desc Updates the node template of the node group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.setNodeTemplate({
+ * // Name of the NodeGroup resource to update.
+ * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "nodeTemplate": "my_nodeTemplate"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.setNodeTemplate
* @memberOf! ()
*
@@ -46435,6 +56076,63 @@ export namespace compute_v1 {
/**
* compute.nodeGroups.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeGroups.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeGroups.testIamPermissions
* @memberOf! ()
*
@@ -46880,6 +56578,76 @@ export namespace compute_v1 {
/**
* compute.nodeTemplates.aggregatedList
* @desc Retrieves an aggregated list of node templates.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.aggregatedList
* @memberOf! ()
*
@@ -46966,6 +56734,82 @@ export namespace compute_v1 {
/**
* compute.nodeTemplates.delete
* @desc Deletes the specified NodeTemplate resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.delete({
+ * // Name of the NodeTemplate resource to delete.
+ * nodeTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.delete
* @memberOf! ()
*
@@ -47043,6 +56887,67 @@ export namespace compute_v1 {
/**
* compute.nodeTemplates.get
* @desc Returns the specified node template. Gets a list of available node templates by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.get({
+ * // Name of the node template to return.
+ * nodeTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nodeAffinityLabels": {},
+ * // "nodeType": "my_nodeType",
+ * // "nodeTypeFlexibility": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serverBinding": {},
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.get
* @memberOf! ()
*
@@ -47119,6 +57024,60 @@ export namespace compute_v1 {
/**
* compute.nodeTemplates.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.getIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.getIamPolicy
* @memberOf! ()
*
@@ -47193,6 +57152,100 @@ export namespace compute_v1 {
/**
* compute.nodeTemplates.insert
* @desc Creates a NodeTemplate resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nodeAffinityLabels": {},
+ * // "nodeType": "my_nodeType",
+ * // "nodeTypeFlexibility": {},
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "serverBinding": {},
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.insert
* @memberOf! ()
*
@@ -47270,6 +57323,76 @@ export namespace compute_v1 {
/**
* compute.nodeTemplates.list
* @desc Retrieves a list of node templates available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.list
* @memberOf! ()
*
@@ -47349,6 +57472,69 @@ export namespace compute_v1 {
/**
* compute.nodeTemplates.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.setIamPolicy
* @memberOf! ()
*
@@ -47424,6 +57610,63 @@ export namespace compute_v1 {
/**
* compute.nodeTemplates.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTemplates.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTemplates.testIamPermissions
* @memberOf! ()
*
@@ -47716,6 +57959,76 @@ export namespace compute_v1 {
/**
* compute.nodeTypes.aggregatedList
* @desc Retrieves an aggregated list of node types.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTypes.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTypes.aggregatedList
* @memberOf! ()
*
@@ -47798,6 +58111,66 @@ export namespace compute_v1 {
/**
* compute.nodeTypes.get
* @desc Returns the specified node type. Gets a list of available node types by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTypes.get({
+ * // Name of the node type to return.
+ * nodeType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cpuPlatform": "my_cpuPlatform",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "guestCpus": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "localSsdGb": 0,
+ * // "memoryMb": 0,
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTypes.get
* @memberOf! ()
*
@@ -47871,6 +58244,76 @@ export namespace compute_v1 {
/**
* compute.nodeTypes.list
* @desc Retrieves a list of node types available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.nodeTypes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.nodeTypes.list
* @memberOf! ()
*
@@ -48038,6 +58481,76 @@ export namespace compute_v1 {
/**
* compute.packetMirrorings.aggregatedList
* @desc Retrieves an aggregated list of packetMirrorings.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.aggregatedList
* @memberOf! ()
*
@@ -48126,6 +58639,82 @@ export namespace compute_v1 {
/**
* compute.packetMirrorings.delete
* @desc Deletes the specified PacketMirroring resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.delete({
+ * // Name of the PacketMirroring resource to delete.
+ * packetMirroring: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.delete
* @memberOf! ()
*
@@ -48203,6 +58792,67 @@ export namespace compute_v1 {
/**
* compute.packetMirrorings.get
* @desc Returns the specified PacketMirroring resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.get({
+ * // Name of the PacketMirroring resource to return.
+ * packetMirroring: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "collectorIlb": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enable": "my_enable",
+ * // "filter": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mirroredResources": {},
+ * // "name": "my_name",
+ * // "network": {},
+ * // "priority": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.get
* @memberOf! ()
*
@@ -48279,6 +58929,100 @@ export namespace compute_v1 {
/**
* compute.packetMirrorings.insert
* @desc Creates a PacketMirroring resource in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "collectorIlb": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enable": "my_enable",
+ * // "filter": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mirroredResources": {},
+ * // "name": "my_name",
+ * // "network": {},
+ * // "priority": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.insert
* @memberOf! ()
*
@@ -48356,6 +59100,76 @@ export namespace compute_v1 {
/**
* compute.packetMirrorings.list
* @desc Retrieves a list of PacketMirroring resources available to the specified project and region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.list
* @memberOf! ()
*
@@ -48435,6 +59249,102 @@ export namespace compute_v1 {
/**
* compute.packetMirrorings.patch
* @desc Patches the specified PacketMirroring resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.patch({
+ * // Name of the PacketMirroring resource to patch.
+ * packetMirroring: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "collectorIlb": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enable": "my_enable",
+ * // "filter": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "mirroredResources": {},
+ * // "name": "my_name",
+ * // "network": {},
+ * // "priority": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.patch
* @memberOf! ()
*
@@ -48513,6 +59423,63 @@ export namespace compute_v1 {
/**
* compute.packetMirrorings.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.packetMirrorings.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.packetMirrorings.testIamPermissions
* @memberOf! ()
*
@@ -48790,55 +59757,77 @@ export namespace compute_v1 {
* compute.projects.disableXpnHost
* @desc Disable this project as a shared VPC host project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.disableXpnHost({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.projects.disableXpnHost(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.disableXpnHost
* @memberOf! ()
*
@@ -48914,59 +59903,85 @@ export namespace compute_v1 {
* compute.projects.disableXpnResource
* @desc Disable a service resource (also known as service project) associated with this host project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.disableXpnResource({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "xpnResource": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.projects.disableXpnResource(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.disableXpnResource
* @memberOf! ()
*
@@ -49043,55 +60058,77 @@ export namespace compute_v1 {
* compute.projects.enableXpnHost
* @desc Enable this project as a shared VPC host project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.enableXpnHost({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.projects.enableXpnHost(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.enableXpnHost
* @memberOf! ()
*
@@ -49167,59 +60204,85 @@ export namespace compute_v1 {
* compute.projects.enableXpnResource
* @desc Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.enableXpnResource({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "xpnResource": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.projects.enableXpnResource(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.enableXpnResource
* @memberOf! ()
*
@@ -49296,55 +60359,62 @@ export namespace compute_v1 {
* compute.projects.get
* @desc Returns the specified Project resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.projects.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commonInstanceMetadata": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultNetworkTier": "my_defaultNetworkTier",
+ * // "defaultServiceAccount": "my_defaultServiceAccount",
+ * // "description": "my_description",
+ * // "enabledFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "quotas": [],
+ * // "selfLink": "my_selfLink",
+ * // "usageExportLocation": {},
+ * // "xpnProjectStatus": "my_xpnProjectStatus"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.get
* @memberOf! ()
*
@@ -49417,55 +60487,61 @@ export namespace compute_v1 {
* compute.projects.getXpnHost
* @desc Gets the shared VPC host project that this project links to. May be empty if no link exists.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.getXpnHost({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.projects.getXpnHost(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commonInstanceMetadata": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultNetworkTier": "my_defaultNetworkTier",
+ * // "defaultServiceAccount": "my_defaultServiceAccount",
+ * // "description": "my_description",
+ * // "enabledFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "quotas": [],
+ * // "selfLink": "my_selfLink",
+ * // "usageExportLocation": {},
+ * // "xpnProjectStatus": "my_xpnProjectStatus"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.getXpnHost
* @memberOf! ()
*
@@ -49538,68 +60614,69 @@ export namespace compute_v1 {
* compute.projects.getXpnResources
* @desc Gets service resources (a.k.a service project) associated with this host project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.getXpnResources({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var resourcesPage = response['resources'];
- * if (!resourcesPage) {
- * return;
- * }
- * for (var i = 0; i < resourcesPage.length; i++) {
- * // TODO: Change code below to process each resource in `resourcesPage`:
- * console.log(JSON.stringify(resourcesPage[i], null, 2));
- * }
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
*
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.projects.getXpnResources(request, handlePage);
- * }
- * };
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
*
- * compute.projects.getXpnResources(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.getXpnResources
* @memberOf! ()
*
@@ -49682,72 +60759,80 @@ export namespace compute_v1 {
* compute.projects.listXpnHosts
* @desc Lists all shared VPC host projects visible to the user in an organization.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.listXpnHosts({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "organization": "my_organization"
+ * // }
* },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.projects.listXpnHosts(request, handlePage);
- * }
- * };
- *
- * compute.projects.listXpnHosts(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.listXpnHosts
* @memberOf! ()
*
@@ -49827,59 +60912,86 @@ export namespace compute_v1 {
* compute.projects.moveDisk
* @desc Moves a persistent disk from one zone to another.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.moveDisk({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "destinationZone": "my_destinationZone",
+ * // "targetDisk": "my_targetDisk"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.projects.moveDisk(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.moveDisk
* @memberOf! ()
*
@@ -49957,59 +61069,86 @@ export namespace compute_v1 {
* compute.projects.moveInstance
* @desc Moves an instance and its attached persistent disks from one zone to another.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.moveInstance({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "destinationZone": "my_destinationZone",
+ * // "targetInstance": "my_targetInstance"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.projects.moveInstance(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.moveInstance
* @memberOf! ()
*
@@ -50086,59 +61225,87 @@ export namespace compute_v1 {
* compute.projects.setCommonInstanceMetadata
* @desc Sets metadata common to all instances within the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.setCommonInstanceMetadata({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.projects.setCommonInstanceMetadata(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.setCommonInstanceMetadata
* @memberOf! ()
*
@@ -50217,6 +61384,86 @@ export namespace compute_v1 {
/**
* compute.projects.setDefaultNetworkTier
* @desc Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.setDefaultNetworkTier({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "networkTier": "my_networkTier"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.projects.setDefaultNetworkTier
* @memberOf! ()
*
@@ -50295,59 +61542,89 @@ export namespace compute_v1 {
* compute.projects.setUsageExportBucket
* @desc Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/devstorage.full_control',
+ * 'https://www.googleapis.com/auth/devstorage.read_only',
+ * 'https://www.googleapis.com/auth/devstorage.read_write',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.projects.setUsageExportBucket({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bucketName": "my_bucketName",
+ * // "reportNamePrefix": "my_reportNamePrefix"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.projects.setUsageExportBucket(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.projects.setUsageExportBucket
* @memberOf! ()
*
@@ -50697,61 +61974,81 @@ export namespace compute_v1 {
* compute.regionAutoscalers.delete
* @desc Deletes the specified autoscaler.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.delete({
+ * // Name of the autoscaler to delete.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the autoscaler to delete.
- * autoscaler: 'my-autoscaler', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionAutoscalers.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionAutoscalers.delete
* @memberOf! ()
*
@@ -50830,61 +62127,66 @@ export namespace compute_v1 {
* compute.regionAutoscalers.get
* @desc Returns the specified autoscaler.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.get({
+ * // Name of the autoscaler to return.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the autoscaler to return.
- * autoscaler: 'my-autoscaler', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionAutoscalers.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionAutoscalers.get
* @memberOf! ()
*
@@ -50962,62 +62264,99 @@ export namespace compute_v1 {
* compute.regionAutoscalers.insert
* @desc Creates an autoscaler in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionAutoscalers.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionAutoscalers.insert
* @memberOf! ()
*
@@ -51096,71 +62435,75 @@ export namespace compute_v1 {
* compute.regionAutoscalers.list
* @desc Retrieves a list of autoscalers contained within the specified region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regionAutoscalers.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.regionAutoscalers.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionAutoscalers.list
* @memberOf! ()
*
@@ -51243,63 +62586,101 @@ export namespace compute_v1 {
* compute.regionAutoscalers.patch
* @desc Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.patch({
+ * // Name of the autoscaler to patch.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionAutoscalers.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionAutoscalers.patch
* @memberOf! ()
*
@@ -51379,63 +62760,101 @@ export namespace compute_v1 {
* compute.regionAutoscalers.update
* @desc Updates an autoscaler in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionAutoscalers.update({
+ * // Name of the autoscaler to update.
+ * autoscaler: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscalingPolicy": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "recommendedSize": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusDetails": [],
+ * // "target": "my_target",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionAutoscalers.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionAutoscalers.update
* @memberOf! ()
*
@@ -51682,61 +63101,81 @@ export namespace compute_v1 {
* compute.regionBackendServices.delete
* @desc Deletes the specified regional BackendService resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.delete({
+ * // Name of the BackendService resource to delete.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the BackendService resource to delete.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionBackendServices.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionBackendServices.delete
* @memberOf! ()
*
@@ -51815,61 +63254,83 @@ export namespace compute_v1 {
* compute.regionBackendServices.get
* @desc Returns the specified regional BackendService resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.get({
+ * // Name of the BackendService resource to return.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the BackendService resource to return.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionBackendServices.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionBackendServices.get
* @memberOf! ()
*
@@ -51947,64 +63408,63 @@ export namespace compute_v1 {
* compute.regionBackendServices.getHealth
* @desc Gets the most recent health check results for this regional BackendService.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.getHealth({
+ * // Name of the BackendService resource for which to get health.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the BackendService resource to which the queried instance belongs.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "group": "my_group"
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.regionBackendServices.getHealth(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "healthStatus": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionBackendServices.getHealth
* @memberOf! ()
*
@@ -52090,62 +63550,116 @@ export namespace compute_v1 {
* compute.regionBackendServices.insert
* @desc Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Understanding backend services for more information.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionBackendServices.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionBackendServices.insert
* @memberOf! ()
*
@@ -52224,71 +63738,75 @@ export namespace compute_v1 {
* compute.regionBackendServices.list
* @desc Retrieves the list of regional BackendService resources available to the specified project in the given region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regionBackendServices.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.regionBackendServices.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionBackendServices.list
* @memberOf! ()
*
@@ -52369,66 +63887,118 @@ export namespace compute_v1 {
* compute.regionBackendServices.patch
* @desc Updates the specified regional BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.patch({
+ * // Name of the BackendService resource to patch.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the BackendService resource to patch.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionBackendServices.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionBackendServices.patch
* @memberOf! ()
*
@@ -52508,66 +64078,118 @@ export namespace compute_v1 {
* compute.regionBackendServices.update
* @desc Updates the specified regional BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionBackendServices.update({
+ * // Name of the BackendService resource to update.
+ * backendService: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the BackendService resource to update.
- * backendService: 'my-backend-service', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "affinityCookieTtlSec": 0,
+ * // "backends": [],
+ * // "cdnPolicy": {},
+ * // "circuitBreakers": {},
+ * // "connectionDraining": {},
+ * // "consistentHash": {},
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customRequestHeaders": [],
+ * // "description": "my_description",
+ * // "enableCDN": false,
+ * // "failoverPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "healthChecks": [],
+ * // "iap": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "loadBalancingScheme": "my_loadBalancingScheme",
+ * // "localityLbPolicy": "my_localityLbPolicy",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "outlierDetection": {},
+ * // "port": 0,
+ * // "portName": "my_portName",
+ * // "protocol": "my_protocol",
+ * // "region": "my_region",
+ * // "securityPolicy": "my_securityPolicy",
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity",
+ * // "timeoutSec": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionBackendServices.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionBackendServices.update
* @memberOf! ()
*
@@ -52839,68 +64461,75 @@ export namespace compute_v1 {
* compute.regionCommitments.aggregatedList
* @desc Retrieves an aggregated list of commitments.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionCommitments.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regionCommitments.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.regionCommitments.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionCommitments.aggregatedList
* @memberOf! ()
*
@@ -52984,61 +64613,67 @@ export namespace compute_v1 {
* compute.regionCommitments.get
* @desc Returns the specified commitment resource. Gets a list of available commitments by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionCommitments.get({
+ * // Name of the commitment to return.
+ * commitment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the commitment to return.
- * commitment: 'my-commitment', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionCommitments.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTimestamp": "my_endTimestamp",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "region": "my_region",
+ * // "reservations": [],
+ * // "resources": [],
+ * // "selfLink": "my_selfLink",
+ * // "startTimestamp": "my_startTimestamp",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionCommitments.get
* @memberOf! ()
*
@@ -53116,62 +64751,100 @@ export namespace compute_v1 {
* compute.regionCommitments.insert
* @desc Creates a commitment in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionCommitments.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTimestamp": "my_endTimestamp",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "plan": "my_plan",
+ * // "region": "my_region",
+ * // "reservations": [],
+ * // "resources": [],
+ * // "selfLink": "my_selfLink",
+ * // "startTimestamp": "my_startTimestamp",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionCommitments.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionCommitments.insert
* @memberOf! ()
*
@@ -53250,71 +64923,75 @@ export namespace compute_v1 {
* compute.regionCommitments.list
* @desc Retrieves a list of commitments contained within the specified region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionCommitments.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regionCommitments.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.regionCommitments.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionCommitments.list
* @memberOf! ()
*
@@ -53511,6 +65188,90 @@ export namespace compute_v1 {
/**
* compute.regionDisks.addResourcePolicies
* @desc Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.addResourcePolicies({
+ * // The disk name for this request.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.addResourcePolicies
* @memberOf! ()
*
@@ -53589,6 +65350,110 @@ export namespace compute_v1 {
/**
* compute.regionDisks.createSnapshot
* @desc Creates a snapshot of this regional disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.createSnapshot({
+ * // Name of the regional persistent disk to snapshot.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoCreated": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "downloadBytes": "my_downloadBytes",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "snapshotEncryptionKey": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "status": "my_status",
+ * // "storageBytes": "my_storageBytes",
+ * // "storageBytesStatus": "my_storageBytesStatus",
+ * // "storageLocations": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.createSnapshot
* @memberOf! ()
*
@@ -53667,6 +65532,82 @@ export namespace compute_v1 {
/**
* compute.regionDisks.delete
* @desc Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.delete({
+ * // Name of the regional persistent disk to delete.
+ * disk: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.delete
* @memberOf! ()
*
@@ -53744,6 +65685,84 @@ export namespace compute_v1 {
/**
* compute.regionDisks.get
* @desc Returns a specified regional persistent disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.get({
+ * // Name of the regional persistent disk to return.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskEncryptionKey": {},
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "lastAttachTimestamp": "my_lastAttachTimestamp",
+ * // "lastDetachTimestamp": "my_lastDetachTimestamp",
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "options": "my_options",
+ * // "physicalBlockSizeBytes": "my_physicalBlockSizeBytes",
+ * // "region": "my_region",
+ * // "replicaZones": [],
+ * // "resourcePolicies": [],
+ * // "selfLink": "my_selfLink",
+ * // "sizeGb": "my_sizeGb",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "status": "my_status",
+ * // "type": "my_type",
+ * // "users": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.get
* @memberOf! ()
*
@@ -53817,6 +65836,119 @@ export namespace compute_v1 {
/**
* compute.regionDisks.insert
* @desc Creates a persistent regional disk in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Optional. Source image to restore onto a disk.
+ * sourceImage: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskEncryptionKey": {},
+ * // "guestOsFeatures": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "lastAttachTimestamp": "my_lastAttachTimestamp",
+ * // "lastDetachTimestamp": "my_lastDetachTimestamp",
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "options": "my_options",
+ * // "physicalBlockSizeBytes": "my_physicalBlockSizeBytes",
+ * // "region": "my_region",
+ * // "replicaZones": [],
+ * // "resourcePolicies": [],
+ * // "selfLink": "my_selfLink",
+ * // "sizeGb": "my_sizeGb",
+ * // "sourceImage": "my_sourceImage",
+ * // "sourceImageEncryptionKey": {},
+ * // "sourceImageId": "my_sourceImageId",
+ * // "sourceSnapshot": "my_sourceSnapshot",
+ * // "sourceSnapshotEncryptionKey": {},
+ * // "sourceSnapshotId": "my_sourceSnapshotId",
+ * // "status": "my_status",
+ * // "type": "my_type",
+ * // "users": [],
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.insert
* @memberOf! ()
*
@@ -53894,6 +66026,76 @@ export namespace compute_v1 {
/**
* compute.regionDisks.list
* @desc Retrieves the list of persistent disks contained within the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.list
* @memberOf! ()
*
@@ -53969,6 +66171,90 @@ export namespace compute_v1 {
/**
* compute.regionDisks.removeResourcePolicies
* @desc Removes resource policies from a regional disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.removeResourcePolicies({
+ * // The disk name for this request.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resourcePolicies": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.removeResourcePolicies
* @memberOf! ()
*
@@ -54049,6 +66335,90 @@ export namespace compute_v1 {
/**
* compute.regionDisks.resize
* @desc Resizes the specified regional persistent disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.resize({
+ * // Name of the regional persistent disk.
+ * disk: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sizeGb": "my_sizeGb"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.resize
* @memberOf! ()
*
@@ -54127,6 +66497,91 @@ export namespace compute_v1 {
/**
* compute.regionDisks.setLabels
* @desc Sets the labels on the target regional disk.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.setLabels
* @memberOf! ()
*
@@ -54205,6 +66660,63 @@ export namespace compute_v1 {
/**
* compute.regionDisks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDisks.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDisks.testIamPermissions
* @memberOf! ()
*
@@ -54567,6 +67079,65 @@ export namespace compute_v1 {
/**
* compute.regionDiskTypes.get
* @desc Returns the specified regional disk type. Gets a list of available disk types by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDiskTypes.get({
+ * // Name of the disk type to return.
+ * diskType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultDiskSizeGb": "my_defaultDiskSizeGb",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "validDiskSize": "my_validDiskSize",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDiskTypes.get
* @memberOf! ()
*
@@ -54641,6 +67212,76 @@ export namespace compute_v1 {
/**
* compute.regionDiskTypes.list
* @desc Retrieves a list of regional disk types available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionDiskTypes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionDiskTypes.list
* @memberOf! ()
*
@@ -54780,6 +67421,82 @@ export namespace compute_v1 {
/**
* compute.regionHealthChecks.delete
* @desc Deletes the specified HealthCheck resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.delete({
+ * // Name of the HealthCheck resource to delete.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.delete
* @memberOf! ()
*
@@ -54857,6 +67574,71 @@ export namespace compute_v1 {
/**
* compute.regionHealthChecks.get
* @desc Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.get({
+ * // Name of the HealthCheck resource to return.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "unhealthyThreshold": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.get
* @memberOf! ()
*
@@ -54933,6 +67715,104 @@ export namespace compute_v1 {
/**
* compute.regionHealthChecks.insert
* @desc Creates a HealthCheck resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.insert
* @memberOf! ()
*
@@ -55010,6 +67890,76 @@ export namespace compute_v1 {
/**
* compute.regionHealthChecks.list
* @desc Retrieves the list of HealthCheck resources available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.list
* @memberOf! ()
*
@@ -55089,6 +68039,106 @@ export namespace compute_v1 {
/**
* compute.regionHealthChecks.patch
* @desc Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.patch({
+ * // Name of the HealthCheck resource to patch.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.patch
* @memberOf! ()
*
@@ -55167,6 +68217,106 @@ export namespace compute_v1 {
/**
* compute.regionHealthChecks.update
* @desc Updates a HealthCheck resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionHealthChecks.update({
+ * // Name of the HealthCheck resource to update.
+ * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "checkIntervalSec": 0,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "healthyThreshold": 0,
+ * // "http2HealthCheck": {},
+ * // "httpHealthCheck": {},
+ * // "httpsHealthCheck": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslHealthCheck": {},
+ * // "tcpHealthCheck": {},
+ * // "timeoutSec": 0,
+ * // "type": "my_type",
+ * // "unhealthyThreshold": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionHealthChecks.update
* @memberOf! ()
*
@@ -55413,65 +68563,89 @@ export namespace compute_v1 {
* compute.regionInstanceGroupManagers.abandonInstances
* @desc Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.abandonInstances({
+ * // Name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.abandonInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.abandonInstances
* @memberOf! ()
*
@@ -55550,6 +68724,88 @@ export namespace compute_v1 {
/**
* compute.regionInstanceGroupManagers.applyUpdatesToInstances
* @desc Apply updates to selected instances the managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.applyUpdatesToInstances(
+ * {
+ * // The name of the managed instance group, should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request, should conform to RFC1035.
+ * region: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": [],
+ * // "minimalAction": "my_minimalAction",
+ * // "mostDisruptiveAllowedAction": "my_mostDisruptiveAllowedAction"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.applyUpdatesToInstances
* @memberOf! ()
*
@@ -55629,6 +68885,90 @@ export namespace compute_v1 {
/**
* compute.regionInstanceGroupManagers.createInstances
* @desc Creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.createInstances({
+ * // The name of the managed instance group. It should conform to RFC1035.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region where the managed instance group is located. It should conform to RFC1035.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.createInstances
* @memberOf! ()
*
@@ -55708,61 +69048,81 @@ export namespace compute_v1 {
* compute.regionInstanceGroupManagers.delete
* @desc Deletes the specified managed instance group and all of the instances in that group.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.delete({
+ * // Name of the managed instance group to delete.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the managed instance group to delete.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.delete
* @memberOf! ()
*
@@ -55841,65 +69201,89 @@ export namespace compute_v1 {
* compute.regionInstanceGroupManagers.deleteInstances
* @desc Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.deleteInstances({
+ * // Name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.deleteInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.deleteInstances
* @memberOf! ()
*
@@ -55979,61 +69363,74 @@ export namespace compute_v1 {
* compute.regionInstanceGroupManagers.get
* @desc Returns all of the details about the specified managed instance group.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.get({
+ * // Name of the managed instance group to return.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the managed instance group to return.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.get
* @memberOf! ()
*
@@ -56113,62 +69510,107 @@ export namespace compute_v1 {
* compute.regionInstanceGroupManagers.insert
* @desc Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A regional managed instance group can contain up to 2000 instances.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.insert
* @memberOf! ()
*
@@ -56247,71 +69689,75 @@ export namespace compute_v1 {
* compute.regionInstanceGroupManagers.list
* @desc Retrieves the list of managed instance groups that are contained within the specified region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regionInstanceGroupManagers.list(request, handlePage);
- * }
- * };
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.regionInstanceGroupManagers.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.list
* @memberOf! ()
*
@@ -56400,6 +69846,74 @@ export namespace compute_v1 {
/**
* compute.regionInstanceGroupManagers.listErrors
* @desc Lists all errors thrown by actions on instances for a given regional managed instance group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.listErrors({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}.
+ * instanceGroupManager: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request. This should conform to RFC1035.
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "items": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.listErrors
* @memberOf! ()
*
@@ -56506,61 +70020,73 @@ export namespace compute_v1 {
* compute.regionInstanceGroupManagers.listManagedInstances
* @desc Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.listManagedInstances({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * compute.regionInstanceGroupManagers.listManagedInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "managedInstances": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.listManagedInstances
* @memberOf! ()
*
@@ -56665,6 +70191,110 @@ export namespace compute_v1 {
/**
* compute.regionInstanceGroupManagers.patch
* @desc Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.patch({
+ * // The name of the instance group manager.
+ * instanceGroupManager: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoHealingPolicies": [],
+ * // "baseInstanceName": "my_baseInstanceName",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "currentActions": {},
+ * // "description": "my_description",
+ * // "distributionPolicy": {},
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "instanceGroup": "my_instanceGroup",
+ * // "instanceTemplate": "my_instanceTemplate",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": {},
+ * // "targetPools": [],
+ * // "targetSize": 0,
+ * // "updatePolicy": {},
+ * // "versions": [],
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionInstanceGroupManagers.patch
* @memberOf! ()
*
@@ -56744,65 +70374,89 @@ export namespace compute_v1 {
* compute.regionInstanceGroupManagers.recreateInstances
* @desc Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.recreateInstances({
+ * // Name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.recreateInstances(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.recreateInstances
* @memberOf! ()
*
@@ -56882,64 +70536,83 @@ export namespace compute_v1 {
* compute.regionInstanceGroupManagers.resize
* @desc Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.resize({
+ * // Name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Number of instances that should exist in this instance group manager.
- * size: 0, // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.resize(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * size: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.resize
* @memberOf! ()
*
@@ -57019,65 +70692,89 @@ export namespace compute_v1 {
* compute.regionInstanceGroupManagers.setInstanceTemplate
* @desc Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.setInstanceTemplate({
+ * // The name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // The name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instanceTemplate": "my_instanceTemplate"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.setInstanceTemplate(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.setInstanceTemplate
* @memberOf! ()
*
@@ -57157,65 +70854,90 @@ export namespace compute_v1 {
* compute.regionInstanceGroupManagers.setTargetPools
* @desc Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroupManagers.setTargetPools({
+ * // Name of the managed instance group.
+ * instanceGroupManager: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the managed instance group.
- * instanceGroupManager: 'my-instance-group-manager', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "targetPools": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroupManagers.setTargetPools(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroupManagers.setTargetPools
* @memberOf! ()
*
@@ -57732,61 +71454,66 @@ export namespace compute_v1 {
* compute.regionInstanceGroups.get
* @desc Returns the specified instance group resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroups.get({
+ * // Name of the instance group resource to return.
+ * instanceGroup: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the instance group resource to return.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroups.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "namedPorts": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "size": 0,
+ * // "subnetwork": "my_subnetwork",
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroups.get
* @memberOf! ()
*
@@ -57864,71 +71591,75 @@ export namespace compute_v1 {
* compute.regionInstanceGroups.list
* @desc Retrieves the list of instance group resources contained within the specified region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroups.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regionInstanceGroups.list(request, handlePage);
- * }
- * };
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.regionInstanceGroups.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroups.list
* @memberOf! ()
*
@@ -58011,78 +71742,86 @@ export namespace compute_v1 {
* compute.regionInstanceGroups.listInstances
* @desc Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroups.listInstances({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Name of the regional instance group for which we want to list the instances.
+ * instanceGroup: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the regional instance group for which we want to list the instances.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instanceState": "my_instanceState",
+ * // "portName": "my_portName"
+ * // }
* },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regionInstanceGroups.listInstances(request, handlePage);
- * }
- * };
- *
- * compute.regionInstanceGroups.listInstances(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroups.listInstances
* @memberOf! ()
*
@@ -58174,65 +71913,90 @@ export namespace compute_v1 {
* compute.regionInstanceGroups.setNamedPorts
* @desc Sets the named ports for the specified regional instance group.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionInstanceGroups.setNamedPorts({
+ * // The name of the regional instance group where the named ports are updated.
+ * instanceGroup: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // The name of the regional instance group where the named ports are updated.
- * instanceGroup: 'my-instance-group', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: 'placeholder-value',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint",
+ * // "namedPorts": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.regionInstanceGroups.setNamedPorts(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionInstanceGroups.setNamedPorts
* @memberOf! ()
*
@@ -58442,58 +72206,48 @@ export namespace compute_v1 {
* compute.regionOperations.delete
* @desc Deletes the specified region-specific Operations resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionOperations.delete({
+ * // Name of the Operations resource to delete.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the Operations resource to delete.
- * operation: 'my-operation', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionOperations.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionOperations.delete
* @memberOf! ()
*
@@ -58569,61 +72323,76 @@ export namespace compute_v1 {
* compute.regionOperations.get
* @desc Retrieves the specified region-specific Operations resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionOperations.get({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * // Name of the Operations resource to return.
- * operation: 'my-operation', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regionOperations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionOperations.get
* @memberOf! ()
*
@@ -58701,71 +72470,75 @@ export namespace compute_v1 {
* compute.regionOperations.list
* @desc Retrieves a list of Operation resources contained within the specified region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionOperations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regionOperations.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.regionOperations.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regionOperations.list
* @memberOf! ()
*
@@ -58845,6 +72618,77 @@ export namespace compute_v1 {
/**
* compute.regionOperations.wait
* @desc Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be `DONE` or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not `DONE`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionOperations.wait({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionOperations.wait
* @memberOf! ()
*
@@ -59022,58 +72866,61 @@ export namespace compute_v1 {
* compute.regions.get
* @desc Returns the specified Region resource. Gets a list of available regions by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regions.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region resource to return.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.regions.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "quotas": [],
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "zones": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regions.get
* @memberOf! ()
*
@@ -59146,68 +72993,73 @@ export namespace compute_v1 {
* compute.regions.list
* @desc Retrieves the list of region resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regions.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.regions.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.regions.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.regions.list
* @memberOf! ()
*
@@ -59335,6 +73187,82 @@ export namespace compute_v1 {
/**
* compute.regionSslCertificates.delete
* @desc Deletes the specified SslCertificate resource in the region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionSslCertificates.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the SslCertificate resource to delete.
+ * sslCertificate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionSslCertificates.delete
* @memberOf! ()
*
@@ -59412,6 +73340,68 @@ export namespace compute_v1 {
/**
* compute.regionSslCertificates.get
* @desc Returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionSslCertificates.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the SslCertificate resource to return.
+ * sslCertificate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificate": "my_certificate",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "managed": {},
+ * // "name": "my_name",
+ * // "privateKey": "my_privateKey",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfManaged": {},
+ * // "subjectAlternativeNames": [],
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionSslCertificates.get
* @memberOf! ()
*
@@ -59488,6 +73478,101 @@ export namespace compute_v1 {
/**
* compute.regionSslCertificates.insert
* @desc Creates a SslCertificate resource in the specified project and region using the data included in the request
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionSslCertificates.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "certificate": "my_certificate",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "managed": {},
+ * // "name": "my_name",
+ * // "privateKey": "my_privateKey",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfManaged": {},
+ * // "subjectAlternativeNames": [],
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionSslCertificates.insert
* @memberOf! ()
*
@@ -59565,6 +73650,76 @@ export namespace compute_v1 {
/**
* compute.regionSslCertificates.list
* @desc Retrieves the list of SslCertificate resources available to the specified project in the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionSslCertificates.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionSslCertificates.list
* @memberOf! ()
*
@@ -59753,6 +73908,82 @@ export namespace compute_v1 {
/**
* compute.regionTargetHttpProxies.delete
* @desc Deletes the specified TargetHttpProxy resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpProxies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpProxy resource to delete.
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpProxies.delete
* @memberOf! ()
*
@@ -59830,6 +74061,62 @@ export namespace compute_v1 {
/**
* compute.regionTargetHttpProxies.get
* @desc Returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpProxies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the TargetHttpProxy resource to return.
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpProxies.get
* @memberOf! ()
*
@@ -59906,6 +74193,95 @@ export namespace compute_v1 {
/**
* compute.regionTargetHttpProxies.insert
* @desc Creates a TargetHttpProxy resource in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpProxies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpProxies.insert
* @memberOf! ()
*
@@ -59983,6 +74359,76 @@ export namespace compute_v1 {
/**
* compute.regionTargetHttpProxies.list
* @desc Retrieves the list of TargetHttpProxy resources available to the specified project in the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpProxies.list
* @memberOf! ()
*
@@ -60062,6 +74508,90 @@ export namespace compute_v1 {
/**
* compute.regionTargetHttpProxies.setUrlMap
* @desc Changes the URL map for TargetHttpProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpProxies.setUrlMap({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpProxy to set a URL map for.
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "urlMap": "my_urlMap"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpProxies.setUrlMap
* @memberOf! ()
*
@@ -60278,6 +74808,82 @@ export namespace compute_v1 {
/**
* compute.regionTargetHttpsProxies.delete
* @desc Deletes the specified TargetHttpsProxy resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy resource to delete.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.delete
* @memberOf! ()
*
@@ -60355,6 +74961,65 @@ export namespace compute_v1 {
/**
* compute.regionTargetHttpsProxies.get
* @desc Returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the TargetHttpsProxy resource to return.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "quicOverride": "my_quicOverride",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.get
* @memberOf! ()
*
@@ -60431,6 +75096,98 @@ export namespace compute_v1 {
/**
* compute.regionTargetHttpsProxies.insert
* @desc Creates a TargetHttpsProxy resource in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "quicOverride": "my_quicOverride",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.insert
* @memberOf! ()
*
@@ -60508,6 +75265,76 @@ export namespace compute_v1 {
/**
* compute.regionTargetHttpsProxies.list
* @desc Retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.list
* @memberOf! ()
*
@@ -60589,6 +75416,90 @@ export namespace compute_v1 {
/**
* compute.regionTargetHttpsProxies.setSslCertificates
* @desc Replaces SslCertificates for TargetHttpsProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.setSslCertificates({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy resource to set an SslCertificates resource for.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sslCertificates": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.setSslCertificates
* @memberOf! ()
*
@@ -60667,6 +75578,90 @@ export namespace compute_v1 {
/**
* compute.regionTargetHttpsProxies.setUrlMap
* @desc Changes the URL map for TargetHttpsProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionTargetHttpsProxies.setUrlMap({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy to set a URL map for.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "urlMap": "my_urlMap"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionTargetHttpsProxies.setUrlMap
* @memberOf! ()
*
@@ -60912,6 +75907,78 @@ export namespace compute_v1 {
/**
* compute.regionUrlMaps.delete
* @desc Deletes the specified UrlMap resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
+ * requestId: 'placeholder-value',
+ * // Name of the UrlMap resource to delete.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.delete
* @memberOf! ()
*
@@ -60989,6 +76056,69 @@ export namespace compute_v1 {
/**
* compute.regionUrlMaps.get
* @desc Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the UrlMap resource to return.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.get
* @memberOf! ()
*
@@ -61063,6 +76193,98 @@ export namespace compute_v1 {
/**
* compute.regionUrlMaps.insert
* @desc Creates a UrlMap resource in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.insert
* @memberOf! ()
*
@@ -61140,6 +76362,76 @@ export namespace compute_v1 {
/**
* compute.regionUrlMaps.list
* @desc Retrieves the list of UrlMap resources available to the specified project in the specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.list
* @memberOf! ()
*
@@ -61219,6 +76511,100 @@ export namespace compute_v1 {
/**
* compute.regionUrlMaps.patch
* @desc Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.patch({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
+ * requestId: 'placeholder-value',
+ * // Name of the UrlMap resource to patch.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.patch
* @memberOf! ()
*
@@ -61297,6 +76683,100 @@ export namespace compute_v1 {
/**
* compute.regionUrlMaps.update
* @desc Updates the specified UrlMap resource with the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.update({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
+ * requestId: 'placeholder-value',
+ * // Name of the UrlMap resource to update.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.update
* @memberOf! ()
*
@@ -61375,6 +76855,62 @@ export namespace compute_v1 {
/**
* compute.regionUrlMaps.validate
* @desc Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.regionUrlMaps.validate({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the UrlMap resource to be validated as.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resource": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "result": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.regionUrlMaps.validate
* @memberOf! ()
*
@@ -61648,6 +77184,76 @@ export namespace compute_v1 {
/**
* compute.reservations.aggregatedList
* @desc Retrieves an aggregated list of reservations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.aggregatedList
* @memberOf! ()
*
@@ -61733,6 +77339,82 @@ export namespace compute_v1 {
/**
* compute.reservations.delete
* @desc Deletes the specified reservation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the reservation to delete.
+ * reservation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.delete
* @memberOf! ()
*
@@ -61810,6 +77492,65 @@ export namespace compute_v1 {
/**
* compute.reservations.get
* @desc Retrieves information about the specified reservation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the reservation to retrieve.
+ * reservation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "commitment": "my_commitment",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "specificReservation": {},
+ * // "specificReservationRequired": false,
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.get
* @memberOf! ()
*
@@ -61885,6 +77626,60 @@ export namespace compute_v1 {
/**
* compute.reservations.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.getIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.getIamPolicy
* @memberOf! ()
*
@@ -61959,6 +77754,98 @@ export namespace compute_v1 {
/**
* compute.reservations.insert
* @desc Creates a new reservation. For more information, read Reserving zonal resources.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "commitment": "my_commitment",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "specificReservation": {},
+ * // "specificReservationRequired": false,
+ * // "status": "my_status",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.insert
* @memberOf! ()
*
@@ -62036,6 +77923,76 @@ export namespace compute_v1 {
/**
* compute.reservations.list
* @desc A list of all the reservations that have been configured for the specified project in specified zone.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.list
* @memberOf! ()
*
@@ -62115,6 +78072,90 @@ export namespace compute_v1 {
/**
* compute.reservations.resize
* @desc Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.resize({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the reservation to update.
+ * reservation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "specificSkuCount": "my_specificSkuCount"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.resize
* @memberOf! ()
*
@@ -62193,6 +78234,69 @@ export namespace compute_v1 {
/**
* compute.reservations.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.setIamPolicy
* @memberOf! ()
*
@@ -62268,6 +78372,63 @@ export namespace compute_v1 {
/**
* compute.reservations.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.reservations.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // The name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.reservations.testIamPermissions
* @memberOf! ()
*
@@ -62588,6 +78749,77 @@ export namespace compute_v1 {
/**
* compute.resourcePolicies.aggregatedList
* @desc Retrieves an aggregated list of resource policies.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.aggregatedList
* @memberOf! ()
*
@@ -62676,6 +78908,82 @@ export namespace compute_v1 {
/**
* compute.resourcePolicies.delete
* @desc Deletes the specified resource policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the resource policy to delete.
+ * resourcePolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.delete
* @memberOf! ()
*
@@ -62753,6 +79061,64 @@ export namespace compute_v1 {
/**
* compute.resourcePolicies.get
* @desc Retrieves all information of the specified resource policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the resource policy to retrieve.
+ * resourcePolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "groupPlacementPolicy": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "snapshotSchedulePolicy": {},
+ * // "status": "my_status"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.get
* @memberOf! ()
*
@@ -62829,6 +79195,60 @@ export namespace compute_v1 {
/**
* compute.resourcePolicies.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.getIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.getIamPolicy
* @memberOf! ()
*
@@ -62903,6 +79323,97 @@ export namespace compute_v1 {
/**
* compute.resourcePolicies.insert
* @desc Creates a new resource policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "groupPlacementPolicy": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "snapshotSchedulePolicy": {},
+ * // "status": "my_status"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.insert
* @memberOf! ()
*
@@ -62980,6 +79491,77 @@ export namespace compute_v1 {
/**
* compute.resourcePolicies.list
* @desc A list all the resource policies that have been configured for the specified project in specified region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.list
* @memberOf! ()
*
@@ -63059,6 +79641,69 @@ export namespace compute_v1 {
/**
* compute.resourcePolicies.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.setIamPolicy
* @memberOf! ()
*
@@ -63134,6 +79779,63 @@ export namespace compute_v1 {
/**
* compute.resourcePolicies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.resourcePolicies.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.resourcePolicies.testIamPermissions
* @memberOf! ()
*
@@ -63427,68 +80129,75 @@ export namespace compute_v1 {
* compute.routers.aggregatedList
* @desc Retrieves an aggregated list of routers.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.routers.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.routers.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.aggregatedList
* @memberOf! ()
*
@@ -63572,61 +80281,81 @@ export namespace compute_v1 {
* compute.routers.delete
* @desc Deletes the specified Router resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the Router resource to delete.
- * router: 'my-router', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.routers.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.delete
* @memberOf! ()
*
@@ -63704,61 +80433,65 @@ export namespace compute_v1 {
* compute.routers.get
* @desc Returns the specified Router resource. Gets a list of available routers by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* // Name of the Router resource to return.
- * router: 'my-router', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.routers.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bgp": {},
+ * // "bgpPeers": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nats": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.get
* @memberOf! ()
*
@@ -63832,6 +80565,78 @@ export namespace compute_v1 {
/**
* compute.routers.getNatMappingInfo
* @desc Retrieves runtime Nat mapping information of VM endpoints.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.getNatMappingInfo({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the Router resource to query for Nat Mapping information of VM endpoints.
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "result": [],
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.routers.getNatMappingInfo
* @memberOf! ()
*
@@ -63920,61 +80725,55 @@ export namespace compute_v1 {
* compute.routers.getRouterStatus
* @desc Retrieves runtime information of the specified router.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.getRouterStatus({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* // Name of the Router resource to query.
- * router: 'my-router', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
*
- * compute.routers.getRouterStatus(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "result": {}
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.getRouterStatus
* @memberOf! ()
*
@@ -64056,62 +80855,98 @@ export namespace compute_v1 {
* compute.routers.insert
* @desc Creates a Router resource in the specified project and region using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bgp": {},
+ * // "bgpPeers": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nats": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.routers.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.insert
* @memberOf! ()
*
@@ -64189,71 +81024,75 @@ export namespace compute_v1 {
* compute.routers.list
* @desc Retrieves a list of Router resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.routers.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.routers.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.list
* @memberOf! ()
*
@@ -64333,66 +81172,100 @@ export namespace compute_v1 {
* compute.routers.patch
* @desc Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.patch({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the Router resource to patch.
- * router: 'my-router', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bgp": {},
+ * // "bgpPeers": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nats": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.routers.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.patch
* @memberOf! ()
*
@@ -64471,65 +81344,73 @@ export namespace compute_v1 {
* compute.routers.preview
* @desc Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.preview({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* // Name of the Router resource to query.
- * router: 'my-router', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bgp": {},
+ * // "bgpPeers": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nats": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.routers.preview(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "resource": {}
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.preview
* @memberOf! ()
*
@@ -64611,66 +81492,100 @@ export namespace compute_v1 {
* compute.routers.update
* @desc Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routers.update({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the Router resource to update.
- * router: 'my-router', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * router: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bgp": {},
+ * // "bgpPeers": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "interfaces": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "nats": [],
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.routers.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routers.update
* @memberOf! ()
*
@@ -65022,58 +81937,79 @@ export namespace compute_v1 {
* compute.routes.delete
* @desc Deletes the specified Route resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routes.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the Route resource to delete.
- * route: 'my-route', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.routes.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * route: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routes.delete
* @memberOf! ()
*
@@ -65149,58 +82085,69 @@ export namespace compute_v1 {
* compute.routes.get
* @desc Returns the specified Route resource. Gets a list of available routes by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routes.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the Route resource to return.
- * route: 'my-route', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.routes.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * route: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "destRange": "my_destRange",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "nextHopGateway": "my_nextHopGateway",
+ * // "nextHopIlb": "my_nextHopIlb",
+ * // "nextHopInstance": "my_nextHopInstance",
+ * // "nextHopIp": "my_nextHopIp",
+ * // "nextHopNetwork": "my_nextHopNetwork",
+ * // "nextHopPeering": "my_nextHopPeering",
+ * // "nextHopVpnTunnel": "my_nextHopVpnTunnel",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "tags": [],
+ * // "warnings": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routes.get
* @memberOf! ()
*
@@ -65273,59 +82220,102 @@ export namespace compute_v1 {
* compute.routes.insert
* @desc Creates a Route resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routes.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "destRange": "my_destRange",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "nextHopGateway": "my_nextHopGateway",
+ * // "nextHopIlb": "my_nextHopIlb",
+ * // "nextHopInstance": "my_nextHopInstance",
+ * // "nextHopIp": "my_nextHopIp",
+ * // "nextHopNetwork": "my_nextHopNetwork",
+ * // "nextHopPeering": "my_nextHopPeering",
+ * // "nextHopVpnTunnel": "my_nextHopVpnTunnel",
+ * // "priority": 0,
+ * // "selfLink": "my_selfLink",
+ * // "tags": [],
+ * // "warnings": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.routes.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routes.insert
* @memberOf! ()
*
@@ -65401,68 +82391,73 @@ export namespace compute_v1 {
* compute.routes.list
* @desc Retrieves the list of Route resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.routes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.routes.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.routes.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.routes.list
* @memberOf! ()
*
@@ -65628,6 +82623,87 @@ export namespace compute_v1 {
/**
* compute.securityPolicies.addRule
* @desc Inserts a rule into a security policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.addRule({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the security policy to update.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "kind": "my_kind",
+ * // "match": {},
+ * // "preview": false,
+ * // "priority": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.addRule
* @memberOf! ()
*
@@ -65704,6 +82780,80 @@ export namespace compute_v1 {
/**
* compute.securityPolicies.delete
* @desc Deletes the specified policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to delete.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.delete
* @memberOf! ()
*
@@ -65780,6 +82930,60 @@ export namespace compute_v1 {
/**
* compute.securityPolicies.get
* @desc List all of the ordered rules present in a single specified policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the security policy to get.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "rules": [],
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.get
* @memberOf! ()
*
@@ -65855,6 +83059,60 @@ export namespace compute_v1 {
/**
* compute.securityPolicies.getRule
* @desc Gets a rule at the specified priority.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.getRule({
+ * // The priority of the rule to get from the security policy.
+ * priority: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the security policy to which the queried rule belongs.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "kind": "my_kind",
+ * // "match": {},
+ * // "preview": false,
+ * // "priority": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.getRule
* @memberOf! ()
*
@@ -65931,6 +83189,93 @@ export namespace compute_v1 {
/**
* compute.securityPolicies.insert
* @desc Creates a new policy in the specified project using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "rules": [],
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.insert
* @memberOf! ()
*
@@ -66006,6 +83351,73 @@ export namespace compute_v1 {
/**
* compute.securityPolicies.list
* @desc List all the policies that have been configured for the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.list
* @memberOf! ()
*
@@ -66083,6 +83495,68 @@ export namespace compute_v1 {
/**
* compute.securityPolicies.listPreconfiguredExpressionSets
* @desc Gets the current list of preconfigured Web Application Firewall (WAF) expressions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.listPreconfiguredExpressionSets({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "preconfiguredExpressionSets": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.listPreconfiguredExpressionSets
* @memberOf! ()
*
@@ -66187,6 +83661,95 @@ export namespace compute_v1 {
/**
* compute.securityPolicies.patch
* @desc Patches the specified policy with the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.patch({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the security policy to update.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "rules": [],
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.patch
* @memberOf! ()
*
@@ -66264,6 +83827,89 @@ export namespace compute_v1 {
/**
* compute.securityPolicies.patchRule
* @desc Patches a rule at the specified priority.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.patchRule({
+ * // The priority of the rule to patch.
+ * priority: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the security policy to update.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "description": "my_description",
+ * // "kind": "my_kind",
+ * // "match": {},
+ * // "preview": false,
+ * // "priority": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.patchRule
* @memberOf! ()
*
@@ -66341,6 +83987,76 @@ export namespace compute_v1 {
/**
* compute.securityPolicies.removeRule
* @desc Deletes a rule at the specified priority.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.securityPolicies.removeRule({
+ * // The priority of the rule to remove from the security policy.
+ * priority: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the security policy to update.
+ * securityPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.securityPolicies.removeRule
* @memberOf! ()
*
@@ -66650,58 +84366,79 @@ export namespace compute_v1 {
* compute.snapshots.delete
* @desc Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot. For more information, see Deleting snapshots.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the Snapshot resource to delete.
- * snapshot: 'my-snapshot', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.snapshots.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * snapshot: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.snapshots.delete
* @memberOf! ()
*
@@ -66778,58 +84515,72 @@ export namespace compute_v1 {
* compute.snapshots.get
* @desc Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the Snapshot resource to return.
- * snapshot: 'my-snapshot', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.snapshots.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * snapshot: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoCreated": false,
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "diskSizeGb": "my_diskSizeGb",
+ * // "downloadBytes": "my_downloadBytes",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "licenseCodes": [],
+ * // "licenses": [],
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink",
+ * // "snapshotEncryptionKey": {},
+ * // "sourceDisk": "my_sourceDisk",
+ * // "sourceDiskEncryptionKey": {},
+ * // "sourceDiskId": "my_sourceDiskId",
+ * // "status": "my_status",
+ * // "storageBytes": "my_storageBytes",
+ * // "storageBytesStatus": "my_storageBytesStatus",
+ * // "storageLocations": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.snapshots.get
* @memberOf! ()
*
@@ -66902,6 +84653,58 @@ export namespace compute_v1 {
/**
* compute.snapshots.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.getIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.snapshots.getIamPolicy
* @memberOf! ()
*
@@ -66976,68 +84779,73 @@ export namespace compute_v1 {
* compute.snapshots.list
* @desc Retrieves the list of Snapshot resources contained within the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.snapshots.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.snapshots.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.snapshots.list
* @memberOf! ()
*
@@ -67114,6 +84922,67 @@ export namespace compute_v1 {
/**
* compute.snapshots.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.snapshots.setIamPolicy
* @memberOf! ()
*
@@ -67189,62 +85058,82 @@ export namespace compute_v1 {
* compute.snapshots.setLabels
* @desc Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.setLabels({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.snapshots.setLabels(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.snapshots.setLabels
* @memberOf! ()
*
@@ -67321,6 +85210,61 @@ export namespace compute_v1 {
/**
* compute.snapshots.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.snapshots.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.snapshots.testIamPermissions
* @memberOf! ()
*
@@ -67549,6 +85493,76 @@ export namespace compute_v1 {
/**
* compute.sslCertificates.aggregatedList
* @desc Retrieves the list of all SslCertificate resources, regional and global, available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslCertificates.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Name of the project scoping this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslCertificates.aggregatedList
* @memberOf! ()
*
@@ -67638,58 +85652,79 @@ export namespace compute_v1 {
* compute.sslCertificates.delete
* @desc Deletes the specified SslCertificate resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslCertificates.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the SslCertificate resource to delete.
- * sslCertificate: 'my-ssl-certificate', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.sslCertificates.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * sslCertificate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.sslCertificates.delete
* @memberOf! ()
*
@@ -67767,58 +85802,65 @@ export namespace compute_v1 {
* compute.sslCertificates.get
* @desc Returns the specified SslCertificate resource. Gets a list of available SSL certificates by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslCertificates.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the SslCertificate resource to return.
- * sslCertificate: 'my-ssl-certificate', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.sslCertificates.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * sslCertificate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "certificate": "my_certificate",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "managed": {},
+ * // "name": "my_name",
+ * // "privateKey": "my_privateKey",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfManaged": {},
+ * // "subjectAlternativeNames": [],
+ * // "type": "my_type"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.sslCertificates.get
* @memberOf! ()
*
@@ -67895,59 +85937,98 @@ export namespace compute_v1 {
* compute.sslCertificates.insert
* @desc Creates a SslCertificate resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslCertificates.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "certificate": "my_certificate",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "expireTime": "my_expireTime",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "managed": {},
+ * // "name": "my_name",
+ * // "privateKey": "my_privateKey",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "selfManaged": {},
+ * // "subjectAlternativeNames": [],
+ * // "type": "my_type"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.sslCertificates.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.sslCertificates.insert
* @memberOf! ()
*
@@ -68024,68 +86105,73 @@ export namespace compute_v1 {
* compute.sslCertificates.list
* @desc Retrieves the list of SslCertificate resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslCertificates.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.sslCertificates.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.sslCertificates.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.sslCertificates.list
* @memberOf! ()
*
@@ -68288,6 +86374,80 @@ export namespace compute_v1 {
/**
* compute.sslPolicies.delete
* @desc Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the SSL policy to delete. The name must be 1-63 characters long, and comply with RFC1035.
+ * sslPolicy: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.delete
* @memberOf! ()
*
@@ -68364,6 +86524,64 @@ export namespace compute_v1 {
/**
* compute.sslPolicies.get
* @desc Lists all of the ordered rules present in a single specified policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035.
+ * sslPolicy: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customFeatures": [],
+ * // "description": "my_description",
+ * // "enabledFeatures": [],
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "minTlsVersion": "my_minTlsVersion",
+ * // "name": "my_name",
+ * // "profile": "my_profile",
+ * // "selfLink": "my_selfLink",
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.get
* @memberOf! ()
*
@@ -68438,6 +86656,97 @@ export namespace compute_v1 {
/**
* compute.sslPolicies.insert
* @desc Returns the specified SSL policy resource. Gets a list of available SSL policies by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customFeatures": [],
+ * // "description": "my_description",
+ * // "enabledFeatures": [],
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "minTlsVersion": "my_minTlsVersion",
+ * // "name": "my_name",
+ * // "profile": "my_profile",
+ * // "selfLink": "my_selfLink",
+ * // "warnings": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.insert
* @memberOf! ()
*
@@ -68513,6 +86822,74 @@ export namespace compute_v1 {
/**
* compute.sslPolicies.list
* @desc Lists all the SSL policies that have been configured for the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.list
* @memberOf! ()
*
@@ -68589,6 +86966,69 @@ export namespace compute_v1 {
/**
* compute.sslPolicies.listAvailableFeatures
* @desc Lists all features that can be specified in the SSL policy when using custom profile.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.listAvailableFeatures({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "features": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.listAvailableFeatures
* @memberOf! ()
*
@@ -68684,6 +87124,99 @@ export namespace compute_v1 {
/**
* compute.sslPolicies.patch
* @desc Patches the specified SSL policy with the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.sslPolicies.patch({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035.
+ * sslPolicy: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "customFeatures": [],
+ * // "description": "my_description",
+ * // "enabledFeatures": [],
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "minTlsVersion": "my_minTlsVersion",
+ * // "name": "my_name",
+ * // "profile": "my_profile",
+ * // "selfLink": "my_selfLink",
+ * // "warnings": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.sslPolicies.patch
* @memberOf! ()
*
@@ -68906,68 +87439,75 @@ export namespace compute_v1 {
* compute.subnetworks.aggregatedList
* @desc Retrieves an aggregated list of subnetworks.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.subnetworks.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.subnetworks.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.aggregatedList
* @memberOf! ()
*
@@ -69051,61 +87591,81 @@ export namespace compute_v1 {
* compute.subnetworks.delete
* @desc Deletes the specified subnetwork.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the Subnetwork resource to delete.
- * subnetwork: 'my-subnetwork', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.subnetworks.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * subnetwork: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.delete
* @memberOf! ()
*
@@ -69184,65 +87744,89 @@ export namespace compute_v1 {
* compute.subnetworks.expandIpCidrRange
* @desc Expands the IP CIDR range of the subnetwork to a specified value.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.expandIpCidrRange({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the Subnetwork resource to update.
- * subnetwork: 'my-subnetwork', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * subnetwork: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "ipCidrRange": "my_ipCidrRange"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.subnetworks.expandIpCidrRange(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.expandIpCidrRange
* @memberOf! ()
*
@@ -69322,61 +87906,71 @@ export namespace compute_v1 {
* compute.subnetworks.get
* @desc Returns the specified subnetwork. Gets a list of available subnetworks list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* // Name of the Subnetwork resource to return.
- * subnetwork: 'my-subnetwork', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.subnetworks.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * subnetwork: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableFlowLogs": false,
+ * // "fingerprint": "my_fingerprint",
+ * // "gatewayAddress": "my_gatewayAddress",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "privateIpGoogleAccess": false,
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "role": "my_role",
+ * // "secondaryIpRanges": [],
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.get
* @memberOf! ()
*
@@ -69452,6 +88046,60 @@ export namespace compute_v1 {
/**
* compute.subnetworks.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.getIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.getIamPolicy
* @memberOf! ()
*
@@ -69527,62 +88175,104 @@ export namespace compute_v1 {
* compute.subnetworks.insert
* @desc Creates a subnetwork in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableFlowLogs": false,
+ * // "fingerprint": "my_fingerprint",
+ * // "gatewayAddress": "my_gatewayAddress",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "privateIpGoogleAccess": false,
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "role": "my_role",
+ * // "secondaryIpRanges": [],
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.subnetworks.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.insert
* @memberOf! ()
*
@@ -69661,71 +88351,75 @@ export namespace compute_v1 {
* compute.subnetworks.list
* @desc Retrieves a list of subnetworks available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.subnetworks.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.subnetworks.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.list
* @memberOf! ()
*
@@ -69804,6 +88498,74 @@ export namespace compute_v1 {
/**
* compute.subnetworks.listUsable
* @desc Retrieves an aggregated list of all usable subnetworks in the project. The list contains all of the subnetworks in the project and the subnetworks that were shared by a Shared VPC host project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.listUsable({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.listUsable
* @memberOf! ()
*
@@ -69891,6 +88653,109 @@ export namespace compute_v1 {
/**
* compute.subnetworks.patch
* @desc Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingerprint of the subnetwork resource being patched.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.patch({
+ * // The drain timeout specifies the upper bound in seconds on the amount of time allowed to drain connections from the current ACTIVE subnetwork to the current BACKUP subnetwork. The drain timeout is only applicable when the following conditions are true: - the subnetwork being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork being patched has role = BACKUP - the patch request is setting the role to ACTIVE. Note that after this patch operation the roles of the ACTIVE and BACKUP subnetworks will be swapped.
+ * drainTimeoutSeconds: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region scoping this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the Subnetwork resource to patch.
+ * subnetwork: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "enableFlowLogs": false,
+ * // "fingerprint": "my_fingerprint",
+ * // "gatewayAddress": "my_gatewayAddress",
+ * // "id": "my_id",
+ * // "ipCidrRange": "my_ipCidrRange",
+ * // "kind": "my_kind",
+ * // "logConfig": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "privateIpGoogleAccess": false,
+ * // "purpose": "my_purpose",
+ * // "region": "my_region",
+ * // "role": "my_role",
+ * // "secondaryIpRanges": [],
+ * // "selfLink": "my_selfLink",
+ * // "state": "my_state"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.patch
* @memberOf! ()
*
@@ -69970,6 +88835,69 @@ export namespace compute_v1 {
/**
* compute.subnetworks.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.setIamPolicy
* @memberOf! ()
*
@@ -70046,65 +88974,89 @@ export namespace compute_v1 {
* compute.subnetworks.setPrivateIpGoogleAccess
* @desc Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.setPrivateIpGoogleAccess({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the Subnetwork resource.
- * subnetwork: 'my-subnetwork', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * subnetwork: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "privateIpGoogleAccess": false
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.subnetworks.setPrivateIpGoogleAccess(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.subnetworks.setPrivateIpGoogleAccess
* @memberOf! ()
*
@@ -70185,6 +89137,63 @@ export namespace compute_v1 {
/**
* compute.subnetworks.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.subnetworks.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.subnetworks.testIamPermissions
* @memberOf! ()
*
@@ -70594,6 +89603,75 @@ export namespace compute_v1 {
/**
* compute.targetHttpProxies.aggregatedList
* @desc Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Name of the project scoping this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpProxies.aggregatedList
* @memberOf! ()
*
@@ -70683,58 +89761,79 @@ export namespace compute_v1 {
* compute.targetHttpProxies.delete
* @desc Deletes the specified TargetHttpProxy resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetHttpProxy resource to delete.
- * targetHttpProxy: 'my-target-http-proxy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpProxies.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpProxies.delete
* @memberOf! ()
*
@@ -70812,58 +89911,59 @@ export namespace compute_v1 {
* compute.targetHttpProxies.get
* @desc Returns the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the TargetHttpProxy resource to return.
- * targetHttpProxy: 'my-target-http-proxy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpProxies.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpProxies.get
* @memberOf! ()
*
@@ -70940,59 +90040,92 @@ export namespace compute_v1 {
* compute.targetHttpProxies.insert
* @desc Creates a TargetHttpProxy resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "urlMap": "my_urlMap"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpProxies.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpProxies.insert
* @memberOf! ()
*
@@ -71070,68 +90203,73 @@ export namespace compute_v1 {
* compute.targetHttpProxies.list
* @desc Retrieves the list of TargetHttpProxy resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetHttpProxies.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetHttpProxies.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpProxies.list
* @memberOf! ()
*
@@ -71211,62 +90349,87 @@ export namespace compute_v1 {
* compute.targetHttpProxies.setUrlMap
* @desc Changes the URL map for TargetHttpProxy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpProxies.setUrlMap({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetHttpProxy to set a URL map for.
- * targetHttpProxy: 'my-target-http-proxy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetHttpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "urlMap": "my_urlMap"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpProxies.setUrlMap(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpProxies.setUrlMap
* @memberOf! ()
*
@@ -71494,6 +90657,76 @@ export namespace compute_v1 {
/**
* compute.targetHttpsProxies.aggregatedList
* @desc Retrieves the list of all TargetHttpsProxy resources, regional and global, available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Name of the project scoping this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpsProxies.aggregatedList
* @memberOf! ()
*
@@ -71583,58 +90816,79 @@ export namespace compute_v1 {
* compute.targetHttpsProxies.delete
* @desc Deletes the specified TargetHttpsProxy resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetHttpsProxy resource to delete.
- * targetHttpsProxy: 'my-target-https-proxy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpsProxies.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpsProxies.delete
* @memberOf! ()
*
@@ -71712,58 +90966,62 @@ export namespace compute_v1 {
* compute.targetHttpsProxies.get
* @desc Returns the specified TargetHttpsProxy resource. Gets a list of available target HTTPS proxies by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the TargetHttpsProxy resource to return.
- * targetHttpsProxy: 'my-target-https-proxy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpsProxies.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "quicOverride": "my_quicOverride",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy",
+ * // "urlMap": "my_urlMap"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpsProxies.get
* @memberOf! ()
*
@@ -71840,59 +91098,95 @@ export namespace compute_v1 {
* compute.targetHttpsProxies.insert
* @desc Creates a TargetHttpsProxy resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "quicOverride": "my_quicOverride",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy",
+ * // "urlMap": "my_urlMap"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpsProxies.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpsProxies.insert
* @memberOf! ()
*
@@ -71970,68 +91264,73 @@ export namespace compute_v1 {
* compute.targetHttpsProxies.list
* @desc Retrieves the list of TargetHttpsProxy resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetHttpsProxies.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetHttpsProxies.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpsProxies.list
* @memberOf! ()
*
@@ -72112,6 +91411,88 @@ export namespace compute_v1 {
/**
* compute.targetHttpsProxies.setQuicOverride
* @desc Sets the QUIC override policy for TargetHttpsProxy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.setQuicOverride({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy resource to set the QUIC override policy for. The name should conform to RFC1035.
+ * targetHttpsProxy: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "quicOverride": "my_quicOverride"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpsProxies.setQuicOverride
* @memberOf! ()
*
@@ -72190,62 +91571,87 @@ export namespace compute_v1 {
* compute.targetHttpsProxies.setSslCertificates
* @desc Replaces SslCertificates for TargetHttpsProxy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.setSslCertificates({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetHttpsProxy resource to set an SslCertificates resource for.
- * targetHttpsProxy: 'my-target-https-proxy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sslCertificates": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpsProxies.setSslCertificates(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpsProxies.setSslCertificates
* @memberOf! ()
*
@@ -72323,6 +91729,88 @@ export namespace compute_v1 {
/**
* compute.targetHttpsProxies.setSslPolicy
* @desc Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.setSslPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetHttpsProxy resource whose SSL policy is to be set. The name must be 1-63 characters long, and comply with RFC1035.
+ * targetHttpsProxy: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sslPolicy": "my_sslPolicy"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetHttpsProxies.setSslPolicy
* @memberOf! ()
*
@@ -72401,62 +91889,87 @@ export namespace compute_v1 {
* compute.targetHttpsProxies.setUrlMap
* @desc Changes the URL map for TargetHttpsProxy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetHttpsProxies.setUrlMap({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetHttpsProxy resource whose URL map is to be set.
- * targetHttpsProxy: 'my-target-https-proxy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "urlMap": "my_urlMap"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetHttpsProxies.setUrlMap(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetHttpsProxies.setUrlMap
* @memberOf! ()
*
@@ -72760,68 +92273,75 @@ export namespace compute_v1 {
* compute.targetInstances.aggregatedList
* @desc Retrieves an aggregated list of target instances.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetInstances.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetInstances.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetInstances.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetInstances.aggregatedList
* @memberOf! ()
*
@@ -72911,61 +92431,81 @@ export namespace compute_v1 {
* compute.targetInstances.delete
* @desc Deletes the specified TargetInstance resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetInstances.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the zone scoping this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetInstance resource to delete.
- * targetInstance: 'my-target-instance', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetInstances.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetInstance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Name of the zone scoping this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetInstances.delete
* @memberOf! ()
*
@@ -73044,61 +92584,62 @@ export namespace compute_v1 {
* compute.targetInstances.get
* @desc Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetInstances.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the zone scoping this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the TargetInstance resource to return.
- * targetInstance: 'my-target-instance', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetInstances.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetInstance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Name of the zone scoping this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "instance": "my_instance",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "natPolicy": "my_natPolicy",
+ * // "selfLink": "my_selfLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetInstances.get
* @memberOf! ()
*
@@ -73176,62 +92717,95 @@ export namespace compute_v1 {
* compute.targetInstances.insert
* @desc Creates a TargetInstance resource in the specified project and zone using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetInstances.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the zone scoping this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "instance": "my_instance",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "natPolicy": "my_natPolicy",
+ * // "selfLink": "my_selfLink",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetInstances.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetInstances.insert
* @memberOf! ()
*
@@ -73310,71 +92884,75 @@ export namespace compute_v1 {
* compute.targetInstances.list
* @desc Retrieves a list of TargetInstance resources available to the specified project and zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetInstances.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the zone scoping this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetInstances.list(request, handlePage);
- * }
- * };
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetInstances.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetInstances.list
* @memberOf! ()
*
@@ -73596,65 +93174,89 @@ export namespace compute_v1 {
* compute.targetPools.addHealthCheck
* @desc Adds health check URLs to a target pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.addHealthCheck({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the target pool to add a health check to.
- * targetPool: 'my-target-pool', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "healthChecks": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetPools.addHealthCheck(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.addHealthCheck
* @memberOf! ()
*
@@ -73734,65 +93336,89 @@ export namespace compute_v1 {
* compute.targetPools.addInstance
* @desc Adds an instance to a target pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.addInstance({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetPool resource to add instances to.
- * targetPool: 'my-target-pool', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetPools.addInstance(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.addInstance
* @memberOf! ()
*
@@ -73872,68 +93498,75 @@ export namespace compute_v1 {
* compute.targetPools.aggregatedList
* @desc Retrieves an aggregated list of target pools.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetPools.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetPools.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.aggregatedList
* @memberOf! ()
*
@@ -74017,61 +93650,81 @@ export namespace compute_v1 {
* compute.targetPools.delete
* @desc Deletes the specified target pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetPool resource to delete.
- * targetPool: 'my-target-pool', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetPools.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.delete
* @memberOf! ()
*
@@ -74150,61 +93803,65 @@ export namespace compute_v1 {
* compute.targetPools.get
* @desc Returns the specified target pool. Gets a list of available target pools by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* // Name of the TargetPool resource to return.
- * targetPool: 'my-target-pool', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetPools.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "backupPool": "my_backupPool",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "failoverRatio": {},
+ * // "healthChecks": [],
+ * // "id": "my_id",
+ * // "instances": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.get
* @memberOf! ()
*
@@ -74281,65 +93938,63 @@ export namespace compute_v1 {
* compute.targetPools.getHealth
* @desc Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.getHealth({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* // Name of the TargetPool resource to which the queried instance belongs.
- * targetPool: 'my-target-pool', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instance": "my_instance"
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.targetPools.getHealth(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "healthStatus": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.getHealth
* @memberOf! ()
*
@@ -74422,62 +94077,98 @@ export namespace compute_v1 {
* compute.targetPools.insert
* @desc Creates a target pool in the specified project and region using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "backupPool": "my_backupPool",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "failoverRatio": {},
+ * // "healthChecks": [],
+ * // "id": "my_id",
+ * // "instances": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "sessionAffinity": "my_sessionAffinity"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetPools.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.insert
* @memberOf! ()
*
@@ -74556,71 +94247,75 @@ export namespace compute_v1 {
* compute.targetPools.list
* @desc Retrieves a list of target pools available to the specified project and region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetPools.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetPools.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.list
* @memberOf! ()
*
@@ -74700,65 +94395,89 @@ export namespace compute_v1 {
* compute.targetPools.removeHealthCheck
* @desc Removes health check URL from a target pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.removeHealthCheck({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the target pool to remove health checks from.
- * targetPool: 'my-target-pool', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "healthChecks": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetPools.removeHealthCheck(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.removeHealthCheck
* @memberOf! ()
*
@@ -74838,65 +94557,89 @@ export namespace compute_v1 {
* compute.targetPools.removeInstance
* @desc Removes instance URL from a target pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.removeInstance({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetPool resource to remove instances from.
- * targetPool: 'my-target-pool', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instances": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetPools.removeInstance(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.removeInstance
* @memberOf! ()
*
@@ -74976,65 +94719,91 @@ export namespace compute_v1 {
* compute.targetPools.setBackup
* @desc Changes a backup target pool's configurations.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetPools.setBackup({
+ * // New failoverRatio value for the target pool.
+ * failoverRatio: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region scoping this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetPool resource to set a backup pool for.
- * targetPool: 'my-target-pool', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetPool: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "target": "my_target"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetPools.setBackup(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetPools.setBackup
* @memberOf! ()
*
@@ -75428,58 +95197,79 @@ export namespace compute_v1 {
* compute.targetSslProxies.delete
* @desc Deletes the specified TargetSslProxy resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetSslProxy resource to delete.
- * targetSslProxy: 'my-target-ssl-proxy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetSslProxies.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetSslProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetSslProxies.delete
* @memberOf! ()
*
@@ -75557,58 +95347,61 @@ export namespace compute_v1 {
* compute.targetSslProxies.get
* @desc Returns the specified TargetSslProxy resource. Gets a list of available target SSL proxies by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the TargetSslProxy resource to return.
- * targetSslProxy: 'my-target-ssl-proxy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetSslProxies.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetSslProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyHeader": "my_proxyHeader",
+ * // "selfLink": "my_selfLink",
+ * // "service": "my_service",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetSslProxies.get
* @memberOf! ()
*
@@ -75685,59 +95478,94 @@ export namespace compute_v1 {
* compute.targetSslProxies.insert
* @desc Creates a TargetSslProxy resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyHeader": "my_proxyHeader",
+ * // "selfLink": "my_selfLink",
+ * // "service": "my_service",
+ * // "sslCertificates": [],
+ * // "sslPolicy": "my_sslPolicy"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetSslProxies.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetSslProxies.insert
* @memberOf! ()
*
@@ -75814,68 +95642,73 @@ export namespace compute_v1 {
* compute.targetSslProxies.list
* @desc Retrieves the list of TargetSslProxy resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetSslProxies.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetSslProxies.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetSslProxies.list
* @memberOf! ()
*
@@ -75954,62 +95787,87 @@ export namespace compute_v1 {
* compute.targetSslProxies.setBackendService
* @desc Changes the BackendService for TargetSslProxy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.setBackendService({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetSslProxy resource whose BackendService resource is to be set.
- * targetSslProxy: 'my-target-ssl-proxy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetSslProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "service": "my_service"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetSslProxies.setBackendService(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetSslProxies.setBackendService
* @memberOf! ()
*
@@ -76088,62 +95946,87 @@ export namespace compute_v1 {
* compute.targetSslProxies.setProxyHeader
* @desc Changes the ProxyHeaderType for TargetSslProxy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.setProxyHeader({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetSslProxy resource whose ProxyHeader is to be set.
- * targetSslProxy: 'my-target-ssl-proxy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetSslProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "proxyHeader": "my_proxyHeader"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetSslProxies.setProxyHeader(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetSslProxies.setProxyHeader
* @memberOf! ()
*
@@ -76222,62 +96105,87 @@ export namespace compute_v1 {
* compute.targetSslProxies.setSslCertificates
* @desc Changes SslCertificates for TargetSslProxy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.setSslCertificates({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetSslProxy resource whose SslCertificate resource is to be set.
- * targetSslProxy: 'my-target-ssl-proxy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetSslProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sslCertificates": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetSslProxies.setSslCertificates(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetSslProxies.setSslCertificates
* @memberOf! ()
*
@@ -76355,6 +96263,88 @@ export namespace compute_v1 {
/**
* compute.targetSslProxies.setSslPolicy
* @desc Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetSslProxies.setSslPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the TargetSslProxy resource whose SSL policy is to be set. The name must be 1-63 characters long, and comply with RFC1035.
+ * targetSslProxy: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "sslPolicy": "my_sslPolicy"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.targetSslProxies.setSslPolicy
* @memberOf! ()
*
@@ -76626,58 +96616,79 @@ export namespace compute_v1 {
* compute.targetTcpProxies.delete
* @desc Deletes the specified TargetTcpProxy resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetTcpProxy resource to delete.
- * targetTcpProxy: 'my-target-tcp-proxy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetTcpProxies.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetTcpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetTcpProxies.delete
* @memberOf! ()
*
@@ -76755,58 +96766,59 @@ export namespace compute_v1 {
* compute.targetTcpProxies.get
* @desc Returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the TargetTcpProxy resource to return.
- * targetTcpProxy: 'my-target-tcp-proxy', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetTcpProxies.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetTcpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyHeader": "my_proxyHeader",
+ * // "selfLink": "my_selfLink",
+ * // "service": "my_service"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetTcpProxies.get
* @memberOf! ()
*
@@ -76883,59 +96895,92 @@ export namespace compute_v1 {
* compute.targetTcpProxies.insert
* @desc Creates a TargetTcpProxy resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "proxyHeader": "my_proxyHeader",
+ * // "selfLink": "my_selfLink",
+ * // "service": "my_service"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetTcpProxies.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetTcpProxies.insert
* @memberOf! ()
*
@@ -77012,68 +97057,73 @@ export namespace compute_v1 {
* compute.targetTcpProxies.list
* @desc Retrieves the list of TargetTcpProxy resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetTcpProxies.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetTcpProxies.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetTcpProxies.list
* @memberOf! ()
*
@@ -77152,62 +97202,87 @@ export namespace compute_v1 {
* compute.targetTcpProxies.setBackendService
* @desc Changes the BackendService for TargetTcpProxy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.setBackendService({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetTcpProxy resource whose BackendService resource is to be set.
- * targetTcpProxy: 'my-target-tcp-proxy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetTcpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "service": "my_service"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetTcpProxies.setBackendService(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetTcpProxies.setBackendService
* @memberOf! ()
*
@@ -77286,62 +97361,87 @@ export namespace compute_v1 {
* compute.targetTcpProxies.setProxyHeader
* @desc Changes the ProxyHeaderType for TargetTcpProxy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetTcpProxies.setProxyHeader({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the TargetTcpProxy resource whose ProxyHeader is to be set.
- * targetTcpProxy: 'my-target-tcp-proxy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * targetTcpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "proxyHeader": "my_proxyHeader"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetTcpProxies.setProxyHeader(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetTcpProxies.setProxyHeader
* @memberOf! ()
*
@@ -77563,68 +97663,75 @@ export namespace compute_v1 {
* compute.targetVpnGateways.aggregatedList
* @desc Retrieves an aggregated list of target VPN gateways.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetVpnGateways.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetVpnGateways.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetVpnGateways.aggregatedList
* @memberOf! ()
*
@@ -77714,61 +97821,81 @@ export namespace compute_v1 {
* compute.targetVpnGateways.delete
* @desc Deletes the specified target VPN gateway.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the target VPN gateway to delete.
- * targetVpnGateway: 'my-target-vpn-gateway', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetVpnGateways.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetVpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetVpnGateways.delete
* @memberOf! ()
*
@@ -77847,61 +97974,64 @@ export namespace compute_v1 {
* compute.targetVpnGateways.get
* @desc Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* // Name of the target VPN gateway to return.
- * targetVpnGateway: 'my-target-vpn-gateway', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.targetVpnGateways.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * targetVpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "forwardingRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "tunnels": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetVpnGateways.get
* @memberOf! ()
*
@@ -77979,62 +98109,97 @@ export namespace compute_v1 {
* compute.targetVpnGateways.insert
* @desc Creates a target VPN gateway in the specified project and region using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "forwardingRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "tunnels": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.targetVpnGateways.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetVpnGateways.insert
* @memberOf! ()
*
@@ -78113,71 +98278,75 @@ export namespace compute_v1 {
* compute.targetVpnGateways.list
* @desc Retrieves a list of target VPN gateways available to the specified project and region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.targetVpnGateways.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.targetVpnGateways.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.targetVpnGateways.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.targetVpnGateways.list
* @memberOf! ()
*
@@ -78400,6 +98569,76 @@ export namespace compute_v1 {
/**
* compute.urlMaps.aggregatedList
* @desc Retrieves the list of all UrlMap resources, regional and global, available to the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Name of the project scoping this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.urlMaps.aggregatedList
* @memberOf! ()
*
@@ -78483,58 +98722,79 @@ export namespace compute_v1 {
* compute.urlMaps.delete
* @desc Deletes the specified UrlMap resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the UrlMap resource to delete.
- * urlMap: 'my-url-map', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.urlMaps.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.urlMaps.delete
* @memberOf! ()
*
@@ -78610,58 +98870,66 @@ export namespace compute_v1 {
* compute.urlMaps.get
* @desc Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the UrlMap resource to return.
- * urlMap: 'my-url-map', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.urlMaps.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.urlMaps.get
* @memberOf! ()
*
@@ -78734,59 +99002,99 @@ export namespace compute_v1 {
* compute.urlMaps.insert
* @desc Creates a UrlMap resource in the specified project using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.urlMaps.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.urlMaps.insert
* @memberOf! ()
*
@@ -78862,62 +99170,88 @@ export namespace compute_v1 {
* compute.urlMaps.invalidateCache
* @desc Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.invalidateCache({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the UrlMap scoping this request.
- * urlMap: 'my-url-map', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "host": "my_host",
+ * // "path": "my_path"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.urlMaps.invalidateCache(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.urlMaps.invalidateCache
* @memberOf! ()
*
@@ -78996,68 +99330,73 @@ export namespace compute_v1 {
* compute.urlMaps.list
* @desc Retrieves the list of UrlMap resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.urlMaps.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.urlMaps.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.urlMaps.list
* @memberOf! ()
*
@@ -79135,63 +99474,101 @@ export namespace compute_v1 {
* compute.urlMaps.patch
* @desc Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.patch({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the UrlMap resource to patch.
- * urlMap: 'my-url-map', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.urlMaps.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.urlMaps.patch
* @memberOf! ()
*
@@ -79268,63 +99645,101 @@ export namespace compute_v1 {
* compute.urlMaps.update
* @desc Updates the specified UrlMap resource with the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.update({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the UrlMap resource to update.
- * urlMap: 'my-url-map', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "defaultRouteAction": {},
+ * // "defaultService": "my_defaultService",
+ * // "defaultUrlRedirect": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "headerAction": {},
+ * // "hostRules": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "pathMatchers": [],
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "tests": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.urlMaps.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.urlMaps.update
* @memberOf! ()
*
@@ -79401,62 +99816,59 @@ export namespace compute_v1 {
* compute.urlMaps.validate
* @desc Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.urlMaps.validate({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the UrlMap resource to be validated as.
- * urlMap: 'my-url-map', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * urlMap: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "resource": {}
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * compute.urlMaps.validate(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "result": {}
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.urlMaps.validate
* @memberOf! ()
*
@@ -79750,6 +100162,76 @@ export namespace compute_v1 {
/**
* compute.vpnGateways.aggregatedList
* @desc Retrieves an aggregated list of VPN gateways.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.aggregatedList
* @memberOf! ()
*
@@ -79832,6 +100314,82 @@ export namespace compute_v1 {
/**
* compute.vpnGateways.delete
* @desc Deletes the specified VPN gateway.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.delete({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name of the VPN gateway to delete.
+ * vpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.delete
* @memberOf! ()
*
@@ -79909,6 +100467,65 @@ export namespace compute_v1 {
/**
* compute.vpnGateways.get
* @desc Returns the specified VPN gateway. Gets a list of available VPN gateways by making a list() request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.get({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the VPN gateway to return.
+ * vpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "vpnInterfaces": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.get
* @memberOf! ()
*
@@ -79984,6 +100601,55 @@ export namespace compute_v1 {
/**
* compute.vpnGateways.getStatus
* @desc Returns the status for the specified VPN gateway.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.getStatus({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name of the VPN gateway to return.
+ * vpnGateway: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "result": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.getStatus
* @memberOf! ()
*
@@ -80069,6 +100735,98 @@ export namespace compute_v1 {
/**
* compute.vpnGateways.insert
* @desc Creates a VPN gateway in the specified project and region using the data included in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.insert({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "vpnInterfaces": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.insert
* @memberOf! ()
*
@@ -80146,6 +100904,76 @@ export namespace compute_v1 {
/**
* compute.vpnGateways.list
* @desc Retrieves a list of VPN gateways available to the specified project and region.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.list
* @memberOf! ()
*
@@ -80224,6 +101052,91 @@ export namespace compute_v1 {
/**
* compute.vpnGateways.setLabels
* @desc Sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources documentation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.setLabels({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.setLabels
* @memberOf! ()
*
@@ -80302,6 +101215,63 @@ export namespace compute_v1 {
/**
* compute.vpnGateways.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnGateways.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the region for this request.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.vpnGateways.testIamPermissions
* @memberOf! ()
*
@@ -80597,68 +101567,75 @@ export namespace compute_v1 {
* compute.vpnTunnels.aggregatedList
* @desc Retrieves an aggregated list of VPN tunnels.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.aggregatedList({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
+ * includeAllScopes: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * Object.keys(itemsPage).forEach(function(name) {
- * // TODO: Change code below to process each `name` property:
- * console.log(name + ': ' + JSON.stringify(itemsPage[name], null, 2));
- * });
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.vpnTunnels.aggregatedList(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": {},
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.vpnTunnels.aggregatedList(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.vpnTunnels.aggregatedList
* @memberOf! ()
*
@@ -80742,61 +101719,81 @@ export namespace compute_v1 {
* compute.vpnTunnels.delete
* @desc Deletes the specified VpnTunnel resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.delete({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
* // Name of the VpnTunnel resource to delete.
- * vpnTunnel: 'my-vpn-tunnel', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.vpnTunnels.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * vpnTunnel: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.vpnTunnels.delete
* @memberOf! ()
*
@@ -80875,61 +101872,75 @@ export namespace compute_v1 {
* compute.vpnTunnels.get
* @desc Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* // Name of the VpnTunnel resource to return.
- * vpnTunnel: 'my-vpn-tunnel', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.vpnTunnels.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * vpnTunnel: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "detailedStatus": "my_detailedStatus",
+ * // "id": "my_id",
+ * // "ikeVersion": 0,
+ * // "kind": "my_kind",
+ * // "localTrafficSelector": [],
+ * // "name": "my_name",
+ * // "peerExternalGateway": "my_peerExternalGateway",
+ * // "peerExternalGatewayInterface": 0,
+ * // "peerGcpGateway": "my_peerGcpGateway",
+ * // "peerIp": "my_peerIp",
+ * // "region": "my_region",
+ * // "remoteTrafficSelector": [],
+ * // "router": "my_router",
+ * // "selfLink": "my_selfLink",
+ * // "sharedSecret": "my_sharedSecret",
+ * // "sharedSecretHash": "my_sharedSecretHash",
+ * // "status": "my_status",
+ * // "targetVpnGateway": "my_targetVpnGateway",
+ * // "vpnGateway": "my_vpnGateway",
+ * // "vpnGatewayInterface": 0
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.vpnTunnels.get
* @memberOf! ()
*
@@ -81006,62 +102017,108 @@ export namespace compute_v1 {
* compute.vpnTunnels.insert
* @desc Creates a VpnTunnel resource in the specified project and region using the data included in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.insert({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
+ * //
+ * // For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
+ * //
+ * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "detailedStatus": "my_detailedStatus",
+ * // "id": "my_id",
+ * // "ikeVersion": 0,
+ * // "kind": "my_kind",
+ * // "localTrafficSelector": [],
+ * // "name": "my_name",
+ * // "peerExternalGateway": "my_peerExternalGateway",
+ * // "peerExternalGatewayInterface": 0,
+ * // "peerGcpGateway": "my_peerGcpGateway",
+ * // "peerIp": "my_peerIp",
+ * // "region": "my_region",
+ * // "remoteTrafficSelector": [],
+ * // "router": "my_router",
+ * // "selfLink": "my_selfLink",
+ * // "sharedSecret": "my_sharedSecret",
+ * // "sharedSecretHash": "my_sharedSecretHash",
+ * // "status": "my_status",
+ * // "targetVpnGateway": "my_targetVpnGateway",
+ * // "vpnGateway": "my_vpnGateway",
+ * // "vpnGatewayInterface": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * compute.vpnTunnels.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.vpnTunnels.insert
* @memberOf! ()
*
@@ -81140,71 +102197,75 @@ export namespace compute_v1 {
* compute.vpnTunnels.list
* @desc Retrieves a list of VpnTunnel resources contained in the specified project and region.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.vpnTunnels.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the region for this request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.vpnTunnels.list(request, handlePage);
- * }
- * };
+ * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.vpnTunnels.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.vpnTunnels.list
* @memberOf! ()
*
@@ -81423,58 +102484,48 @@ export namespace compute_v1 {
* compute.zoneOperations.delete
* @desc Deletes the specified zone-specific Operations resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneOperations.delete({
+ * // Name of the Operations resource to delete.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the Operations resource to delete.
- * operation: 'my-operation', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.zoneOperations.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.zoneOperations.delete
* @memberOf! ()
*
@@ -81550,61 +102601,76 @@ export namespace compute_v1 {
* compute.zoneOperations.get
* @desc Retrieves the specified zone-specific Operations resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneOperations.get({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the zone for this request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * // Name of the Operations resource to return.
- * operation: 'my-operation', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.zoneOperations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.zoneOperations.get
* @memberOf! ()
*
@@ -81682,71 +102748,75 @@ export namespace compute_v1 {
* compute.zoneOperations.list
* @desc Retrieves a list of Operation resources contained within the specified zone.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneOperations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the zone for request.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.zoneOperations.list(request, handlePage);
- * }
- * };
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.zoneOperations.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.zoneOperations.list
* @memberOf! ()
*
@@ -81825,6 +102895,77 @@ export namespace compute_v1 {
/**
* compute.zoneOperations.wait
* @desc Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be `DONE` or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not `DONE`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zoneOperations.wait({
+ * // Name of the Operations resource to return.
+ * operation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name of the zone for this request.
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias compute.zoneOperations.wait
* @memberOf! ()
*
@@ -82002,58 +103143,61 @@ export namespace compute_v1 {
* compute.zones.get
* @desc Returns the specified Zone resource. Gets a list of available zones by making a list() request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zones.get({
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // Name of the zone resource to return.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * compute.zones.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "availableCpuPlatforms": [],
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "deprecated": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status"
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.zones.get
* @memberOf! ()
*
@@ -82126,68 +103270,73 @@ export namespace compute_v1 {
* compute.zones.list
* @desc Retrieves the list of Zone resources available to the specified project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Compute Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/compute
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var compute = google.compute('v1');
- *
- * authorize(function(authClient) {
- * var request = {
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/compute.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const compute = google.compute('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await compute.zones.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
+ * //
+ * // You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
* // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var itemsPage = response['items'];
- * if (!itemsPage) {
- * return;
- * }
- * for (var i = 0; i < itemsPage.length; i++) {
- * // TODO: Change code below to process each resource in `itemsPage`:
- * console.log(JSON.stringify(itemsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * compute.zones.list(request, handlePage);
- * }
- * };
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "selfLink": "my_selfLink",
+ * // "warning": {}
+ * // }
+ * }
*
- * compute.zones.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias compute.zones.list
* @memberOf! ()
*
diff --git a/src/apis/container/v1.ts b/src/apis/container/v1.ts
index 6320e35d299..5882e407c33 100644
--- a/src/apis/container/v1.ts
+++ b/src/apis/container/v1.ts
@@ -2108,65 +2108,60 @@ export namespace container_v1 {
* container.projects.aggregated.usableSubnetworks.list
* @desc Lists subnetworks that are usable for creating clusters in a project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The parent project where subnetworks are usable.
- * // Specified in the format 'projects/<'.
- * parent: 'projects/my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * var subnetworksPage = response['subnetworks'];
- * if (!subnetworksPage) {
- * return;
- * }
- * for (var i = 0; i < subnetworksPage.length; i++) {
- * // TODO: Change code below to process each resource in `subnetworksPage`:
- * console.log(JSON.stringify(subnetworksPage[i], null, 2));
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.aggregated.usableSubnetworks.list({
+ * // Filtering currently only supports equality on the networkProjectId and must
+ * // be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId`
+ * // is the project which owns the listed subnetworks. This defaults to the
+ * // parent project ID.
+ * filter: 'placeholder-value',
+ * // The max number of results per page that should be returned. If the number
+ * // of available results is larger than `page_size`, a `next_page_token` is
+ * // returned which can be used to get the next page of results in subsequent
+ * // requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * pageSize: 'placeholder-value',
+ * // Specifies a page token to use. Set this to the nextPageToken returned by
+ * // previous list requests to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The parent project where subnetworks are usable.
+ * // Specified in the format 'projects/x'.
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
*
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * container.projects.aggregated.usableSubnetworks.list(request, handlePage);
- * }
- * };
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "subnetworks": []
+ * // }
+ * }
*
- * container.projects.aggregated.usableSubnetworks.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.aggregated.usableSubnetworks.list
* @memberOf! ()
*
@@ -2291,52 +2286,59 @@ export namespace container_v1 {
* container.projects.locations.getServerConfig
* @desc Returns configuration info about the Google Kubernetes Engine service.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The name (project and location) of the server config to get,
- * // specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.getServerConfig
* @memberOf! ()
*
@@ -2450,56 +2452,70 @@ export namespace container_v1 {
* container.projects.locations.clusters.completeIpRotation
* @desc Completes master IP rotation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster id) of the cluster to complete IP
- * // rotation. Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.completeIpRotation
* @memberOf! ()
*
@@ -2576,56 +2592,70 @@ export namespace container_v1 {
* container.projects.locations.clusters.create
* @desc Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's [default network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The parent (project and location) where the cluster will be created.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.create
* @memberOf! ()
*
@@ -2702,52 +2732,71 @@ export namespace container_v1 {
* container.projects.locations.clusters.delete
* @desc Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster) of the cluster to delete.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.delete
* @memberOf! ()
*
@@ -2823,52 +2872,107 @@ export namespace container_v1 {
* container.projects.locations.clusters.get
* @desc Gets the details of a specific cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster) of the cluster to retrieve.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.get
* @memberOf! ()
*
@@ -2942,52 +3046,47 @@ export namespace container_v1 {
* container.projects.locations.clusters.getJwks
* @desc Gets the public component of the cluster signing keys in JSON Web Key format. This API is not yet intended for general use, and is not available for all clusters.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The cluster (project, location, cluster id) to get keys for. Specified in
- * // the format 'projects/ {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {
+ * // "cacheHeader": {},
+ * // "keys": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.getJwks
* @memberOf! ()
*
@@ -3064,53 +3163,57 @@ export namespace container_v1 {
* container.projects.locations.clusters.list
* @desc Lists all clusters owned by a project in either the specified zone or all zones.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.list({
* // The parent (project and location) where the clusters will be listed.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.list
* @memberOf! ()
*
@@ -3190,56 +3293,71 @@ export namespace container_v1 {
* container.projects.locations.clusters.setAddons
* @desc Sets the addons for a specific cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster) of the cluster to set addons.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.setAddons
* @memberOf! ()
*
@@ -3316,56 +3434,71 @@ export namespace container_v1 {
* container.projects.locations.clusters.setLegacyAbac
* @desc Enables or disables the ABAC authorization mechanism on a cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster id) of the cluster to set legacy abac.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.setLegacyAbac
* @memberOf! ()
*
@@ -3442,56 +3575,71 @@ export namespace container_v1 {
* container.projects.locations.clusters.setLocations
* @desc Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) instead.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster) of the cluster to set locations.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.setLocations
* @memberOf! ()
*
@@ -3568,56 +3716,71 @@ export namespace container_v1 {
* container.projects.locations.clusters.setLogging
* @desc Sets the logging service for a specific cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster) of the cluster to set logging.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.setLogging
* @memberOf! ()
*
@@ -3694,57 +3857,72 @@ export namespace container_v1 {
* container.projects.locations.clusters.setMaintenancePolicy
* @desc Sets the maintenance policy for a cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.setMaintenancePolicy({
* // The name (project, location, cluster id) of the cluster to set maintenance
* // policy.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.setMaintenancePolicy
* @memberOf! ()
*
@@ -3823,56 +4001,72 @@ export namespace container_v1 {
* container.projects.locations.clusters.setMasterAuth
* @desc Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster) of the cluster to set auth.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.setMasterAuth
* @memberOf! ()
*
@@ -3949,56 +4143,71 @@ export namespace container_v1 {
* container.projects.locations.clusters.setMonitoring
* @desc Sets the monitoring service for a specific cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster) of the cluster to set monitoring.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.setMonitoring
* @memberOf! ()
*
@@ -4075,56 +4284,71 @@ export namespace container_v1 {
* container.projects.locations.clusters.setNetworkPolicy
* @desc Enables or disables Network Policy for a cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster id) of the cluster to set networking
- * // policy. Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.setNetworkPolicy
* @memberOf! ()
*
@@ -4201,56 +4425,72 @@ export namespace container_v1 {
* container.projects.locations.clusters.setResourceLabels
* @desc Sets labels on a cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster id) of the cluster to set labels.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.setResourceLabels
* @memberOf! ()
*
@@ -4327,56 +4567,71 @@ export namespace container_v1 {
* container.projects.locations.clusters.startIpRotation
* @desc Starts master IP rotation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster id) of the cluster to start IP
- * // rotation. Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.startIpRotation
* @memberOf! ()
*
@@ -4453,57 +4708,71 @@ export namespace container_v1 {
* container.projects.locations.clusters.update
* @desc Updates the settings of a specific cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster) of the cluster to update.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.update
* @memberOf! ()
*
@@ -4577,56 +4846,71 @@ export namespace container_v1 {
* container.projects.locations.clusters.updateMaster
* @desc Updates the master for a specific cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster) of the cluster to update.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.updateMaster
* @memberOf! ()
*
@@ -5029,57 +5313,72 @@ export namespace container_v1 {
* container.projects.locations.clusters.nodePools.create
* @desc Creates a node pool for a cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.nodePools.create({
* // The parent (project, location, cluster id) where the node pool will be
* // created. Specified in the format
- * // 'projects/ {
+ * console.error(e);
+ * throw e;
+ * });
*
- * container.projects.locations.clusters.nodePools.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
- * });
- *
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.nodePools.create
* @memberOf! ()
*
@@ -5156,53 +5455,76 @@ export namespace container_v1 {
* container.projects.locations.clusters.nodePools.delete
* @desc Deletes a node pool from a cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster, node pool id) of the node pool to
- * // delete. Specified in the format
- * // 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.nodePools.delete
* @memberOf! ()
*
@@ -5279,53 +5601,77 @@ export namespace container_v1 {
* container.projects.locations.clusters.nodePools.get
* @desc Retrieves the requested node pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster, node pool id) of the node pool to
- * // get. Specified in the format
- * // 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.nodePools.get
* @memberOf! ()
*
@@ -5400,52 +5746,58 @@ export namespace container_v1 {
* container.projects.locations.clusters.nodePools.list
* @desc Lists the node pools for a cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The parent (project, location, cluster id) where the node pools will be
- * // listed. Specified in the format 'projects/ {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {
+ * // "nodePools": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.nodePools.list
* @memberOf! ()
*
@@ -5526,57 +5878,73 @@ export namespace container_v1 {
* container.projects.locations.clusters.nodePools.rollback
* @desc Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.nodePools.rollback({
* // The name (project, location, cluster, node pool id) of the node poll to
* // rollback upgrade.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.nodePools.rollback
* @memberOf! ()
*
@@ -5653,57 +6021,76 @@ export namespace container_v1 {
* container.projects.locations.clusters.nodePools.setAutoscaling
* @desc Sets the autoscaling settings for the specified node pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster, node pool) of the node pool to set
- * // autoscaler settings. Specified in the format
- * // 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.nodePools.setAutoscaling
* @memberOf! ()
*
@@ -5780,57 +6167,76 @@ export namespace container_v1 {
* container.projects.locations.clusters.nodePools.setManagement
* @desc Sets the NodeManagement options for a node pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, cluster, node pool id) of the node pool to set
- * // management properties. Specified in the format
- * // 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.nodePools.setManagement
* @memberOf! ()
*
@@ -5907,57 +6313,74 @@ export namespace container_v1 {
* container.projects.locations.clusters.nodePools.setSize
* @desc Sets the size for a specific node pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.nodePools.setSize({
* // The name (project, location, cluster, node pool id) of the node pool to set
* // size.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.nodePools.setSize
* @memberOf! ()
*
@@ -6034,58 +6457,78 @@ export namespace container_v1 {
* container.projects.locations.clusters.nodePools.update
* @desc Updates the version and/or image type for the specified node pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * authorize(function(authClient) {
- * var request = {
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.nodePools.update({
* // The name (project, location, cluster, node pool) of the node pool to
* // update. Specified in the format
- * // 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.nodePools.update
* @memberOf! ()
*
@@ -6349,52 +6792,56 @@ export namespace container_v1 {
* container.projects.locations.clusters.well-known.getOpenid-configuration
* @desc Gets the OIDC discovery document for the cluster. See the [OpenID Connect Discovery 1.0 specification](https://openid.net/specs/openid-connect-discovery-1_0.html) for details. This API is not yet intended for general use, and is not available for all clusters.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The cluster (project, location, cluster id) to get the discovery document
- * // for. Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.clusters.well-known.getOpenid-configuration
* @memberOf! ()
*
@@ -6493,53 +6940,55 @@ export namespace container_v1 {
* container.projects.locations.operations.cancel
* @desc Cancels the specified operation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, operation id) of the operation to cancel.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.operations.cancel
* @memberOf! ()
*
@@ -6611,52 +7060,71 @@ export namespace container_v1 {
* container.projects.locations.operations.get
* @desc Gets the specified operation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The name (project, location, operation id) of the operation to get.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.operations.get
* @memberOf! ()
*
@@ -6732,53 +7200,57 @@ export namespace container_v1 {
* container.projects.locations.operations.list
* @desc Lists all operations in a project in a specific zone or all zones.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.operations.list({
* // The parent (project and location) where the operations will be listed.
- * // Specified in the format 'projects/ {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.locations.operations.list
* @memberOf! ()
*
@@ -6931,58 +7403,59 @@ export namespace container_v1 {
* container.projects.zones.getServerconfig
* @desc Returns configuration info about the Google Kubernetes Engine service.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.getServerconfig({
+ * // The name (project and location) of the server config to get,
+ * // specified in the format 'projects/x/locations/x'.
+ * name: 'placeholder-value',
* // Deprecated. The Google Developers Console [project ID or project
* // number](https://support.google.com/cloud/answer/6158840).
* // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
+ * projectId: 'placeholder-value',
* // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) to return operations for.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.getServerconfig(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) to return
+ * // operations for. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "defaultClusterVersion": "my_defaultClusterVersion",
+ * // "defaultImageType": "my_defaultImageType",
+ * // "validImageTypes": [],
+ * // "validMasterVersions": [],
+ * // "validNodeVersions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.getServerconfig
* @memberOf! ()
*
@@ -7091,67 +7564,80 @@ export namespace container_v1 {
* container.projects.zones.clusters.addons
* @desc Sets the addons for a specific cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.addons({
* // Deprecated. The name of the cluster to upgrade.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * clusterId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "addonsConfig": {},
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.addons(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.addons
* @memberOf! ()
*
@@ -7230,67 +7716,79 @@ export namespace container_v1 {
* container.projects.zones.clusters.completeIpRotation
* @desc Completes master IP rotation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://developers.google.com/console/help/new/#projectnumber).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.completeIpRotation({
* // Deprecated. The name of the cluster.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * clusterId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.completeIpRotation(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.completeIpRotation
* @memberOf! ()
*
@@ -7369,63 +7867,76 @@ export namespace container_v1 {
* container.projects.zones.clusters.create
* @desc Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's [default network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.create({
* // Deprecated. The Google Developers Console [project ID or project
* // number](https://support.google.com/cloud/answer/6158840).
* // This field has been deprecated and replaced by the parent field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
+ * projectId: 'placeholder-value',
* // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the parent field.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the parent
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "cluster": {},
+ * // "parent": "my_parent",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.create
* @memberOf! ()
*
@@ -7502,63 +8013,71 @@ export namespace container_v1 {
* container.projects.zones.clusters.delete
* @desc Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.delete({
* // Deprecated. The name of the cluster to delete.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * clusterId: 'placeholder-value',
+ * // The name (project, location, cluster) of the cluster to delete.
+ * // Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.delete
* @memberOf! ()
*
@@ -7637,63 +8156,107 @@ export namespace container_v1 {
* container.projects.zones.clusters.get
* @desc Gets the details of a specific cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.get({
* // Deprecated. The name of the cluster to retrieve.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * clusterId: 'placeholder-value',
+ * // The name (project, location, cluster) of the cluster to retrieve.
+ * // Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "addonsConfig": {},
+ * // "authenticatorGroupsConfig": {},
+ * // "autoscaling": {},
+ * // "binaryAuthorization": {},
+ * // "clusterIpv4Cidr": "my_clusterIpv4Cidr",
+ * // "conditions": [],
+ * // "createTime": "my_createTime",
+ * // "currentMasterVersion": "my_currentMasterVersion",
+ * // "currentNodeCount": 0,
+ * // "currentNodeVersion": "my_currentNodeVersion",
+ * // "databaseEncryption": {},
+ * // "defaultMaxPodsConstraint": {},
+ * // "description": "my_description",
+ * // "enableKubernetesAlpha": false,
+ * // "enableTpu": false,
+ * // "endpoint": "my_endpoint",
+ * // "expireTime": "my_expireTime",
+ * // "initialClusterVersion": "my_initialClusterVersion",
+ * // "initialNodeCount": 0,
+ * // "instanceGroupUrls": [],
+ * // "ipAllocationPolicy": {},
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "legacyAbac": {},
+ * // "location": "my_location",
+ * // "locations": [],
+ * // "loggingService": "my_loggingService",
+ * // "maintenancePolicy": {},
+ * // "masterAuth": {},
+ * // "masterAuthorizedNetworksConfig": {},
+ * // "monitoringService": "my_monitoringService",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkConfig": {},
+ * // "networkPolicy": {},
+ * // "nodeConfig": {},
+ * // "nodeIpv4CidrSize": 0,
+ * // "nodePools": [],
+ * // "privateClusterConfig": {},
+ * // "resourceLabels": {},
+ * // "resourceUsageExportConfig": {},
+ * // "selfLink": "my_selfLink",
+ * // "servicesIpv4Cidr": "my_servicesIpv4Cidr",
+ * // "shieldedNodes": {},
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "subnetwork": "my_subnetwork",
+ * // "tpuIpv4CidrBlock": "my_tpuIpv4CidrBlock",
+ * // "verticalPodAutoscaling": {},
+ * // "workloadIdentityConfig": {},
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.get
* @memberOf! ()
*
@@ -7770,67 +8333,80 @@ export namespace container_v1 {
* container.projects.zones.clusters.legacyAbac
* @desc Enables or disables the ABAC authorization mechanism on a cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.legacyAbac({
* // Deprecated. The name of the cluster to update.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * clusterId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "enabled": false,
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.legacyAbac(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.legacyAbac
* @memberOf! ()
*
@@ -7909,59 +8485,57 @@ export namespace container_v1 {
* container.projects.zones.clusters.list
* @desc Lists all clusters owned by a project in either the specified zone or all zones.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.list({
+ * // The parent (project and location) where the clusters will be listed.
+ * // Specified in the format 'projects/x/locations/x'.
+ * // Location "-" matches all zones and all regions.
+ * parent: 'placeholder-value',
* // Deprecated. The Google Developers Console [project ID or project
* // number](https://support.google.com/cloud/answer/6158840).
* // This field has been deprecated and replaced by the parent field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
+ * projectId: 'placeholder-value',
* // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides, or "-" for all zones.
- * // This field has been deprecated and replaced by the parent field.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides, or "-" for all zones. This field has been deprecated and
+ * // replaced by the parent field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * container.projects.zones.clusters.list(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "clusters": [],
+ * // "missingZones": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.list
* @memberOf! ()
*
@@ -8040,67 +8614,80 @@ export namespace container_v1 {
* container.projects.zones.clusters.locations
* @desc Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) instead.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.locations({
* // Deprecated. The name of the cluster to upgrade.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * clusterId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "locations": [],
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.locations(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.locations
* @memberOf! ()
*
@@ -8179,67 +8766,80 @@ export namespace container_v1 {
* container.projects.zones.clusters.logging
* @desc Sets the logging service for a specific cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.logging({
* // Deprecated. The name of the cluster to upgrade.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * clusterId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "loggingService": "my_loggingService",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.logging(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.logging
* @memberOf! ()
*
@@ -8318,67 +8918,80 @@ export namespace container_v1 {
* container.projects.zones.clusters.master
* @desc Updates the master for a specific cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.master({
* // Deprecated. The name of the cluster to upgrade.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * clusterId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "masterVersion": "my_masterVersion",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.master(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.master
* @memberOf! ()
*
@@ -8457,67 +9070,80 @@ export namespace container_v1 {
* container.projects.zones.clusters.monitoring
* @desc Sets the monitoring service for a specific cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.monitoring({
* // Deprecated. The name of the cluster to upgrade.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * clusterId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "monitoringService": "my_monitoringService",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.monitoring(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.monitoring
* @memberOf! ()
*
@@ -8596,67 +9222,81 @@ export namespace container_v1 {
* container.projects.zones.clusters.resourceLabels
* @desc Sets labels on a cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://developers.google.com/console/help/new/#projectnumber).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.resourceLabels({
* // Deprecated. The name of the cluster.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * clusterId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "resourceLabels": {},
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.resourceLabels(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.resourceLabels
* @memberOf! ()
*
@@ -8735,64 +9375,77 @@ export namespace container_v1 {
* container.projects.zones.clusters.setMaintenancePolicy
* @desc Sets the maintenance policy for a cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * // The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // The name of the cluster to update.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.setMaintenancePolicy({
+ * // Required. The name of the cluster to update.
+ * clusterId: 'placeholder-value',
+ * // Required. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * projectId: 'placeholder-value',
+ * // Required. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "maintenancePolicy": {},
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.setMaintenancePolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.setMaintenancePolicy
* @memberOf! ()
*
@@ -8873,67 +9526,81 @@ export namespace container_v1 {
* container.projects.zones.clusters.setMasterAuth
* @desc Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.setMasterAuth({
* // Deprecated. The name of the cluster to upgrade.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * clusterId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "update": {},
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.setMasterAuth(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.setMasterAuth
* @memberOf! ()
*
@@ -9012,67 +9679,80 @@ export namespace container_v1 {
* container.projects.zones.clusters.setNetworkPolicy
* @desc Enables or disables Network Policy for a cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://developers.google.com/console/help/new/#projectnumber).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.setNetworkPolicy({
* // Deprecated. The name of the cluster.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * clusterId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "networkPolicy": {},
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.setNetworkPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.setNetworkPolicy
* @memberOf! ()
*
@@ -9151,67 +9831,80 @@ export namespace container_v1 {
* container.projects.zones.clusters.startIpRotation
* @desc Starts master IP rotation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://developers.google.com/console/help/new/#projectnumber).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.startIpRotation({
* // Deprecated. The name of the cluster.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * clusterId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "rotateCredentials": false,
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.startIpRotation(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.startIpRotation
* @memberOf! ()
*
@@ -9290,68 +9983,80 @@ export namespace container_v1 {
* container.projects.zones.clusters.update
* @desc Updates the settings of a specific cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.update({
* // Deprecated. The name of the cluster to upgrade.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * clusterId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "update": {},
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.update
* @memberOf! ()
*
@@ -9852,71 +10557,84 @@ export namespace container_v1 {
* container.projects.zones.clusters.nodePools.autoscaling
* @desc Sets the autoscaling settings for the specified node pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.autoscaling({
* // Deprecated. The name of the cluster to upgrade.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
+ * clusterId: 'placeholder-value',
* // Deprecated. The name of the node pool to upgrade.
* // This field has been deprecated and replaced by the name field.
- * nodePoolId: 'my-node-pool-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * nodePoolId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscaling": {},
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "nodePoolId": "my_nodePoolId",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.nodePools.autoscaling(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.nodePools.autoscaling
* @memberOf! ()
*
@@ -9996,67 +10714,80 @@ export namespace container_v1 {
* container.projects.zones.clusters.nodePools.create
* @desc Creates a node pool for a cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://developers.google.com/console/help/new/#projectnumber).
- * // This field has been deprecated and replaced by the parent field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the parent field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.create({
* // Deprecated. The name of the cluster.
* // This field has been deprecated and replaced by the parent field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * clusterId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the parent field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the parent
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "nodePool": {},
+ * // "parent": "my_parent",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.nodePools.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.nodePools.create
* @memberOf! ()
*
@@ -10135,67 +10866,75 @@ export namespace container_v1 {
* container.projects.zones.clusters.nodePools.delete
* @desc Deletes a node pool from a cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://developers.google.com/console/help/new/#projectnumber).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.delete({
* // Deprecated. The name of the cluster.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
+ * clusterId: 'placeholder-value',
+ * // The name (project, location, cluster, node pool id) of the node pool to
+ * // delete. Specified in the format
+ * // 'projects/x/locations/x/clusters/x/nodePools/x'.
+ * name: 'placeholder-value',
* // Deprecated. The name of the node pool to delete.
* // This field has been deprecated and replaced by the name field.
- * nodePoolId: 'my-node-pool-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.nodePools.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * nodePoolId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.nodePools.delete
* @memberOf! ()
*
@@ -10275,67 +11014,76 @@ export namespace container_v1 {
* container.projects.zones.clusters.nodePools.get
* @desc Retrieves the requested node pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://developers.google.com/console/help/new/#projectnumber).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.get({
* // Deprecated. The name of the cluster.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
+ * clusterId: 'placeholder-value',
+ * // The name (project, location, cluster, node pool id) of the node pool to
+ * // get. Specified in the format
+ * // 'projects/x/locations/x/clusters/x/nodePools/x'.
+ * name: 'placeholder-value',
* // Deprecated. The name of the node pool.
* // This field has been deprecated and replaced by the name field.
- * nodePoolId: 'my-node-pool-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.nodePools.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * nodePoolId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoscaling": {},
+ * // "conditions": [],
+ * // "config": {},
+ * // "initialNodeCount": 0,
+ * // "instanceGroupUrls": [],
+ * // "locations": [],
+ * // "management": {},
+ * // "maxPodsConstraint": {},
+ * // "name": "my_name",
+ * // "podIpv4CidrSize": 0,
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "upgradeSettings": {},
+ * // "version": "my_version"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.nodePools.get
* @memberOf! ()
*
@@ -10413,63 +11161,58 @@ export namespace container_v1 {
* container.projects.zones.clusters.nodePools.list
* @desc Lists the node pools for a cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://developers.google.com/console/help/new/#projectnumber).
- * // This field has been deprecated and replaced by the parent field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the parent field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.list({
* // Deprecated. The name of the cluster.
* // This field has been deprecated and replaced by the parent field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * clusterId: 'placeholder-value',
+ * // The parent (project, location, cluster id) where the node pools will be
+ * // listed. Specified in the format 'projects/x/locations/x/clusters/x'.
+ * parent: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the parent field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the parent
+ * // field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * container.projects.zones.clusters.nodePools.list(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "nodePools": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.nodePools.list
* @memberOf! ()
*
@@ -10550,71 +11293,83 @@ export namespace container_v1 {
* container.projects.zones.clusters.nodePools.rollback
* @desc Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.rollback({
* // Deprecated. The name of the cluster to rollback.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
+ * clusterId: 'placeholder-value',
* // Deprecated. The name of the node pool to rollback.
* // This field has been deprecated and replaced by the name field.
- * nodePoolId: 'my-node-pool-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * nodePoolId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "nodePoolId": "my_nodePoolId",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.nodePools.rollback(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.nodePools.rollback
* @memberOf! ()
*
@@ -10694,71 +11449,84 @@ export namespace container_v1 {
* container.projects.zones.clusters.nodePools.setManagement
* @desc Sets the NodeManagement options for a node pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.setManagement({
* // Deprecated. The name of the cluster to update.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
+ * clusterId: 'placeholder-value',
* // Deprecated. The name of the node pool to update.
* // This field has been deprecated and replaced by the name field.
- * nodePoolId: 'my-node-pool-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * nodePoolId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "management": {},
+ * // "name": "my_name",
+ * // "nodePoolId": "my_nodePoolId",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.nodePools.setManagement(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.nodePools.setManagement
* @memberOf! ()
*
@@ -10838,71 +11606,84 @@ export namespace container_v1 {
* container.projects.zones.clusters.nodePools.setSize
* @desc Sets the size for a specific node pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.setSize({
* // Deprecated. The name of the cluster to update.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
+ * clusterId: 'placeholder-value',
* // Deprecated. The name of the node pool to update.
* // This field has been deprecated and replaced by the name field.
- * nodePoolId: 'my-node-pool-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * nodePoolId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "nodeCount": 0,
+ * // "nodePoolId": "my_nodePoolId",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.nodePools.setSize(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.nodePools.setSize
* @memberOf! ()
*
@@ -10982,71 +11763,88 @@ export namespace container_v1 {
* container.projects.zones.clusters.nodePools.update
* @desc Updates the version and/or image type for the specified node pool.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.update({
* // Deprecated. The name of the cluster to upgrade.
* // This field has been deprecated and replaced by the name field.
- * clusterId: 'my-cluster-id', // TODO: Update placeholder value.
- *
+ * clusterId: 'placeholder-value',
* // Deprecated. The name of the node pool to upgrade.
* // This field has been deprecated and replaced by the name field.
- * nodePoolId: 'my-node-pool-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * nodePoolId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "imageType": "my_imageType",
+ * // "locations": [],
+ * // "name": "my_name",
+ * // "nodePoolId": "my_nodePoolId",
+ * // "nodeVersion": "my_nodeVersion",
+ * // "projectId": "my_projectId",
+ * // "upgradeSettings": {},
+ * // "workloadMetadataConfig": {},
+ * // "zone": "my_zone"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.clusters.nodePools.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.clusters.nodePools.update
* @memberOf! ()
*
@@ -11384,63 +12182,64 @@ export namespace container_v1 {
* container.projects.zones.operations.cancel
* @desc Cancels the specified operation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the operation resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.operations.cancel({
* // Deprecated. The server-assigned `name` of the operation.
* // This field has been deprecated and replaced by the name field.
- * operationId: 'my-operation-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * operationId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // operation resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "name": "my_name",
+ * // "operationId": "my_operationId",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
+ * // Example response
+ * // {}
+ * }
*
- * container.projects.zones.operations.cancel(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.operations.cancel
* @memberOf! ()
*
@@ -11517,63 +12316,71 @@ export namespace container_v1 {
* container.projects.zones.operations.get
* @desc Gets the specified operation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Deprecated. The Google Developers Console [project ID or project
- * // number](https://support.google.com/cloud/answer/6158840).
- * // This field has been deprecated and replaced by the name field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) in which the cluster
- * // resides.
- * // This field has been deprecated and replaced by the name field.
- * zone: 'my-zone', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await container.projects.zones.operations.get({
+ * // The name (project, location, operation id) of the operation to get.
+ * // Specified in the format 'projects/x/locations/x/operations/x'.
+ * name: 'placeholder-value',
* // Deprecated. The server-assigned `name` of the operation.
* // This field has been deprecated and replaced by the name field.
- * operationId: 'my-operation-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * container.projects.zones.operations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * operationId: 'placeholder-value',
+ * // Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.operations.get
* @memberOf! ()
*
@@ -11652,58 +12459,57 @@ export namespace container_v1 {
* container.projects.zones.operations.list
* @desc Lists all operations in a project in a specific zone or all zones.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Kubernetes Engine API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/container
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var container = google.container('v1');
+ * const container = google.container('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * authorize(function(authClient) {
- * var request = {
+ * // Do the magic
+ * const res = await container.projects.zones.operations.list({
+ * // The parent (project and location) where the operations will be listed.
+ * // Specified in the format 'projects/x/locations/x'.
+ * // Location "-" matches all zones and all regions.
+ * parent: 'placeholder-value',
* // Deprecated. The Google Developers Console [project ID or project
* // number](https://support.google.com/cloud/answer/6158840).
* // This field has been deprecated and replaced by the parent field.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
+ * projectId: 'placeholder-value',
* // Deprecated. The name of the Google Compute Engine
- * // [zone](/compute/docs/zones#available) to return operations for, or `-` for
- * // all zones. This field has been deprecated and replaced by the parent field.
- * zone: 'my-zone', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) to return
+ * // operations for, or `-` for all zones. This field has been deprecated and
+ * // replaced by the parent field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * container.projects.zones.operations.list(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "missingZones": [],
+ * // "operations": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias container.projects.zones.operations.list
* @memberOf! ()
*
diff --git a/src/apis/container/v1beta1.ts b/src/apis/container/v1beta1.ts
index dced4bff273..82d95b2196a 100644
--- a/src/apis/container/v1beta1.ts
+++ b/src/apis/container/v1beta1.ts
@@ -2370,6 +2370,61 @@ export namespace container_v1beta1 {
/**
* container.projects.aggregated.usableSubnetworks.list
* @desc Lists subnetworks that can be used for creating clusters in a project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.aggregated.usableSubnetworks.list({
+ * // Filtering currently only supports equality on the networkProjectId and must
+ * // be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId`
+ * // is the project which owns the listed subnetworks. This defaults to the
+ * // parent project ID.
+ * filter: 'placeholder-value',
+ * // The max number of results per page that should be returned. If the number
+ * // of available results is larger than `page_size`, a `next_page_token` is
+ * // returned which can be used to get the next page of results in subsequent
+ * // requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * pageSize: 'placeholder-value',
+ * // Specifies a page token to use. Set this to the nextPageToken returned by
+ * // previous list requests to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Required. The parent project where subnetworks are usable.
+ * // Specified in the format 'projects/x'.
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "subnetworks": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.aggregated.usableSubnetworks.list
* @memberOf! ()
*
@@ -2493,6 +2548,61 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.getServerConfig
* @desc Returns configuration info about the Google Kubernetes Engine service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.getServerConfig({
+ * // The name (project and location) of the server config to get,
+ * // specified in the format 'projects/x/locations/x'.
+ * name: 'projects/my-project/locations/my-location',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) to return
+ * // operations for. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "channels": [],
+ * // "defaultClusterVersion": "my_defaultClusterVersion",
+ * // "defaultImageType": "my_defaultImageType",
+ * // "validImageTypes": [],
+ * // "validMasterVersions": [],
+ * // "validNodeVersions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.getServerConfig
* @memberOf! ()
*
@@ -2569,6 +2679,48 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.list
* @desc Fetches locations that offer Google Kubernetes Engine.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.list({
+ * // Required. Contains the name of the resource requested.
+ * // Specified in the format 'projects/x'.
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "locations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.list
* @memberOf! ()
*
@@ -2693,6 +2845,71 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.completeIpRotation
* @desc Completes master IP rotation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.completeIpRotation({
+ * // The name (project, location, cluster id) of the cluster to complete IP
+ * // rotation. Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.completeIpRotation
* @memberOf! ()
*
@@ -2768,6 +2985,71 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.create
* @desc Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's [default network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.create({
+ * // The parent (project and location) where the cluster will be created.
+ * // Specified in the format 'projects/x/locations/x'.
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "cluster": {},
+ * // "parent": "my_parent",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.create
* @memberOf! ()
*
@@ -2843,6 +3125,72 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.delete
* @desc Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.delete({
+ * // Required. Deprecated. The name of the cluster to delete.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // The name (project, location, cluster) of the cluster to delete.
+ * // Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.delete
* @memberOf! ()
*
@@ -2917,6 +3265,114 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.get
* @desc Gets the details for a specific cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.get({
+ * // Required. Deprecated. The name of the cluster to retrieve.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // The name (project, location, cluster) of the cluster to retrieve.
+ * // Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "addonsConfig": {},
+ * // "authenticatorGroupsConfig": {},
+ * // "autoscaling": {},
+ * // "binaryAuthorization": {},
+ * // "clusterIpv4Cidr": "my_clusterIpv4Cidr",
+ * // "clusterTelemetry": {},
+ * // "conditions": [],
+ * // "createTime": "my_createTime",
+ * // "currentMasterVersion": "my_currentMasterVersion",
+ * // "currentNodeCount": 0,
+ * // "currentNodeVersion": "my_currentNodeVersion",
+ * // "databaseEncryption": {},
+ * // "defaultMaxPodsConstraint": {},
+ * // "description": "my_description",
+ * // "enableKubernetesAlpha": false,
+ * // "enableTpu": false,
+ * // "endpoint": "my_endpoint",
+ * // "expireTime": "my_expireTime",
+ * // "initialClusterVersion": "my_initialClusterVersion",
+ * // "initialNodeCount": 0,
+ * // "instanceGroupUrls": [],
+ * // "ipAllocationPolicy": {},
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "legacyAbac": {},
+ * // "location": "my_location",
+ * // "locations": [],
+ * // "loggingService": "my_loggingService",
+ * // "maintenancePolicy": {},
+ * // "masterAuth": {},
+ * // "masterAuthorizedNetworksConfig": {},
+ * // "masterIpv4CidrBlock": "my_masterIpv4CidrBlock",
+ * // "monitoringService": "my_monitoringService",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkConfig": {},
+ * // "networkPolicy": {},
+ * // "nodeConfig": {},
+ * // "nodeIpv4CidrSize": 0,
+ * // "nodePools": [],
+ * // "podSecurityPolicyConfig": {},
+ * // "privateCluster": false,
+ * // "privateClusterConfig": {},
+ * // "releaseChannel": {},
+ * // "resourceLabels": {},
+ * // "resourceUsageExportConfig": {},
+ * // "selfLink": "my_selfLink",
+ * // "servicesIpv4Cidr": "my_servicesIpv4Cidr",
+ * // "shieldedNodes": {},
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "subnetwork": "my_subnetwork",
+ * // "tpuConfig": {},
+ * // "tpuIpv4CidrBlock": "my_tpuIpv4CidrBlock",
+ * // "verticalPodAutoscaling": {},
+ * // "workloadIdentityConfig": {},
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.get
* @memberOf! ()
*
@@ -2989,6 +3445,48 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.getJwks
* @desc Gets the public component of the cluster signing keys in JSON Web Key format. This API is not yet intended for general use, and is not available for all clusters.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.getJwks({
+ * // The cluster (project, location, cluster id) to get keys for. Specified in
+ * // the format 'projects/x/locations/x/clusters/x'.
+ * parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cacheHeader": {},
+ * // "keys": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.getJwks
* @memberOf! ()
*
@@ -3067,6 +3565,58 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.list
* @desc Lists all clusters owned by a project in either the specified zone or all zones.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.list({
+ * // The parent (project and location) where the clusters will be listed.
+ * // Specified in the format 'projects/x/locations/x'.
+ * // Location "-" matches all zones and all regions.
+ * parent: 'projects/my-project/locations/my-location',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the parent field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides, or "-" for all zones. This field has been deprecated and
+ * // replaced by the parent field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusters": [],
+ * // "missingZones": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.list
* @memberOf! ()
*
@@ -3145,6 +3695,72 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.setAddons
* @desc Sets the addons for a specific cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.setAddons({
+ * // The name (project, location, cluster) of the cluster to set addons.
+ * // Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "addonsConfig": {},
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.setAddons
* @memberOf! ()
*
@@ -3220,6 +3836,72 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.setLegacyAbac
* @desc Enables or disables the ABAC authorization mechanism on a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.setLegacyAbac({
+ * // The name (project, location, cluster id) of the cluster to set legacy abac.
+ * // Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "enabled": false,
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.setLegacyAbac
* @memberOf! ()
*
@@ -3295,6 +3977,72 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.setLocations
* @desc Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters/update) instead.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.setLocations({
+ * // The name (project, location, cluster) of the cluster to set locations.
+ * // Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "locations": [],
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.setLocations
* @memberOf! ()
*
@@ -3370,6 +4118,72 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.setLogging
* @desc Sets the logging service for a specific cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.setLogging({
+ * // The name (project, location, cluster) of the cluster to set logging.
+ * // Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "loggingService": "my_loggingService",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.setLogging
* @memberOf! ()
*
@@ -3445,6 +4259,73 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.setMaintenancePolicy
* @desc Sets the maintenance policy for a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.setMaintenancePolicy({
+ * // The name (project, location, cluster id) of the cluster to set maintenance
+ * // policy.
+ * // Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "maintenancePolicy": {},
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.setMaintenancePolicy
* @memberOf! ()
*
@@ -3522,6 +4403,73 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.setMasterAuth
* @desc Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.setMasterAuth({
+ * // The name (project, location, cluster) of the cluster to set auth.
+ * // Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "update": {},
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.setMasterAuth
* @memberOf! ()
*
@@ -3597,6 +4545,72 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.setMonitoring
* @desc Sets the monitoring service for a specific cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.setMonitoring({
+ * // The name (project, location, cluster) of the cluster to set monitoring.
+ * // Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "monitoringService": "my_monitoringService",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.setMonitoring
* @memberOf! ()
*
@@ -3672,6 +4686,72 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.setNetworkPolicy
* @desc Enables or disables Network Policy for a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.setNetworkPolicy({
+ * // The name (project, location, cluster id) of the cluster to set networking
+ * // policy. Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "networkPolicy": {},
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.setNetworkPolicy
* @memberOf! ()
*
@@ -3747,6 +4827,73 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.setResourceLabels
* @desc Sets labels on a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.setResourceLabels({
+ * // The name (project, location, cluster id) of the cluster to set labels.
+ * // Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "resourceLabels": {},
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.setResourceLabels
* @memberOf! ()
*
@@ -3822,6 +4969,72 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.startIpRotation
* @desc Starts master IP rotation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.startIpRotation({
+ * // The name (project, location, cluster id) of the cluster to start IP
+ * // rotation. Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "rotateCredentials": false,
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.startIpRotation
* @memberOf! ()
*
@@ -3897,6 +5110,72 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.update
* @desc Updates the settings for a specific cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.update({
+ * // The name (project, location, cluster) of the cluster to update.
+ * // Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "update": {},
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.update
* @memberOf! ()
*
@@ -3969,6 +5248,72 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.updateMaster
* @desc Updates the master for a specific cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.updateMaster({
+ * // The name (project, location, cluster) of the cluster to update.
+ * // Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "masterVersion": "my_masterVersion",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.updateMaster
* @memberOf! ()
*
@@ -4370,6 +5715,73 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.nodePools.create
* @desc Creates a node pool for a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.nodePools.create({
+ * // The parent (project, location, cluster id) where the node pool will be
+ * // created. Specified in the format
+ * // 'projects/x/locations/x/clusters/x'.
+ * parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "nodePool": {},
+ * // "parent": "my_parent",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.nodePools.create
* @memberOf! ()
*
@@ -4445,6 +5857,77 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.nodePools.delete
* @desc Deletes a node pool from a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.nodePools.delete({
+ * // Required. Deprecated. The name of the cluster.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // The name (project, location, cluster, node pool id) of the node pool to
+ * // delete. Specified in the format
+ * // 'projects/x/locations/x/clusters/x/nodePools/x'.
+ * name:
+ * 'projects/my-project/locations/my-location/clusters/my-cluster/nodePools/my-nodePool',
+ * // Required. Deprecated. The name of the node pool to delete.
+ * // This field has been deprecated and replaced by the name field.
+ * nodePoolId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.nodePools.delete
* @memberOf! ()
*
@@ -4520,6 +6003,78 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.nodePools.get
* @desc Retrieves the requested node pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.nodePools.get({
+ * // Required. Deprecated. The name of the cluster.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // The name (project, location, cluster, node pool id) of the node pool to
+ * // get. Specified in the format
+ * // 'projects/x/locations/x/clusters/x/nodePools/x'.
+ * name:
+ * 'projects/my-project/locations/my-location/clusters/my-cluster/nodePools/my-nodePool',
+ * // Required. Deprecated. The name of the node pool.
+ * // This field has been deprecated and replaced by the name field.
+ * nodePoolId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoscaling": {},
+ * // "conditions": [],
+ * // "config": {},
+ * // "initialNodeCount": 0,
+ * // "instanceGroupUrls": [],
+ * // "locations": [],
+ * // "management": {},
+ * // "maxPodsConstraint": {},
+ * // "name": "my_name",
+ * // "podIpv4CidrSize": 0,
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "upgradeSettings": {},
+ * // "version": "my_version"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.nodePools.get
* @memberOf! ()
*
@@ -4593,6 +6148,59 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.nodePools.list
* @desc Lists the node pools for a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.nodePools.list({
+ * // Required. Deprecated. The name of the cluster.
+ * // This field has been deprecated and replaced by the parent field.
+ * clusterId: 'placeholder-value',
+ * // The parent (project, location, cluster id) where the node pools will be
+ * // listed. Specified in the format 'projects/x/locations/x/clusters/x'.
+ * parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the parent field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the parent
+ * // field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nodePools": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.nodePools.list
* @memberOf! ()
*
@@ -4672,6 +6280,74 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.nodePools.rollback
* @desc Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.nodePools.rollback({
+ * // The name (project, location, cluster, node pool id) of the node poll to
+ * // rollback upgrade.
+ * // Specified in the format 'projects/x/locations/x/clusters/x/nodePools/x'.
+ * name:
+ * 'projects/my-project/locations/my-location/clusters/my-cluster/nodePools/my-nodePool',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "nodePoolId": "my_nodePoolId",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.nodePools.rollback
* @memberOf! ()
*
@@ -4747,6 +6423,77 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.nodePools.setAutoscaling
* @desc Sets the autoscaling settings of a specific node pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.nodePools.setAutoscaling(
+ * {
+ * // The name (project, location, cluster, node pool) of the node pool to set
+ * // autoscaler settings. Specified in the format
+ * // 'projects/x/locations/x/clusters/x/nodePools/x'.
+ * name:
+ * 'projects/my-project/locations/my-location/clusters/my-cluster/nodePools/my-nodePool',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscaling": {},
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "nodePoolId": "my_nodePoolId",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.nodePools.setAutoscaling
* @memberOf! ()
*
@@ -4822,6 +6569,77 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.nodePools.setManagement
* @desc Sets the NodeManagement options for a node pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.nodePools.setManagement(
+ * {
+ * // The name (project, location, cluster, node pool id) of the node pool to set
+ * // management properties. Specified in the format
+ * // 'projects/x/locations/x/clusters/x/nodePools/x'.
+ * name:
+ * 'projects/my-project/locations/my-location/clusters/my-cluster/nodePools/my-nodePool',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "management": {},
+ * // "name": "my_name",
+ * // "nodePoolId": "my_nodePoolId",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.nodePools.setManagement
* @memberOf! ()
*
@@ -4897,6 +6715,75 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.nodePools.setSize
* @desc Sets the size for a specific node pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.nodePools.setSize({
+ * // The name (project, location, cluster, node pool id) of the node pool to set
+ * // size.
+ * // Specified in the format 'projects/x/locations/x/clusters/x/nodePools/x'.
+ * name:
+ * 'projects/my-project/locations/my-location/clusters/my-cluster/nodePools/my-nodePool',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "nodeCount": 0,
+ * // "nodePoolId": "my_nodePoolId",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.nodePools.setSize
* @memberOf! ()
*
@@ -4972,6 +6859,79 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.nodePools.update
* @desc Updates the version and/or image type of a specific node pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.clusters.nodePools.update({
+ * // The name (project, location, cluster, node pool) of the node pool to
+ * // update. Specified in the format
+ * // 'projects/x/locations/x/clusters/x/nodePools/x'.
+ * name:
+ * 'projects/my-project/locations/my-location/clusters/my-cluster/nodePools/my-nodePool',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "imageType": "my_imageType",
+ * // "locations": [],
+ * // "name": "my_name",
+ * // "nodePoolId": "my_nodePoolId",
+ * // "nodeVersion": "my_nodeVersion",
+ * // "projectId": "my_projectId",
+ * // "upgradeSettings": {},
+ * // "workloadMetadataConfig": {},
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.nodePools.update
* @memberOf! ()
*
@@ -5234,6 +7194,57 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.clusters.well-known.getOpenid-configuration
* @desc Gets the OIDC discovery document for the cluster. See the [OpenID Connect Discovery 1.0 specification](https://openid.net/specs/openid-connect-discovery-1_0.html) for details. This API is not yet intended for general use, and is not available for all clusters.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res =
+ * (await container.projects.locations.clusters.well) -
+ * known.getOpenid -
+ * configuration({
+ * // The cluster (project, location, cluster id) to get the discovery document
+ * // for. Specified in the format 'projects/x/locations/x/clusters/x'.
+ * parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cacheHeader": {},
+ * // "claims_supported": [],
+ * // "grant_types": [],
+ * // "id_token_signing_alg_values_supported": [],
+ * // "issuer": "my_issuer",
+ * // "jwks_uri": "my_jwks_uri",
+ * // "response_types_supported": [],
+ * // "subject_types_supported": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.clusters.well-known.getOpenid-configuration
* @memberOf! ()
*
@@ -5331,6 +7342,56 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.operations.cancel
* @desc Cancels the specified operation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.operations.cancel({
+ * // The name (project, location, operation id) of the operation to cancel.
+ * // Specified in the format 'projects/x/locations/x/operations/x'.
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "name": "my_name",
+ * // "operationId": "my_operationId",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.operations.cancel
* @memberOf! ()
*
@@ -5404,6 +7465,72 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.operations.get
* @desc Gets the specified operation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.operations.get({
+ * // The name (project, location, operation id) of the operation to get.
+ * // Specified in the format 'projects/x/locations/x/operations/x'.
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
+ * // Required. Deprecated. The server-assigned `name` of the operation.
+ * // This field has been deprecated and replaced by the name field.
+ * operationId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.operations.get
* @memberOf! ()
*
@@ -5478,6 +7605,58 @@ export namespace container_v1beta1 {
/**
* container.projects.locations.operations.list
* @desc Lists all operations in a project in the specified zone or all zones.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.locations.operations.list({
+ * // The parent (project and location) where the operations will be listed.
+ * // Specified in the format 'projects/x/locations/x'.
+ * // Location "-" matches all zones and all regions.
+ * parent: 'projects/my-project/locations/my-location',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the parent field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) to return
+ * // operations for, or `-` for all zones. This field has been deprecated and
+ * // replaced by the parent field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "missingZones": [],
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.locations.operations.list
* @memberOf! ()
*
@@ -5629,6 +7808,61 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.getServerconfig
* @desc Returns configuration info about the Google Kubernetes Engine service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.getServerconfig({
+ * // The name (project and location) of the server config to get,
+ * // specified in the format 'projects/x/locations/x'.
+ * name: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) to return
+ * // operations for. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "channels": [],
+ * // "defaultClusterVersion": "my_defaultClusterVersion",
+ * // "defaultImageType": "my_defaultImageType",
+ * // "validImageTypes": [],
+ * // "validMasterVersions": [],
+ * // "validNodeVersions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.getServerconfig
* @memberOf! ()
*
@@ -5737,6 +7971,81 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.addons
* @desc Sets the addons for a specific cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.addons({
+ * // Required. Deprecated. The name of the cluster to upgrade.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "addonsConfig": {},
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.addons
* @memberOf! ()
*
@@ -5814,6 +8123,80 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.completeIpRotation
* @desc Completes master IP rotation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.completeIpRotation({
+ * // Required. Deprecated. The name of the cluster.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.completeIpRotation
* @memberOf! ()
*
@@ -5891,6 +8274,77 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.create
* @desc Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's [default network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.create({
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the parent field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the parent
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "cluster": {},
+ * // "parent": "my_parent",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.create
* @memberOf! ()
*
@@ -5966,6 +8420,72 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.delete
* @desc Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.delete({
+ * // Required. Deprecated. The name of the cluster to delete.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // The name (project, location, cluster) of the cluster to delete.
+ * // Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.delete
* @memberOf! ()
*
@@ -6043,6 +8563,114 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.get
* @desc Gets the details for a specific cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.get({
+ * // Required. Deprecated. The name of the cluster to retrieve.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // The name (project, location, cluster) of the cluster to retrieve.
+ * // Specified in the format 'projects/x/locations/x/clusters/x'.
+ * name: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "addonsConfig": {},
+ * // "authenticatorGroupsConfig": {},
+ * // "autoscaling": {},
+ * // "binaryAuthorization": {},
+ * // "clusterIpv4Cidr": "my_clusterIpv4Cidr",
+ * // "clusterTelemetry": {},
+ * // "conditions": [],
+ * // "createTime": "my_createTime",
+ * // "currentMasterVersion": "my_currentMasterVersion",
+ * // "currentNodeCount": 0,
+ * // "currentNodeVersion": "my_currentNodeVersion",
+ * // "databaseEncryption": {},
+ * // "defaultMaxPodsConstraint": {},
+ * // "description": "my_description",
+ * // "enableKubernetesAlpha": false,
+ * // "enableTpu": false,
+ * // "endpoint": "my_endpoint",
+ * // "expireTime": "my_expireTime",
+ * // "initialClusterVersion": "my_initialClusterVersion",
+ * // "initialNodeCount": 0,
+ * // "instanceGroupUrls": [],
+ * // "ipAllocationPolicy": {},
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "legacyAbac": {},
+ * // "location": "my_location",
+ * // "locations": [],
+ * // "loggingService": "my_loggingService",
+ * // "maintenancePolicy": {},
+ * // "masterAuth": {},
+ * // "masterAuthorizedNetworksConfig": {},
+ * // "masterIpv4CidrBlock": "my_masterIpv4CidrBlock",
+ * // "monitoringService": "my_monitoringService",
+ * // "name": "my_name",
+ * // "network": "my_network",
+ * // "networkConfig": {},
+ * // "networkPolicy": {},
+ * // "nodeConfig": {},
+ * // "nodeIpv4CidrSize": 0,
+ * // "nodePools": [],
+ * // "podSecurityPolicyConfig": {},
+ * // "privateCluster": false,
+ * // "privateClusterConfig": {},
+ * // "releaseChannel": {},
+ * // "resourceLabels": {},
+ * // "resourceUsageExportConfig": {},
+ * // "selfLink": "my_selfLink",
+ * // "servicesIpv4Cidr": "my_servicesIpv4Cidr",
+ * // "shieldedNodes": {},
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "subnetwork": "my_subnetwork",
+ * // "tpuConfig": {},
+ * // "tpuIpv4CidrBlock": "my_tpuIpv4CidrBlock",
+ * // "verticalPodAutoscaling": {},
+ * // "workloadIdentityConfig": {},
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.get
* @memberOf! ()
*
@@ -6118,6 +8746,81 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.legacyAbac
* @desc Enables or disables the ABAC authorization mechanism on a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.legacyAbac({
+ * // Required. Deprecated. The name of the cluster to update.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "enabled": false,
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.legacyAbac
* @memberOf! ()
*
@@ -6195,6 +8898,58 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.list
* @desc Lists all clusters owned by a project in either the specified zone or all zones.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.list({
+ * // The parent (project and location) where the clusters will be listed.
+ * // Specified in the format 'projects/x/locations/x'.
+ * // Location "-" matches all zones and all regions.
+ * parent: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the parent field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides, or "-" for all zones. This field has been deprecated and
+ * // replaced by the parent field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusters": [],
+ * // "missingZones": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.list
* @memberOf! ()
*
@@ -6272,6 +9027,81 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.locations
* @desc Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters/update) instead.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.locations({
+ * // Required. Deprecated. The name of the cluster to upgrade.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "locations": [],
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.locations
* @memberOf! ()
*
@@ -6349,6 +9179,81 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.logging
* @desc Sets the logging service for a specific cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.logging({
+ * // Required. Deprecated. The name of the cluster to upgrade.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "loggingService": "my_loggingService",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.logging
* @memberOf! ()
*
@@ -6426,6 +9331,81 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.master
* @desc Updates the master for a specific cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.master({
+ * // Required. Deprecated. The name of the cluster to upgrade.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "masterVersion": "my_masterVersion",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.master
* @memberOf! ()
*
@@ -6503,6 +9483,81 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.monitoring
* @desc Sets the monitoring service for a specific cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.monitoring({
+ * // Required. Deprecated. The name of the cluster to upgrade.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "monitoringService": "my_monitoringService",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.monitoring
* @memberOf! ()
*
@@ -6580,6 +9635,82 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.resourceLabels
* @desc Sets labels on a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.resourceLabels({
+ * // Required. Deprecated. The name of the cluster.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "labelFingerprint": "my_labelFingerprint",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "resourceLabels": {},
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.resourceLabels
* @memberOf! ()
*
@@ -6657,6 +9788,78 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.setMaintenancePolicy
* @desc Sets the maintenance policy for a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.setMaintenancePolicy({
+ * // Required. The name of the cluster to update.
+ * clusterId: 'placeholder-value',
+ * // Required. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * projectId: 'placeholder-value',
+ * // Required. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "maintenancePolicy": {},
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.setMaintenancePolicy
* @memberOf! ()
*
@@ -6736,6 +9939,82 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.setMasterAuth
* @desc Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.setMasterAuth({
+ * // Required. Deprecated. The name of the cluster to upgrade.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "update": {},
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.setMasterAuth
* @memberOf! ()
*
@@ -6813,6 +10092,81 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.setNetworkPolicy
* @desc Enables or disables Network Policy for a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.setNetworkPolicy({
+ * // Required. Deprecated. The name of the cluster.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "networkPolicy": {},
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.setNetworkPolicy
* @memberOf! ()
*
@@ -6890,6 +10244,81 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.startIpRotation
* @desc Starts master IP rotation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.startIpRotation({
+ * // Required. Deprecated. The name of the cluster.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "rotateCredentials": false,
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.startIpRotation
* @memberOf! ()
*
@@ -6967,6 +10396,81 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.update
* @desc Updates the settings for a specific cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.update({
+ * // Required. Deprecated. The name of the cluster to upgrade.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "projectId": "my_projectId",
+ * // "update": {},
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.update
* @memberOf! ()
*
@@ -7466,6 +10970,85 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.nodePools.autoscaling
* @desc Sets the autoscaling settings of a specific node pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.autoscaling({
+ * // Required. Deprecated. The name of the cluster to upgrade.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The name of the node pool to upgrade.
+ * // This field has been deprecated and replaced by the name field.
+ * nodePoolId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoscaling": {},
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "nodePoolId": "my_nodePoolId",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.nodePools.autoscaling
* @memberOf! ()
*
@@ -7544,6 +11127,81 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.nodePools.create
* @desc Creates a node pool for a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.create({
+ * // Required. Deprecated. The name of the cluster.
+ * // This field has been deprecated and replaced by the parent field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the parent field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the parent
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "nodePool": {},
+ * // "parent": "my_parent",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.nodePools.create
* @memberOf! ()
*
@@ -7621,6 +11279,76 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.nodePools.delete
* @desc Deletes a node pool from a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.delete({
+ * // Required. Deprecated. The name of the cluster.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // The name (project, location, cluster, node pool id) of the node pool to
+ * // delete. Specified in the format
+ * // 'projects/x/locations/x/clusters/x/nodePools/x'.
+ * name: 'placeholder-value',
+ * // Required. Deprecated. The name of the node pool to delete.
+ * // This field has been deprecated and replaced by the name field.
+ * nodePoolId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.nodePools.delete
* @memberOf! ()
*
@@ -7699,6 +11427,77 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.nodePools.get
* @desc Retrieves the requested node pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.get({
+ * // Required. Deprecated. The name of the cluster.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // The name (project, location, cluster, node pool id) of the node pool to
+ * // get. Specified in the format
+ * // 'projects/x/locations/x/clusters/x/nodePools/x'.
+ * name: 'placeholder-value',
+ * // Required. Deprecated. The name of the node pool.
+ * // This field has been deprecated and replaced by the name field.
+ * nodePoolId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoscaling": {},
+ * // "conditions": [],
+ * // "config": {},
+ * // "initialNodeCount": 0,
+ * // "instanceGroupUrls": [],
+ * // "locations": [],
+ * // "management": {},
+ * // "maxPodsConstraint": {},
+ * // "name": "my_name",
+ * // "podIpv4CidrSize": 0,
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "upgradeSettings": {},
+ * // "version": "my_version"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.nodePools.get
* @memberOf! ()
*
@@ -7775,6 +11574,59 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.nodePools.list
* @desc Lists the node pools for a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.list({
+ * // Required. Deprecated. The name of the cluster.
+ * // This field has been deprecated and replaced by the parent field.
+ * clusterId: 'placeholder-value',
+ * // The parent (project, location, cluster id) where the node pools will be
+ * // listed. Specified in the format 'projects/x/locations/x/clusters/x'.
+ * parent: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://developers.google.com/console/help/new/#projectnumber).
+ * // This field has been deprecated and replaced by the parent field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the parent
+ * // field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nodePools": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.nodePools.list
* @memberOf! ()
*
@@ -7854,6 +11706,84 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.nodePools.rollback
* @desc Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.rollback({
+ * // Required. Deprecated. The name of the cluster to rollback.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The name of the node pool to rollback.
+ * // This field has been deprecated and replaced by the name field.
+ * nodePoolId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "nodePoolId": "my_nodePoolId",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.nodePools.rollback
* @memberOf! ()
*
@@ -7932,6 +11862,85 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.nodePools.setManagement
* @desc Sets the NodeManagement options for a node pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.setManagement({
+ * // Required. Deprecated. The name of the cluster to update.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The name of the node pool to update.
+ * // This field has been deprecated and replaced by the name field.
+ * nodePoolId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "management": {},
+ * // "name": "my_name",
+ * // "nodePoolId": "my_nodePoolId",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.nodePools.setManagement
* @memberOf! ()
*
@@ -8010,6 +12019,85 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.nodePools.setSize
* @desc Sets the size for a specific node pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.setSize({
+ * // Required. Deprecated. The name of the cluster to update.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The name of the node pool to update.
+ * // This field has been deprecated and replaced by the name field.
+ * nodePoolId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "name": "my_name",
+ * // "nodeCount": 0,
+ * // "nodePoolId": "my_nodePoolId",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.nodePools.setSize
* @memberOf! ()
*
@@ -8088,6 +12176,89 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.clusters.nodePools.update
* @desc Updates the version and/or image type of a specific node pool.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.clusters.nodePools.update({
+ * // Required. Deprecated. The name of the cluster to upgrade.
+ * // This field has been deprecated and replaced by the name field.
+ * clusterId: 'placeholder-value',
+ * // Required. Deprecated. The name of the node pool to upgrade.
+ * // This field has been deprecated and replaced by the name field.
+ * nodePoolId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterId": "my_clusterId",
+ * // "imageType": "my_imageType",
+ * // "locations": [],
+ * // "name": "my_name",
+ * // "nodePoolId": "my_nodePoolId",
+ * // "nodeVersion": "my_nodeVersion",
+ * // "projectId": "my_projectId",
+ * // "upgradeSettings": {},
+ * // "workloadMetadataConfig": {},
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.clusters.nodePools.update
* @memberOf! ()
*
@@ -8424,6 +12595,65 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.operations.cancel
* @desc Cancels the specified operation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.operations.cancel({
+ * // Required. Deprecated. The server-assigned `name` of the operation.
+ * // This field has been deprecated and replaced by the name field.
+ * operationId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // operation resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "name": "my_name",
+ * // "operationId": "my_operationId",
+ * // "projectId": "my_projectId",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.operations.cancel
* @memberOf! ()
*
@@ -8499,6 +12729,72 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.operations.get
* @desc Gets the specified operation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.operations.get({
+ * // The name (project, location, operation id) of the operation to get.
+ * // Specified in the format 'projects/x/locations/x/operations/x'.
+ * name: 'placeholder-value',
+ * // Required. Deprecated. The server-assigned `name` of the operation.
+ * // This field has been deprecated and replaced by the name field.
+ * operationId: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the name field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) in which the
+ * // cluster resides. This field has been deprecated and replaced by the name
+ * // field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterConditions": [],
+ * // "detail": "my_detail",
+ * // "endTime": "my_endTime",
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "nodepoolConditions": [],
+ * // "operationType": "my_operationType",
+ * // "progress": {},
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetLink": "my_targetLink",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.operations.get
* @memberOf! ()
*
@@ -8576,6 +12872,58 @@ export namespace container_v1beta1 {
/**
* container.projects.zones.operations.list
* @desc Lists all operations in a project in the specified zone or all zones.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/container.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const container = google.container('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await container.projects.zones.operations.list({
+ * // The parent (project and location) where the operations will be listed.
+ * // Specified in the format 'projects/x/locations/x'.
+ * // Location "-" matches all zones and all regions.
+ * parent: 'placeholder-value',
+ * // Required. Deprecated. The Google Developers Console [project ID or project
+ * // number](https://support.google.com/cloud/answer/6158840).
+ * // This field has been deprecated and replaced by the parent field.
+ * projectId: 'placeholder-value',
+ * // Required. Deprecated. The name of the Google Compute Engine
+ * // [zone](https://cloud.google.com/compute/docs/zones#available) to return
+ * // operations for, or `-` for all zones. This field has been deprecated and
+ * // replaced by the parent field.
+ * zone: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "missingZones": [],
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias container.projects.zones.operations.list
* @memberOf! ()
*
diff --git a/src/apis/containeranalysis/v1alpha1.ts b/src/apis/containeranalysis/v1alpha1.ts
index f6bfbbed5b7..1b5d33e9667 100644
--- a/src/apis/containeranalysis/v1alpha1.ts
+++ b/src/apis/containeranalysis/v1alpha1.ts
@@ -1392,6 +1392,91 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.notes.create
* @desc Creates a new `Note`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.create({
+ * // The name of the project.
+ * // Should be of the form "providers/{provider_id}".
+ * // @Deprecated
+ * name: 'placeholder-value',
+ * // The ID to use for this note.
+ * noteId: 'placeholder-value',
+ * // This field contains the project Id for example:
+ * // "projects/{project_id}
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attestationAuthority": {},
+ * // "baseImage": {},
+ * // "buildType": {},
+ * // "createTime": "my_createTime",
+ * // "deployable": {},
+ * // "discovery": {},
+ * // "expirationTime": "my_expirationTime",
+ * // "kind": "my_kind",
+ * // "longDescription": "my_longDescription",
+ * // "name": "my_name",
+ * // "package": {},
+ * // "relatedUrl": [],
+ * // "shortDescription": "my_shortDescription",
+ * // "updateTime": "my_updateTime",
+ * // "upgrade": {},
+ * // "vulnerabilityType": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestationAuthority": {},
+ * // "baseImage": {},
+ * // "buildType": {},
+ * // "createTime": "my_createTime",
+ * // "deployable": {},
+ * // "discovery": {},
+ * // "expirationTime": "my_expirationTime",
+ * // "kind": "my_kind",
+ * // "longDescription": "my_longDescription",
+ * // "name": "my_name",
+ * // "package": {},
+ * // "relatedUrl": [],
+ * // "shortDescription": "my_shortDescription",
+ * // "updateTime": "my_updateTime",
+ * // "upgrade": {},
+ * // "vulnerabilityType": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.create
* @memberOf! ()
*
@@ -1468,6 +1553,45 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.notes.delete
* @desc Deletes the given `Note` from the system.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.delete({
+ * // The name of the note in the form of
+ * // "providers/{provider_id}/notes/{NOTE_ID}"
+ * name: 'projects/my-project/notes/my-note',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.delete
* @memberOf! ()
*
@@ -1538,6 +1662,62 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.notes.get
* @desc Returns the requested `Note`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.get({
+ * // The name of the note in the form of
+ * // "providers/{provider_id}/notes/{NOTE_ID}"
+ * name: 'projects/my-project/notes/my-note',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestationAuthority": {},
+ * // "baseImage": {},
+ * // "buildType": {},
+ * // "createTime": "my_createTime",
+ * // "deployable": {},
+ * // "discovery": {},
+ * // "expirationTime": "my_expirationTime",
+ * // "kind": "my_kind",
+ * // "longDescription": "my_longDescription",
+ * // "name": "my_name",
+ * // "package": {},
+ * // "relatedUrl": [],
+ * // "shortDescription": "my_shortDescription",
+ * // "updateTime": "my_updateTime",
+ * // "upgrade": {},
+ * // "vulnerabilityType": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.get
* @memberOf! ()
*
@@ -1608,6 +1788,57 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.notes.getIamPolicy
* @desc Gets the access control policy for a note or an `Occurrence` resource. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or occurrence, respectively. Attempting to call this method on a resource without the required permission will result in a `PERMISSION_DENIED` error. Attempting to call this method on a non-existent resource will result in a `NOT_FOUND` error if the user has list permission on the project, or a `PERMISSION_DENIED` error otherwise. The resource takes the following formats: `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for occurrences and projects/{PROJECT_ID}/notes/{NOTE_ID} for notes
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/notes/my-note',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.getIamPolicy
* @memberOf! ()
*
@@ -1682,6 +1913,57 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.notes.list
* @desc Lists all `Notes` for a given project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.list({
+ * // The filter expression.
+ * filter: 'placeholder-value',
+ * // The name field will contain the project Id for example:
+ * // "providers/{provider_id}
+ * // @Deprecated
+ * name: 'placeholder-value',
+ * // Number of notes to return in the list.
+ * pageSize: 'placeholder-value',
+ * // Token to provide to skip to a particular spot in the list.
+ * pageToken: 'placeholder-value',
+ * // This field contains the project Id for example: "projects/{PROJECT_ID}".
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "notes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.list
* @memberOf! ()
*
@@ -1761,6 +2043,87 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.notes.patch
* @desc Updates an existing `Note`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.patch({
+ * // The name of the note.
+ * // Should be of the form "projects/{provider_id}/notes/{note_id}".
+ * name: 'projects/my-project/notes/my-note',
+ * // The fields to update.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attestationAuthority": {},
+ * // "baseImage": {},
+ * // "buildType": {},
+ * // "createTime": "my_createTime",
+ * // "deployable": {},
+ * // "discovery": {},
+ * // "expirationTime": "my_expirationTime",
+ * // "kind": "my_kind",
+ * // "longDescription": "my_longDescription",
+ * // "name": "my_name",
+ * // "package": {},
+ * // "relatedUrl": [],
+ * // "shortDescription": "my_shortDescription",
+ * // "updateTime": "my_updateTime",
+ * // "upgrade": {},
+ * // "vulnerabilityType": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestationAuthority": {},
+ * // "baseImage": {},
+ * // "buildType": {},
+ * // "createTime": "my_createTime",
+ * // "deployable": {},
+ * // "discovery": {},
+ * // "expirationTime": "my_expirationTime",
+ * // "kind": "my_kind",
+ * // "longDescription": "my_longDescription",
+ * // "name": "my_name",
+ * // "package": {},
+ * // "relatedUrl": [],
+ * // "shortDescription": "my_shortDescription",
+ * // "updateTime": "my_updateTime",
+ * // "upgrade": {},
+ * // "vulnerabilityType": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.patch
* @memberOf! ()
*
@@ -1833,6 +2196,57 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.notes.setIamPolicy
* @desc Sets the access control policy on the specified `Note` or `Occurrence`. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a `Note` or an `Occurrence`, respectively. Attempting to call this method without these permissions will result in a ` `PERMISSION_DENIED` error. Attempting to call this method on a non-existent resource will result in a `NOT_FOUND` error if the user has `containeranalysis.notes.list` permission on a `Note` or `containeranalysis.occurrences.list` on an `Occurrence`, or a `PERMISSION_DENIED` error otherwise. The resource takes the following formats: `projects/{projectid}/occurrences/{occurrenceid}` for occurrences and projects/{projectid}/notes/{noteid} for notes
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/notes/my-note',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.setIamPolicy
* @memberOf! ()
*
@@ -1907,6 +2321,55 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.notes.testIamPermissions
* @desc Returns the permissions that a caller has on the specified note or occurrence resource. Requires list permission on the project (for example, "storage.objects.list" on the containing bucket for testing permission of an object). Attempting to call this method on a non-existent resource will result in a `NOT_FOUND` error if the user has list permission on the project, or a `PERMISSION_DENIED` error otherwise. The resource takes the following formats: `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for `Occurrences` and `projects/{PROJECT_ID}/notes/{NOTE_ID}` for `Notes`
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/notes/my-note',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.testIamPermissions
* @memberOf! ()
*
@@ -2147,6 +2610,54 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.notes.occurrences.list
* @desc Lists `Occurrences` referencing the specified `Note`. Use this method to get all occurrences referencing your `Note` across all your customer projects.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.occurrences.list({
+ * // The filter expression.
+ * filter: 'placeholder-value',
+ * // The name field will contain the note name for example:
+ * // "provider/{provider_id}/notes/{note_id}"
+ * name: 'projects/my-project/notes/my-note',
+ * // Number of notes to return in the list.
+ * pageSize: 'placeholder-value',
+ * // Token to provide to skip to a particular spot in the list.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "occurrences": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.occurrences.list
* @memberOf! ()
*
@@ -2264,6 +2775,87 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.occurrences.create
* @desc Creates a new `Occurrence`. Use this method to create `Occurrences` for a resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.create({
+ * // The name of the project. Should be of the form "projects/{project_id}".
+ * // @Deprecated
+ * name: 'placeholder-value',
+ * // This field contains the project Id for example: "projects/{project_id}"
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attestation": {},
+ * // "buildDetails": {},
+ * // "createTime": "my_createTime",
+ * // "deployment": {},
+ * // "derivedImage": {},
+ * // "discovered": {},
+ * // "installation": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "noteName": "my_noteName",
+ * // "remediation": "my_remediation",
+ * // "resource": {},
+ * // "resourceUrl": "my_resourceUrl",
+ * // "updateTime": "my_updateTime",
+ * // "upgrade": {},
+ * // "vulnerabilityDetails": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestation": {},
+ * // "buildDetails": {},
+ * // "createTime": "my_createTime",
+ * // "deployment": {},
+ * // "derivedImage": {},
+ * // "discovered": {},
+ * // "installation": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "noteName": "my_noteName",
+ * // "remediation": "my_remediation",
+ * // "resource": {},
+ * // "resourceUrl": "my_resourceUrl",
+ * // "updateTime": "my_updateTime",
+ * // "upgrade": {},
+ * // "vulnerabilityDetails": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.create
* @memberOf! ()
*
@@ -2341,6 +2933,45 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.occurrences.delete
* @desc Deletes the given `Occurrence` from the system. Use this when an `Occurrence` is no longer applicable for the given resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.delete({
+ * // The name of the occurrence in the form of
+ * // "projects/{project_id}/occurrences/{OCCURRENCE_ID}"
+ * name: 'projects/my-project/occurrences/my-occurrence',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.delete
* @memberOf! ()
*
@@ -2411,6 +3042,62 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.occurrences.get
* @desc Returns the requested `Occurrence`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.get({
+ * // The name of the occurrence of the form
+ * // "projects/{project_id}/occurrences/{OCCURRENCE_ID}"
+ * name: 'projects/my-project/occurrences/my-occurrence',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestation": {},
+ * // "buildDetails": {},
+ * // "createTime": "my_createTime",
+ * // "deployment": {},
+ * // "derivedImage": {},
+ * // "discovered": {},
+ * // "installation": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "noteName": "my_noteName",
+ * // "remediation": "my_remediation",
+ * // "resource": {},
+ * // "resourceUrl": "my_resourceUrl",
+ * // "updateTime": "my_updateTime",
+ * // "upgrade": {},
+ * // "vulnerabilityDetails": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.get
* @memberOf! ()
*
@@ -2483,6 +3170,57 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.occurrences.getIamPolicy
* @desc Gets the access control policy for a note or an `Occurrence` resource. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or occurrence, respectively. Attempting to call this method on a resource without the required permission will result in a `PERMISSION_DENIED` error. Attempting to call this method on a non-existent resource will result in a `NOT_FOUND` error if the user has list permission on the project, or a `PERMISSION_DENIED` error otherwise. The resource takes the following formats: `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for occurrences and projects/{PROJECT_ID}/notes/{NOTE_ID} for notes
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/occurrences/my-occurrence',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.getIamPolicy
* @memberOf! ()
*
@@ -2557,6 +3295,62 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.occurrences.getNotes
* @desc Gets the `Note` attached to the given `Occurrence`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.getNotes({
+ * // The name of the occurrence in the form
+ * // "projects/{project_id}/occurrences/{OCCURRENCE_ID}"
+ * name: 'projects/my-project/occurrences/my-occurrence',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestationAuthority": {},
+ * // "baseImage": {},
+ * // "buildType": {},
+ * // "createTime": "my_createTime",
+ * // "deployable": {},
+ * // "discovery": {},
+ * // "expirationTime": "my_expirationTime",
+ * // "kind": "my_kind",
+ * // "longDescription": "my_longDescription",
+ * // "name": "my_name",
+ * // "package": {},
+ * // "relatedUrl": [],
+ * // "shortDescription": "my_shortDescription",
+ * // "updateTime": "my_updateTime",
+ * // "upgrade": {},
+ * // "vulnerabilityType": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.getNotes
* @memberOf! ()
*
@@ -2630,6 +3424,50 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.occurrences.getVulnerabilitySummary
* @desc Gets a summary of the number and severity of occurrences.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.getVulnerabilitySummary(
+ * {
+ * // The filter expression.
+ * filter: 'placeholder-value',
+ * // This contains the project Id for example: projects/{project_id}
+ * parent: 'projects/my-project',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "counts": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.getVulnerabilitySummary
* @memberOf! ()
*
@@ -2714,6 +3552,59 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.occurrences.list
* @desc Lists active `Occurrences` for a given project matching the filters.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.list({
+ * // The filter expression.
+ * filter: 'placeholder-value',
+ * // The kind of occurrences to filter on.
+ * kind: 'placeholder-value',
+ * // The name field contains the project Id. For example:
+ * // "projects/{project_id}
+ * // @Deprecated
+ * name: 'placeholder-value',
+ * // Number of occurrences to return in the list.
+ * pageSize: 'placeholder-value',
+ * // Token to provide to skip to a particular spot in the list.
+ * pageToken: 'placeholder-value',
+ * // This contains the project Id for example: projects/{project_id}.
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "occurrences": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.list
* @memberOf! ()
*
@@ -2796,6 +3687,87 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.occurrences.patch
* @desc Updates an existing occurrence.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.patch({
+ * // The name of the occurrence.
+ * // Should be of the form "projects/{project_id}/occurrences/{OCCURRENCE_ID}".
+ * name: 'projects/my-project/occurrences/my-occurrence',
+ * // The fields to update.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attestation": {},
+ * // "buildDetails": {},
+ * // "createTime": "my_createTime",
+ * // "deployment": {},
+ * // "derivedImage": {},
+ * // "discovered": {},
+ * // "installation": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "noteName": "my_noteName",
+ * // "remediation": "my_remediation",
+ * // "resource": {},
+ * // "resourceUrl": "my_resourceUrl",
+ * // "updateTime": "my_updateTime",
+ * // "upgrade": {},
+ * // "vulnerabilityDetails": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestation": {},
+ * // "buildDetails": {},
+ * // "createTime": "my_createTime",
+ * // "deployment": {},
+ * // "derivedImage": {},
+ * // "discovered": {},
+ * // "installation": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "noteName": "my_noteName",
+ * // "remediation": "my_remediation",
+ * // "resource": {},
+ * // "resourceUrl": "my_resourceUrl",
+ * // "updateTime": "my_updateTime",
+ * // "upgrade": {},
+ * // "vulnerabilityDetails": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.patch
* @memberOf! ()
*
@@ -2870,6 +3842,57 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.occurrences.setIamPolicy
* @desc Sets the access control policy on the specified `Note` or `Occurrence`. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a `Note` or an `Occurrence`, respectively. Attempting to call this method without these permissions will result in a ` `PERMISSION_DENIED` error. Attempting to call this method on a non-existent resource will result in a `NOT_FOUND` error if the user has `containeranalysis.notes.list` permission on a `Note` or `containeranalysis.occurrences.list` on an `Occurrence`, or a `PERMISSION_DENIED` error otherwise. The resource takes the following formats: `projects/{projectid}/occurrences/{occurrenceid}` for occurrences and projects/{projectid}/notes/{noteid} for notes
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/occurrences/my-occurrence',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.setIamPolicy
* @memberOf! ()
*
@@ -2944,6 +3967,55 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.occurrences.testIamPermissions
* @desc Returns the permissions that a caller has on the specified note or occurrence resource. Requires list permission on the project (for example, "storage.objects.list" on the containing bucket for testing permission of an object). Attempting to call this method on a non-existent resource will result in a `NOT_FOUND` error if the user has list permission on the project, or a `PERMISSION_DENIED` error otherwise. The resource takes the following formats: `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for `Occurrences` and `projects/{PROJECT_ID}/notes/{NOTE_ID}` for `Notes`
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/occurrences/my-occurrence',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.testIamPermissions
* @memberOf! ()
*
@@ -3212,6 +4284,59 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.operations.create
* @desc Creates a new `Operation`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.operations.create({
+ * // The project Id that this operation should be created under.
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "operation": {},
+ * // "operationId": "my_operationId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.operations.create
* @memberOf! ()
*
@@ -3288,6 +4413,60 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.operations.patch
* @desc Updates an existing operation returns an error if operation does not exist. The only valid operations are to update mark the done bit change the result.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.operations.patch({
+ * // The name of the Operation.
+ * // Should be of the form "projects/{provider_id}/operations/{operation_id}".
+ * name: 'projects/my-project/operations/my-operation',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "operation": {},
+ * // "updateMask": "my_updateMask"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.operations.patch
* @memberOf! ()
*
@@ -3403,6 +4582,51 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.scanConfigs.get
* @desc Gets a specific scan configuration for a project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.scanConfigs.get({
+ * // The name of the ScanConfig in the form
+ * // projects/{project_id}/scanConfigs/{scan_config_id}
+ * name: 'projects/my-project/scanConfigs/my-scanConfig',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "enabled": false,
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.scanConfigs.get
* @memberOf! ()
*
@@ -3475,6 +4699,53 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.scanConfigs.list
* @desc Lists scan configurations for a project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.scanConfigs.list({
+ * // The filter expression.
+ * filter: 'placeholder-value',
+ * // The number of items to return.
+ * pageSize: 'placeholder-value',
+ * // The page token to use for the next request.
+ * pageToken: 'placeholder-value',
+ * // This containers the project Id i.e.: projects/{project_id}
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "scanConfigs": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.scanConfigs.list
* @memberOf! ()
*
@@ -3555,6 +4826,65 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.projects.scanConfigs.patch
* @desc Updates the scan configuration to a new value.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.scanConfigs.patch({
+ * // The scan config to update of the form
+ * // projects/{project_id}/scanConfigs/{scan_config_id}.
+ * name: 'projects/my-project/scanConfigs/my-scanConfig',
+ * // The fields to update.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "enabled": false,
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "enabled": false,
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.scanConfigs.patch
* @memberOf! ()
*
@@ -3705,6 +5035,91 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.providers.notes.create
* @desc Creates a new `Note`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.providers.notes.create({
+ * // The name of the project.
+ * // Should be of the form "providers/{provider_id}".
+ * // @Deprecated
+ * name: 'providers/my-provider',
+ * // The ID to use for this note.
+ * noteId: 'placeholder-value',
+ * // This field contains the project Id for example:
+ * // "projects/{project_id}
+ * parent: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attestationAuthority": {},
+ * // "baseImage": {},
+ * // "buildType": {},
+ * // "createTime": "my_createTime",
+ * // "deployable": {},
+ * // "discovery": {},
+ * // "expirationTime": "my_expirationTime",
+ * // "kind": "my_kind",
+ * // "longDescription": "my_longDescription",
+ * // "name": "my_name",
+ * // "package": {},
+ * // "relatedUrl": [],
+ * // "shortDescription": "my_shortDescription",
+ * // "updateTime": "my_updateTime",
+ * // "upgrade": {},
+ * // "vulnerabilityType": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestationAuthority": {},
+ * // "baseImage": {},
+ * // "buildType": {},
+ * // "createTime": "my_createTime",
+ * // "deployable": {},
+ * // "discovery": {},
+ * // "expirationTime": "my_expirationTime",
+ * // "kind": "my_kind",
+ * // "longDescription": "my_longDescription",
+ * // "name": "my_name",
+ * // "package": {},
+ * // "relatedUrl": [],
+ * // "shortDescription": "my_shortDescription",
+ * // "updateTime": "my_updateTime",
+ * // "upgrade": {},
+ * // "vulnerabilityType": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.providers.notes.create
* @memberOf! ()
*
@@ -3781,6 +5196,45 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.providers.notes.delete
* @desc Deletes the given `Note` from the system.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.providers.notes.delete({
+ * // The name of the note in the form of
+ * // "providers/{provider_id}/notes/{NOTE_ID}"
+ * name: 'providers/my-provider/notes/my-note',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.providers.notes.delete
* @memberOf! ()
*
@@ -3851,6 +5305,62 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.providers.notes.get
* @desc Returns the requested `Note`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.providers.notes.get({
+ * // The name of the note in the form of
+ * // "providers/{provider_id}/notes/{NOTE_ID}"
+ * name: 'providers/my-provider/notes/my-note',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestationAuthority": {},
+ * // "baseImage": {},
+ * // "buildType": {},
+ * // "createTime": "my_createTime",
+ * // "deployable": {},
+ * // "discovery": {},
+ * // "expirationTime": "my_expirationTime",
+ * // "kind": "my_kind",
+ * // "longDescription": "my_longDescription",
+ * // "name": "my_name",
+ * // "package": {},
+ * // "relatedUrl": [],
+ * // "shortDescription": "my_shortDescription",
+ * // "updateTime": "my_updateTime",
+ * // "upgrade": {},
+ * // "vulnerabilityType": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.providers.notes.get
* @memberOf! ()
*
@@ -3921,6 +5431,57 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.providers.notes.getIamPolicy
* @desc Gets the access control policy for a note or an `Occurrence` resource. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or occurrence, respectively. Attempting to call this method on a resource without the required permission will result in a `PERMISSION_DENIED` error. Attempting to call this method on a non-existent resource will result in a `NOT_FOUND` error if the user has list permission on the project, or a `PERMISSION_DENIED` error otherwise. The resource takes the following formats: `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for occurrences and projects/{PROJECT_ID}/notes/{NOTE_ID} for notes
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.providers.notes.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'providers/my-provider/notes/my-note',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.providers.notes.getIamPolicy
* @memberOf! ()
*
@@ -3995,6 +5556,57 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.providers.notes.list
* @desc Lists all `Notes` for a given project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.providers.notes.list({
+ * // The filter expression.
+ * filter: 'placeholder-value',
+ * // The name field will contain the project Id for example:
+ * // "providers/{provider_id}
+ * // @Deprecated
+ * name: 'providers/my-provider',
+ * // Number of notes to return in the list.
+ * pageSize: 'placeholder-value',
+ * // Token to provide to skip to a particular spot in the list.
+ * pageToken: 'placeholder-value',
+ * // This field contains the project Id for example: "projects/{PROJECT_ID}".
+ * parent: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "notes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.providers.notes.list
* @memberOf! ()
*
@@ -4074,6 +5686,87 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.providers.notes.patch
* @desc Updates an existing `Note`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.providers.notes.patch({
+ * // The name of the note.
+ * // Should be of the form "projects/{provider_id}/notes/{note_id}".
+ * name: 'providers/my-provider/notes/my-note',
+ * // The fields to update.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attestationAuthority": {},
+ * // "baseImage": {},
+ * // "buildType": {},
+ * // "createTime": "my_createTime",
+ * // "deployable": {},
+ * // "discovery": {},
+ * // "expirationTime": "my_expirationTime",
+ * // "kind": "my_kind",
+ * // "longDescription": "my_longDescription",
+ * // "name": "my_name",
+ * // "package": {},
+ * // "relatedUrl": [],
+ * // "shortDescription": "my_shortDescription",
+ * // "updateTime": "my_updateTime",
+ * // "upgrade": {},
+ * // "vulnerabilityType": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestationAuthority": {},
+ * // "baseImage": {},
+ * // "buildType": {},
+ * // "createTime": "my_createTime",
+ * // "deployable": {},
+ * // "discovery": {},
+ * // "expirationTime": "my_expirationTime",
+ * // "kind": "my_kind",
+ * // "longDescription": "my_longDescription",
+ * // "name": "my_name",
+ * // "package": {},
+ * // "relatedUrl": [],
+ * // "shortDescription": "my_shortDescription",
+ * // "updateTime": "my_updateTime",
+ * // "upgrade": {},
+ * // "vulnerabilityType": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.providers.notes.patch
* @memberOf! ()
*
@@ -4146,6 +5839,57 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.providers.notes.setIamPolicy
* @desc Sets the access control policy on the specified `Note` or `Occurrence`. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a `Note` or an `Occurrence`, respectively. Attempting to call this method without these permissions will result in a ` `PERMISSION_DENIED` error. Attempting to call this method on a non-existent resource will result in a `NOT_FOUND` error if the user has `containeranalysis.notes.list` permission on a `Note` or `containeranalysis.occurrences.list` on an `Occurrence`, or a `PERMISSION_DENIED` error otherwise. The resource takes the following formats: `projects/{projectid}/occurrences/{occurrenceid}` for occurrences and projects/{projectid}/notes/{noteid} for notes
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.providers.notes.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'providers/my-provider/notes/my-note',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.providers.notes.setIamPolicy
* @memberOf! ()
*
@@ -4220,6 +5964,55 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.providers.notes.testIamPermissions
* @desc Returns the permissions that a caller has on the specified note or occurrence resource. Requires list permission on the project (for example, "storage.objects.list" on the containing bucket for testing permission of an object). Attempting to call this method on a non-existent resource will result in a `NOT_FOUND` error if the user has list permission on the project, or a `PERMISSION_DENIED` error otherwise. The resource takes the following formats: `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for `Occurrences` and `projects/{PROJECT_ID}/notes/{NOTE_ID}` for `Notes`
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.providers.notes.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'providers/my-provider/notes/my-note',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.providers.notes.testIamPermissions
* @memberOf! ()
*
@@ -4460,6 +6253,54 @@ export namespace containeranalysis_v1alpha1 {
/**
* containeranalysis.providers.notes.occurrences.list
* @desc Lists `Occurrences` referencing the specified `Note`. Use this method to get all occurrences referencing your `Note` across all your customer projects.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1alpha1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.providers.notes.occurrences.list({
+ * // The filter expression.
+ * filter: 'placeholder-value',
+ * // The name field will contain the note name for example:
+ * // "provider/{provider_id}/notes/{note_id}"
+ * name: 'providers/my-provider/notes/my-note',
+ * // Number of notes to return in the list.
+ * pageSize: 'placeholder-value',
+ * // Token to provide to skip to a particular spot in the list.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "occurrences": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.providers.notes.occurrences.list
* @memberOf! ()
*
diff --git a/src/apis/containeranalysis/v1beta1.ts b/src/apis/containeranalysis/v1beta1.ts
index a9ed28a9b4f..1dff33af282 100644
--- a/src/apis/containeranalysis/v1beta1.ts
+++ b/src/apis/containeranalysis/v1beta1.ts
@@ -1545,6 +1545,55 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.notes.batchCreate
* @desc Creates new notes in batch.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.batchCreate({
+ * // Required. The name of the project in the form of `projects/[PROJECT_ID]`, under which
+ * // the notes are to be created.
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "notes": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "notes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.batchCreate
* @memberOf! ()
*
@@ -1625,6 +1674,89 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.notes.create
* @desc Creates a new note.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.create({
+ * // Required. The ID to use for this note.
+ * noteId: 'placeholder-value',
+ * // Required. The name of the project in the form of `projects/[PROJECT_ID]`, under which
+ * // the note is to be created.
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attestationAuthority": {},
+ * // "baseImage": {},
+ * // "build": {},
+ * // "createTime": "my_createTime",
+ * // "deployable": {},
+ * // "discovery": {},
+ * // "expirationTime": "my_expirationTime",
+ * // "intoto": {},
+ * // "kind": "my_kind",
+ * // "longDescription": "my_longDescription",
+ * // "name": "my_name",
+ * // "package": {},
+ * // "relatedNoteNames": [],
+ * // "relatedUrl": [],
+ * // "shortDescription": "my_shortDescription",
+ * // "updateTime": "my_updateTime",
+ * // "vulnerability": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestationAuthority": {},
+ * // "baseImage": {},
+ * // "build": {},
+ * // "createTime": "my_createTime",
+ * // "deployable": {},
+ * // "discovery": {},
+ * // "expirationTime": "my_expirationTime",
+ * // "intoto": {},
+ * // "kind": "my_kind",
+ * // "longDescription": "my_longDescription",
+ * // "name": "my_name",
+ * // "package": {},
+ * // "relatedNoteNames": [],
+ * // "relatedUrl": [],
+ * // "shortDescription": "my_shortDescription",
+ * // "updateTime": "my_updateTime",
+ * // "vulnerability": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.create
* @memberOf! ()
*
@@ -1700,6 +1832,45 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.notes.delete
* @desc Deletes the specified note.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.delete({
+ * // Required. The name of the note in the form of
+ * // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+ * name: 'projects/my-project/notes/my-note',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.delete
* @memberOf! ()
*
@@ -1770,6 +1941,63 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.notes.get
* @desc Gets the specified note.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.get({
+ * // Required. The name of the note in the form of
+ * // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+ * name: 'projects/my-project/notes/my-note',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestationAuthority": {},
+ * // "baseImage": {},
+ * // "build": {},
+ * // "createTime": "my_createTime",
+ * // "deployable": {},
+ * // "discovery": {},
+ * // "expirationTime": "my_expirationTime",
+ * // "intoto": {},
+ * // "kind": "my_kind",
+ * // "longDescription": "my_longDescription",
+ * // "name": "my_name",
+ * // "package": {},
+ * // "relatedNoteNames": [],
+ * // "relatedUrl": [],
+ * // "shortDescription": "my_shortDescription",
+ * // "updateTime": "my_updateTime",
+ * // "vulnerability": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.get
* @memberOf! ()
*
@@ -1840,6 +2068,57 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.notes.getIamPolicy
* @desc Gets the access control policy for a note or an occurrence resource. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/notes/my-note',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.getIamPolicy
* @memberOf! ()
*
@@ -1914,6 +2193,55 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.notes.list
* @desc Lists notes for the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.list({
+ * // The filter expression.
+ * filter: 'placeholder-value',
+ * // Number of notes to return in the list. Must be positive. Max allowed page
+ * // size is 1000. If not specified, page size defaults to 20.
+ * pageSize: 'placeholder-value',
+ * // Token to provide to skip to a particular spot in the list.
+ * pageToken: 'placeholder-value',
+ * // Required. The name of the project to list notes for in the form of
+ * // `projects/[PROJECT_ID]`.
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "notes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.list
* @memberOf! ()
*
@@ -1992,6 +2320,89 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.notes.patch
* @desc Updates the specified note.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.patch({
+ * // Required. The name of the note in the form of
+ * // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+ * name: 'projects/my-project/notes/my-note',
+ * // The fields to update.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attestationAuthority": {},
+ * // "baseImage": {},
+ * // "build": {},
+ * // "createTime": "my_createTime",
+ * // "deployable": {},
+ * // "discovery": {},
+ * // "expirationTime": "my_expirationTime",
+ * // "intoto": {},
+ * // "kind": "my_kind",
+ * // "longDescription": "my_longDescription",
+ * // "name": "my_name",
+ * // "package": {},
+ * // "relatedNoteNames": [],
+ * // "relatedUrl": [],
+ * // "shortDescription": "my_shortDescription",
+ * // "updateTime": "my_updateTime",
+ * // "vulnerability": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestationAuthority": {},
+ * // "baseImage": {},
+ * // "build": {},
+ * // "createTime": "my_createTime",
+ * // "deployable": {},
+ * // "discovery": {},
+ * // "expirationTime": "my_expirationTime",
+ * // "intoto": {},
+ * // "kind": "my_kind",
+ * // "longDescription": "my_longDescription",
+ * // "name": "my_name",
+ * // "package": {},
+ * // "relatedNoteNames": [],
+ * // "relatedUrl": [],
+ * // "shortDescription": "my_shortDescription",
+ * // "updateTime": "my_updateTime",
+ * // "vulnerability": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.patch
* @memberOf! ()
*
@@ -2064,6 +2475,57 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.notes.setIamPolicy
* @desc Sets the access control policy on the specified note or occurrence. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or an occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/notes/my-note',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.setIamPolicy
* @memberOf! ()
*
@@ -2138,6 +2600,55 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.notes.testIamPermissions
* @desc Returns the permissions that a caller has on the specified note or occurrence. Requires list permission on the project (for example, `containeranalysis.notes.list`). The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/notes/my-note',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.testIamPermissions
* @memberOf! ()
*
@@ -2387,6 +2898,54 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.notes.occurrences.list
* @desc Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.notes.occurrences.list({
+ * // The filter expression.
+ * filter: 'placeholder-value',
+ * // Required. The name of the note to list occurrences for in the form of
+ * // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+ * name: 'projects/my-project/notes/my-note',
+ * // Number of occurrences to return in the list.
+ * pageSize: 'placeholder-value',
+ * // Token to provide to skip to a particular spot in the list.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "occurrences": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.notes.occurrences.list
* @memberOf! ()
*
@@ -2504,6 +3063,55 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.occurrences.batchCreate
* @desc Creates new occurrences in batch.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.batchCreate({
+ * // Required. The name of the project in the form of `projects/[PROJECT_ID]`, under which
+ * // the occurrences are to be created.
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "occurrences": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "occurrences": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.batchCreate
* @memberOf! ()
*
@@ -2588,6 +3196,83 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.occurrences.create
* @desc Creates a new occurrence.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.create({
+ * // Required. The name of the project in the form of `projects/[PROJECT_ID]`, under which
+ * // the occurrence is to be created.
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attestation": {},
+ * // "build": {},
+ * // "createTime": "my_createTime",
+ * // "deployment": {},
+ * // "derivedImage": {},
+ * // "discovered": {},
+ * // "installation": {},
+ * // "intoto": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "noteName": "my_noteName",
+ * // "remediation": "my_remediation",
+ * // "resource": {},
+ * // "updateTime": "my_updateTime",
+ * // "vulnerability": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestation": {},
+ * // "build": {},
+ * // "createTime": "my_createTime",
+ * // "deployment": {},
+ * // "derivedImage": {},
+ * // "discovered": {},
+ * // "installation": {},
+ * // "intoto": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "noteName": "my_noteName",
+ * // "remediation": "my_remediation",
+ * // "resource": {},
+ * // "updateTime": "my_updateTime",
+ * // "vulnerability": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.create
* @memberOf! ()
*
@@ -2664,6 +3349,45 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.occurrences.delete
* @desc Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.delete({
+ * // Required. The name of the occurrence in the form of
+ * // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+ * name: 'projects/my-project/occurrences/my-occurrence',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.delete
* @memberOf! ()
*
@@ -2734,6 +3458,61 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.occurrences.get
* @desc Gets the specified occurrence.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.get({
+ * // Required. The name of the occurrence in the form of
+ * // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+ * name: 'projects/my-project/occurrences/my-occurrence',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestation": {},
+ * // "build": {},
+ * // "createTime": "my_createTime",
+ * // "deployment": {},
+ * // "derivedImage": {},
+ * // "discovered": {},
+ * // "installation": {},
+ * // "intoto": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "noteName": "my_noteName",
+ * // "remediation": "my_remediation",
+ * // "resource": {},
+ * // "updateTime": "my_updateTime",
+ * // "vulnerability": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.get
* @memberOf! ()
*
@@ -2806,6 +3585,57 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.occurrences.getIamPolicy
* @desc Gets the access control policy for a note or an occurrence resource. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/occurrences/my-occurrence',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.getIamPolicy
* @memberOf! ()
*
@@ -2880,6 +3710,63 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.occurrences.getNotes
* @desc Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.getNotes({
+ * // Required. The name of the occurrence in the form of
+ * // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+ * name: 'projects/my-project/occurrences/my-occurrence',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestationAuthority": {},
+ * // "baseImage": {},
+ * // "build": {},
+ * // "createTime": "my_createTime",
+ * // "deployable": {},
+ * // "discovery": {},
+ * // "expirationTime": "my_expirationTime",
+ * // "intoto": {},
+ * // "kind": "my_kind",
+ * // "longDescription": "my_longDescription",
+ * // "name": "my_name",
+ * // "package": {},
+ * // "relatedNoteNames": [],
+ * // "relatedUrl": [],
+ * // "shortDescription": "my_shortDescription",
+ * // "updateTime": "my_updateTime",
+ * // "vulnerability": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.getNotes
* @memberOf! ()
*
@@ -2953,6 +3840,51 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.occurrences.getVulnerabilitySummary
* @desc Gets a summary of the number and severity of occurrences.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.getVulnerabilitySummary(
+ * {
+ * // The filter expression.
+ * filter: 'placeholder-value',
+ * // Required. The name of the project to get a vulnerability summary for in the form of
+ * // `projects/[PROJECT_ID]`.
+ * parent: 'projects/my-project',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "counts": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.getVulnerabilitySummary
* @memberOf! ()
*
@@ -3037,6 +3969,55 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.occurrences.list
* @desc Lists occurrences for the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.list({
+ * // The filter expression.
+ * filter: 'placeholder-value',
+ * // Number of occurrences to return in the list. Must be positive. Max allowed
+ * // page size is 1000. If not specified, page size defaults to 20.
+ * pageSize: 'placeholder-value',
+ * // Token to provide to skip to a particular spot in the list.
+ * pageToken: 'placeholder-value',
+ * // Required. The name of the project to list occurrences for in the form of
+ * // `projects/[PROJECT_ID]`.
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "occurrences": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.list
* @memberOf! ()
*
@@ -3117,6 +4098,85 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.occurrences.patch
* @desc Updates the specified occurrence.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.patch({
+ * // Required. The name of the occurrence in the form of
+ * // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+ * name: 'projects/my-project/occurrences/my-occurrence',
+ * // The fields to update.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attestation": {},
+ * // "build": {},
+ * // "createTime": "my_createTime",
+ * // "deployment": {},
+ * // "derivedImage": {},
+ * // "discovered": {},
+ * // "installation": {},
+ * // "intoto": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "noteName": "my_noteName",
+ * // "remediation": "my_remediation",
+ * // "resource": {},
+ * // "updateTime": "my_updateTime",
+ * // "vulnerability": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attestation": {},
+ * // "build": {},
+ * // "createTime": "my_createTime",
+ * // "deployment": {},
+ * // "derivedImage": {},
+ * // "discovered": {},
+ * // "installation": {},
+ * // "intoto": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "noteName": "my_noteName",
+ * // "remediation": "my_remediation",
+ * // "resource": {},
+ * // "updateTime": "my_updateTime",
+ * // "vulnerability": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.patch
* @memberOf! ()
*
@@ -3191,6 +4251,57 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.occurrences.setIamPolicy
* @desc Sets the access control policy on the specified note or occurrence. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or an occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/occurrences/my-occurrence',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.setIamPolicy
* @memberOf! ()
*
@@ -3265,6 +4376,55 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.occurrences.testIamPermissions
* @desc Returns the permissions that a caller has on the specified note or occurrence. Requires list permission on the project (for example, `containeranalysis.notes.list`). The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.occurrences.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/occurrences/my-occurrence',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.occurrences.testIamPermissions
* @memberOf! ()
*
@@ -3538,6 +4698,51 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.scanConfigs.get
* @desc Gets the specified scan configuration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.scanConfigs.get({
+ * // Required. The name of the scan configuration in the form of
+ * // `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.
+ * name: 'projects/my-project/scanConfigs/my-scanConfig',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "enabled": false,
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.scanConfigs.get
* @memberOf! ()
*
@@ -3610,6 +4815,54 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.scanConfigs.list
* @desc Lists scan configurations for the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.scanConfigs.list({
+ * // Required. The filter expression.
+ * filter: 'placeholder-value',
+ * // The number of scan configs to return in the list.
+ * pageSize: 'placeholder-value',
+ * // Token to provide to skip to a particular spot in the list.
+ * pageToken: 'placeholder-value',
+ * // Required. The name of the project to list scan configurations for in the form of
+ * // `projects/[PROJECT_ID]`.
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "scanConfigs": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.scanConfigs.list
* @memberOf! ()
*
@@ -3690,6 +4943,63 @@ export namespace containeranalysis_v1beta1 {
/**
* containeranalysis.projects.scanConfigs.update
* @desc Updates the specified scan configuration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/containeranalysis.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const containeranalysis = google.containeranalysis('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await containeranalysis.projects.scanConfigs.update({
+ * // Required. The name of the scan configuration in the form of
+ * // `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.
+ * name: 'projects/my-project/scanConfigs/my-scanConfig',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "enabled": false,
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "enabled": false,
+ * // "name": "my_name",
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias containeranalysis.projects.scanConfigs.update
* @memberOf! ()
*
diff --git a/src/apis/content/v2.1.ts b/src/apis/content/v2.1.ts
index 424926bea2a..8896077a8ae 100644
--- a/src/apis/content/v2.1.ts
+++ b/src/apis/content/v2.1.ts
@@ -5378,6 +5378,44 @@ export namespace content_v2_1 {
/**
* content.accounts.authinfo
* @desc Returns information about the authenticated user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.authinfo({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountIdentifiers": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.authinfo
* @memberOf! ()
*
@@ -5455,6 +5493,50 @@ export namespace content_v2_1 {
/**
* content.accounts.claimwebsite
* @desc Claims the website of a Merchant Center sub-account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.claimwebsite({
+ * // The ID of the account whose website is claimed.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * // Only available to selected merchants. When set to `True`, this flag removes any existing claim on the requested website by another account and replaces it with a claim from this account.
+ * overwrite: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.claimwebsite
* @memberOf! ()
*
@@ -5540,6 +5622,52 @@ export namespace content_v2_1 {
/**
* content.accounts.custombatch
* @desc Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.custombatch({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.custombatch
* @memberOf! ()
*
@@ -5621,6 +5749,45 @@ export namespace content_v2_1 {
/**
* content.accounts.delete
* @desc Deletes a Merchant Center sub-account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.delete({
+ * // The ID of the account.
+ * accountId: 'placeholder-value',
+ * // Flag to delete sub-accounts with products. The default value is false.
+ * force: 'placeholder-value',
+ * // The ID of the managing account. This must be a multi-client account, and accountId must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.delete
* @memberOf! ()
*
@@ -5693,6 +5860,58 @@ export namespace content_v2_1 {
/**
* content.accounts.get
* @desc Retrieves a Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.get({
+ * // The ID of the account.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adsLinks": [],
+ * // "adultContent": false,
+ * // "businessInformation": {},
+ * // "googleMyBusinessLink": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "sellerId": "my_sellerId",
+ * // "users": [],
+ * // "websiteUrl": "my_websiteUrl",
+ * // "youtubeChannelLinks": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.get
* @memberOf! ()
*
@@ -5764,6 +5983,74 @@ export namespace content_v2_1 {
/**
* content.accounts.insert
* @desc Creates a Merchant Center sub-account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.insert({
+ * // The ID of the managing account. This must be a multi-client account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adsLinks": [],
+ * // "adultContent": false,
+ * // "businessInformation": {},
+ * // "googleMyBusinessLink": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "sellerId": "my_sellerId",
+ * // "users": [],
+ * // "websiteUrl": "my_websiteUrl",
+ * // "youtubeChannelLinks": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adsLinks": [],
+ * // "adultContent": false,
+ * // "businessInformation": {},
+ * // "googleMyBusinessLink": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "sellerId": "my_sellerId",
+ * // "users": [],
+ * // "websiteUrl": "my_websiteUrl",
+ * // "youtubeChannelLinks": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.insert
* @memberOf! ()
*
@@ -5836,6 +6123,59 @@ export namespace content_v2_1 {
/**
* content.accounts.link
* @desc Performs an action on a link between two Merchant Center accounts, namely accountId and linkedAccountId.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.link({
+ * // The ID of the account that should be linked.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "linkType": "my_linkType",
+ * // "linkedAccountId": "my_linkedAccountId",
+ * // "services": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.link
* @memberOf! ()
*
@@ -5912,6 +6252,52 @@ export namespace content_v2_1 {
/**
* content.accounts.list
* @desc Lists the sub-accounts in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.list({
+ * // The maximum number of accounts to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the managing account. This must be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.list
* @memberOf! ()
*
@@ -5989,6 +6375,54 @@ export namespace content_v2_1 {
/**
* content.accounts.listlinks
* @desc Returns the list of accounts linked to your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.listlinks({
+ * // The ID of the account for which to list links.
+ * accountId: 'placeholder-value',
+ * // The maximum number of links to return in the response, used for pagination.
+ * maxResults: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "links": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.listlinks
* @memberOf! ()
*
@@ -6073,6 +6507,76 @@ export namespace content_v2_1 {
/**
* content.accounts.update
* @desc Updates a Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.update({
+ * // The ID of the account.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adsLinks": [],
+ * // "adultContent": false,
+ * // "businessInformation": {},
+ * // "googleMyBusinessLink": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "sellerId": "my_sellerId",
+ * // "users": [],
+ * // "websiteUrl": "my_websiteUrl",
+ * // "youtubeChannelLinks": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adsLinks": [],
+ * // "adultContent": false,
+ * // "businessInformation": {},
+ * // "googleMyBusinessLink": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "sellerId": "my_sellerId",
+ * // "users": [],
+ * // "websiteUrl": "my_websiteUrl",
+ * // "youtubeChannelLinks": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.update
* @memberOf! ()
*
@@ -6325,6 +6829,52 @@ export namespace content_v2_1 {
/**
* content.accountstatuses.custombatch
* @desc Retrieves multiple Merchant Center account statuses in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accountstatuses.custombatch({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accountstatuses.custombatch
* @memberOf! ()
*
@@ -6408,6 +6958,54 @@ export namespace content_v2_1 {
/**
* content.accountstatuses.get
* @desc Retrieves the status of a Merchant Center account. No itemLevelIssues are returned for multi-client accounts.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accountstatuses.get({
+ * // The ID of the account.
+ * accountId: 'placeholder-value',
+ * // If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.
+ * destinations: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "accountLevelIssues": [],
+ * // "kind": "my_kind",
+ * // "products": [],
+ * // "websiteClaimed": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accountstatuses.get
* @memberOf! ()
*
@@ -6483,6 +7081,54 @@ export namespace content_v2_1 {
/**
* content.accountstatuses.list
* @desc Lists the statuses of the sub-accounts in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accountstatuses.list({
+ * // If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.
+ * destinations: 'placeholder-value',
+ * // The maximum number of account statuses to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the managing account. This must be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accountstatuses.list
* @memberOf! ()
*
@@ -6630,6 +7276,52 @@ export namespace content_v2_1 {
/**
* content.accounttax.custombatch
* @desc Retrieves and updates tax settings of multiple accounts in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounttax.custombatch({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounttax.custombatch
* @memberOf! ()
*
@@ -6713,6 +7405,50 @@ export namespace content_v2_1 {
/**
* content.accounttax.get
* @desc Retrieves the tax settings of the account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounttax.get({
+ * // The ID of the account for which to get/update account tax settings.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "kind": "my_kind",
+ * // "rules": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounttax.get
* @memberOf! ()
*
@@ -6786,6 +7522,52 @@ export namespace content_v2_1 {
/**
* content.accounttax.list
* @desc Lists the tax settings of the sub-accounts in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounttax.list({
+ * // The maximum number of tax settings to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the managing account. This must be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounttax.list
* @memberOf! ()
*
@@ -6863,6 +7645,60 @@ export namespace content_v2_1 {
/**
* content.accounttax.update
* @desc Updates the tax settings of the account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounttax.update({
+ * // The ID of the account for which to get/update account tax settings.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "kind": "my_kind",
+ * // "rules": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "kind": "my_kind",
+ * // "rules": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounttax.update
* @memberOf! ()
*
@@ -7013,6 +7849,52 @@ export namespace content_v2_1 {
/**
* content.datafeeds.custombatch
* @desc Deletes, fetches, gets, inserts and updates multiple datafeeds in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeeds.custombatch({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeeds.custombatch
* @memberOf! ()
*
@@ -7096,6 +7978,43 @@ export namespace content_v2_1 {
/**
* content.datafeeds.delete
* @desc Deletes a datafeed configuration from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeeds.delete({
+ * // The ID of the datafeed.
+ * datafeedId: 'placeholder-value',
+ * // The ID of the account that manages the datafeed. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeeds.delete
* @memberOf! ()
*
@@ -7167,6 +8086,48 @@ export namespace content_v2_1 {
/**
* content.datafeeds.fetchnow
* @desc Invokes a fetch for the datafeed in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeeds.fetchnow({
+ * // The ID of the datafeed to be fetched.
+ * datafeedId: 'placeholder-value',
+ * // The ID of the account that manages the datafeed. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeeds.fetchnow
* @memberOf! ()
*
@@ -7249,6 +8210,56 @@ export namespace content_v2_1 {
/**
* content.datafeeds.get
* @desc Retrieves a datafeed configuration from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeeds.get({
+ * // The ID of the datafeed.
+ * datafeedId: 'placeholder-value',
+ * // The ID of the account that manages the datafeed. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attributeLanguage": "my_attributeLanguage",
+ * // "contentType": "my_contentType",
+ * // "fetchSchedule": {},
+ * // "fileName": "my_fileName",
+ * // "format": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "targets": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeeds.get
* @memberOf! ()
*
@@ -7320,6 +8331,70 @@ export namespace content_v2_1 {
/**
* content.datafeeds.insert
* @desc Registers a datafeed configuration with your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeeds.insert({
+ * // The ID of the account that manages the datafeed. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attributeLanguage": "my_attributeLanguage",
+ * // "contentType": "my_contentType",
+ * // "fetchSchedule": {},
+ * // "fileName": "my_fileName",
+ * // "format": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "targets": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attributeLanguage": "my_attributeLanguage",
+ * // "contentType": "my_contentType",
+ * // "fetchSchedule": {},
+ * // "fileName": "my_fileName",
+ * // "format": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "targets": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeeds.insert
* @memberOf! ()
*
@@ -7392,6 +8467,52 @@ export namespace content_v2_1 {
/**
* content.datafeeds.list
* @desc Lists the configurations for datafeeds in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeeds.list({
+ * // The maximum number of products to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the account that manages the datafeeds. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeeds.list
* @memberOf! ()
*
@@ -7469,6 +8590,72 @@ export namespace content_v2_1 {
/**
* content.datafeeds.update
* @desc Updates a datafeed configuration of your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeeds.update({
+ * // The ID of the datafeed.
+ * datafeedId: 'placeholder-value',
+ * // The ID of the account that manages the datafeed. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attributeLanguage": "my_attributeLanguage",
+ * // "contentType": "my_contentType",
+ * // "fetchSchedule": {},
+ * // "fileName": "my_fileName",
+ * // "format": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "targets": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attributeLanguage": "my_attributeLanguage",
+ * // "contentType": "my_contentType",
+ * // "fetchSchedule": {},
+ * // "fileName": "my_fileName",
+ * // "format": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "targets": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeeds.update
* @memberOf! ()
*
@@ -7662,6 +8849,52 @@ export namespace content_v2_1 {
/**
* content.datafeedstatuses.custombatch
* @desc Gets multiple Merchant Center datafeed statuses in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeedstatuses.custombatch({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeedstatuses.custombatch
* @memberOf! ()
*
@@ -7747,6 +8980,61 @@ export namespace content_v2_1 {
/**
* content.datafeedstatuses.get
* @desc Retrieves the status of a datafeed from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeedstatuses.get({
+ * // The country for which to get the datafeed status. If this parameter is provided then language must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.
+ * country: 'placeholder-value',
+ * // The ID of the datafeed.
+ * datafeedId: 'placeholder-value',
+ * // The language for which to get the datafeed status. If this parameter is provided then country must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.
+ * language: 'placeholder-value',
+ * // The ID of the account that manages the datafeed. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "country": "my_country",
+ * // "datafeedId": "my_datafeedId",
+ * // "errors": [],
+ * // "itemsTotal": "my_itemsTotal",
+ * // "itemsValid": "my_itemsValid",
+ * // "kind": "my_kind",
+ * // "language": "my_language",
+ * // "lastUploadDate": "my_lastUploadDate",
+ * // "processingStatus": "my_processingStatus",
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeedstatuses.get
* @memberOf! ()
*
@@ -7824,6 +9112,52 @@ export namespace content_v2_1 {
/**
* content.datafeedstatuses.list
* @desc Lists the statuses of the datafeeds in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeedstatuses.list({
+ * // The maximum number of products to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the account that manages the datafeeds. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeedstatuses.list
* @memberOf! ()
*
@@ -7972,6 +9306,52 @@ export namespace content_v2_1 {
/**
* content.liasettings.custombatch
* @desc Retrieves and/or updates the LIA settings of multiple accounts in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.custombatch({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.custombatch
* @memberOf! ()
*
@@ -8055,6 +9435,50 @@ export namespace content_v2_1 {
/**
* content.liasettings.get
* @desc Retrieves the LIA settings of the account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.get({
+ * // The ID of the account for which to get or update LIA settings.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "countrySettings": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.get
* @memberOf! ()
*
@@ -8128,6 +9552,50 @@ export namespace content_v2_1 {
/**
* content.liasettings.getaccessiblegmbaccounts
* @desc Retrieves the list of accessible Google My Business accounts.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.getaccessiblegmbaccounts({
+ * // The ID of the account for which to retrieve accessible Google My Business accounts.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "gmbAccounts": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.getaccessiblegmbaccounts
* @memberOf! ()
*
@@ -8228,6 +9696,52 @@ export namespace content_v2_1 {
/**
* content.liasettings.list
* @desc Lists the LIA settings of the sub-accounts in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.list({
+ * // The maximum number of LIA settings to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the managing account. This must be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.list
* @memberOf! ()
*
@@ -8305,6 +9819,44 @@ export namespace content_v2_1 {
/**
* content.liasettings.listposdataproviders
* @desc Retrieves the list of POS data providers that have active settings for the all eiligible countries.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.listposdataproviders({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "posDataProviders": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.listposdataproviders
* @memberOf! ()
*
@@ -8394,6 +9946,50 @@ export namespace content_v2_1 {
/**
* content.liasettings.requestgmbaccess
* @desc Requests access to a specified Google My Business account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.requestgmbaccess({
+ * // The ID of the account for which GMB access is requested.
+ * accountId: 'placeholder-value',
+ * // The email of the Google My Business account.
+ * gmbEmail: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.requestgmbaccess
* @memberOf! ()
*
@@ -8481,6 +10077,50 @@ export namespace content_v2_1 {
/**
* content.liasettings.requestinventoryverification
* @desc Requests inventory validation for the specified country.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.requestinventoryverification({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * accountId: 'placeholder-value',
+ * // The country for which inventory validation is requested.
+ * country: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.requestinventoryverification
* @memberOf! ()
*
@@ -8581,6 +10221,56 @@ export namespace content_v2_1 {
/**
* content.liasettings.setinventoryverificationcontact
* @desc Sets the inventory verification contract for the specified country.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.setinventoryverificationcontact({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * accountId: 'placeholder-value',
+ * // The email of the inventory verification contact.
+ * contactEmail: 'placeholder-value',
+ * // The name of the inventory verification contact.
+ * contactName: 'placeholder-value',
+ * // The country for which inventory verification is requested.
+ * country: 'placeholder-value',
+ * // The language for which inventory verification is requested.
+ * language: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.setinventoryverificationcontact
* @memberOf! ()
*
@@ -8691,6 +10381,54 @@ export namespace content_v2_1 {
/**
* content.liasettings.setposdataprovider
* @desc Sets the POS data provider for the specified country.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.setposdataprovider({
+ * // The ID of the account for which to retrieve accessible Google My Business accounts.
+ * accountId: 'placeholder-value',
+ * // The country for which the POS data provider is selected.
+ * country: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * // The ID of POS data provider.
+ * posDataProviderId: 'placeholder-value',
+ * // The account ID by which this merchant is known to the POS data provider.
+ * posExternalAccountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.setposdataprovider
* @memberOf! ()
*
@@ -8786,6 +10524,60 @@ export namespace content_v2_1 {
/**
* content.liasettings.update
* @desc Updates the LIA settings of the account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.update({
+ * // The ID of the account for which to get or update LIA settings.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "countrySettings": [],
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "countrySettings": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.update
* @memberOf! ()
*
@@ -9059,6 +10851,52 @@ export namespace content_v2_1 {
/**
* content.localinventory.custombatch
* @desc Updates local inventory for multiple products or stores in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.localinventory.custombatch({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.localinventory.custombatch
* @memberOf! ()
*
@@ -9142,6 +10980,74 @@ export namespace content_v2_1 {
/**
* content.localinventory.insert
* @desc Update the local inventory of a product in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.localinventory.insert({
+ * // The ID of the account that contains the product. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The REST ID of the product for which to update local inventory.
+ * productId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "availability": "my_availability",
+ * // "instoreProductLocation": "my_instoreProductLocation",
+ * // "kind": "my_kind",
+ * // "pickupMethod": "my_pickupMethod",
+ * // "pickupSla": "my_pickupSla",
+ * // "price": {},
+ * // "quantity": 0,
+ * // "salePrice": {},
+ * // "salePriceEffectiveDate": "my_salePriceEffectiveDate",
+ * // "storeCode": "my_storeCode"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "availability": "my_availability",
+ * // "instoreProductLocation": "my_instoreProductLocation",
+ * // "kind": "my_kind",
+ * // "pickupMethod": "my_pickupMethod",
+ * // "pickupSla": "my_pickupSla",
+ * // "price": {},
+ * // "quantity": 0,
+ * // "salePrice": {},
+ * // "salePriceEffectiveDate": "my_salePriceEffectiveDate",
+ * // "storeCode": "my_storeCode"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.localinventory.insert
* @memberOf! ()
*
@@ -9259,6 +11165,61 @@ export namespace content_v2_1 {
/**
* content.orderinvoices.createchargeinvoice
* @desc Creates a charge invoice for a shipment group, and triggers a charge capture for orderinvoice enabled orders.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orderinvoices.createchargeinvoice({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "invoiceId": "my_invoiceId",
+ * // "invoiceSummary": {},
+ * // "lineItemInvoices": [],
+ * // "operationId": "my_operationId",
+ * // "shipmentGroupId": "my_shipmentGroupId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orderinvoices.createchargeinvoice
* @memberOf! ()
*
@@ -9352,6 +11313,61 @@ export namespace content_v2_1 {
/**
* content.orderinvoices.createrefundinvoice
* @desc Creates a refund invoice for one or more shipment groups, and triggers a refund for orderinvoice enabled orders. This can only be used for line items that have previously been charged using `createChargeInvoice`. All amounts (except for the summary) are incremental with respect to the previous invoice.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orderinvoices.createrefundinvoice({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "invoiceId": "my_invoiceId",
+ * // "operationId": "my_operationId",
+ * // "refundOnlyOption": {},
+ * // "returnOption": {},
+ * // "shipmentInvoices": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orderinvoices.createrefundinvoice
* @memberOf! ()
*
@@ -9495,6 +11511,56 @@ export namespace content_v2_1 {
/**
* content.orderreports.listdisbursements
* @desc Retrieves a report for disbursements from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orderreports.listdisbursements({
+ * // The last date which disbursements occurred. In ISO 8601 format. Default: current date.
+ * disbursementEndDate: 'placeholder-value',
+ * // The first date which disbursements occurred. In ISO 8601 format.
+ * disbursementStartDate: 'placeholder-value',
+ * // The maximum number of disbursements to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "disbursements": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orderreports.listdisbursements
* @memberOf! ()
*
@@ -9589,6 +11655,58 @@ export namespace content_v2_1 {
/**
* content.orderreports.listtransactions
* @desc Retrieves a list of transactions for a disbursement from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orderreports.listtransactions({
+ * // The Google-provided ID of the disbursement (found in Wallet).
+ * disbursementId: 'placeholder-value',
+ * // The maximum number of disbursements to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * // The last date in which transaction occurred. In ISO 8601 format. Default: current date.
+ * transactionEndDate: 'placeholder-value',
+ * // The first date in which transaction occurred. In ISO 8601 format.
+ * transactionStartDate: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "transactions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orderreports.listtransactions
* @memberOf! ()
*
@@ -9757,6 +11875,57 @@ export namespace content_v2_1 {
/**
* content.orderreturns.acknowledge
* @desc Acks an order return in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orderreturns.acknowledge({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the return.
+ * returnId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "operationId": "my_operationId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orderreturns.acknowledge
* @memberOf! ()
*
@@ -9842,6 +12011,54 @@ export namespace content_v2_1 {
/**
* content.orderreturns.get
* @desc Retrieves an order return from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orderreturns.get({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // Merchant order return ID generated by Google.
+ * returnId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationDate": "my_creationDate",
+ * // "merchantOrderId": "my_merchantOrderId",
+ * // "orderId": "my_orderId",
+ * // "orderReturnId": "my_orderReturnId",
+ * // "returnItems": [],
+ * // "returnPricingInfo": {},
+ * // "returnShipments": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orderreturns.get
* @memberOf! ()
*
@@ -9915,6 +12132,73 @@ export namespace content_v2_1 {
/**
* content.orderreturns.list
* @desc Lists order returns in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orderreturns.list({
+ * // Obtains order returns that match the acknowledgement status. When set to true, obtains order returns that have been acknowledged. When false, obtains order returns that have not been acknowledged. When not provided, obtains order returns regardless of their acknowledgement status.
+ * // We recommend using this filter set to `false`, in conjunction with the `acknowledge` call, such that only un-acknowledged order returns are returned.
+ * acknowledged: 'placeholder-value',
+ * // Obtains order returns created before this date (inclusively), in ISO 8601 format.
+ * createdEndDate: 'placeholder-value',
+ * // Obtains order returns created after this date (inclusively), in ISO 8601 format.
+ * createdStartDate: 'placeholder-value',
+ * // Obtains order returns with the specified order ids. If this parameter is provided, createdStartDate, createdEndDate, shipmentType, shipmentStatus, shipmentState and acknowledged parameters must be not set.
+ * // Note: if googleOrderId and shipmentTrackingNumber parameters are provided, the obtained results will include all order returns that either match the specified order id or the specified tracking number.
+ * googleOrderIds: 'placeholder-value',
+ * // The maximum number of order returns to return in the response, used for paging. The default value is 25 returns per page, and the maximum allowed value is 250 returns per page.
+ * maxResults: 'placeholder-value',
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // Return the results in the specified order.
+ * orderBy: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * // Obtains order returns that match any shipment state provided in this parameter. When this parameter is not provided, order returns are obtained regardless of their shipment states.
+ * shipmentStates: 'placeholder-value',
+ * // Obtains order returns that match any shipment status provided in this parameter. When this parameter is not provided, order returns are obtained regardless of their shipment statuses.
+ * shipmentStatus: 'placeholder-value',
+ * // Obtains order returns with the specified tracking numbers. If this parameter is provided, createdStartDate, createdEndDate, shipmentType, shipmentStatus, shipmentState and acknowledged parameters must be not set.
+ * // Note: if googleOrderId and shipmentTrackingNumber parameters are provided, the obtained results will include all order returns that either match the specified order id or the specified tracking number.
+ * shipmentTrackingNumbers: 'placeholder-value',
+ * // Obtains order returns that match any shipment type provided in this parameter. When this parameter is not provided, order returns are obtained regardless of their shipment types.
+ * shipmentTypes: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orderreturns.list
* @memberOf! ()
*
@@ -10002,6 +12286,60 @@ export namespace content_v2_1 {
/**
* content.orderreturns.process
* @desc Processes return in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orderreturns.process({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the return.
+ * returnId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fullChargeReturnShippingCost": false,
+ * // "operationId": "my_operationId",
+ * // "refundShippingFee": {},
+ * // "returnItems": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orderreturns.process
* @memberOf! ()
*
@@ -10206,6 +12544,57 @@ export namespace content_v2_1 {
/**
* content.orders.acknowledge
* @desc Marks an order as acknowledged.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.acknowledge({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "operationId": "my_operationId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.acknowledge
* @memberOf! ()
*
@@ -10289,6 +12678,48 @@ export namespace content_v2_1 {
/**
* content.orders.advancetestorder
* @desc Sandbox only. Moves a test order from state "`inProgress`" to state "`pendingShipment`".
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.advancetestorder({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the test order to modify.
+ * orderId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.advancetestorder
* @memberOf! ()
*
@@ -10373,6 +12804,59 @@ export namespace content_v2_1 {
/**
* content.orders.cancel
* @desc Cancels all line items in an order, making a full refund.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.cancel({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order to cancel.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "operationId": "my_operationId",
+ * // "reason": "my_reason",
+ * // "reasonText": "my_reasonText"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.cancel
* @memberOf! ()
*
@@ -10449,6 +12933,62 @@ export namespace content_v2_1 {
/**
* content.orders.cancellineitem
* @desc Cancels a line item, making a full refund.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.cancellineitem({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "lineItemId": "my_lineItemId",
+ * // "operationId": "my_operationId",
+ * // "productId": "my_productId",
+ * // "quantity": 0,
+ * // "reason": "my_reason",
+ * // "reasonText": "my_reasonText"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.cancellineitem
* @memberOf! ()
*
@@ -10534,6 +13074,56 @@ export namespace content_v2_1 {
/**
* content.orders.canceltestorderbycustomer
* @desc Sandbox only. Cancels a test order for customer-initiated cancellation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.canceltestorderbycustomer({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the test order to cancel.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "reason": "my_reason"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.canceltestorderbycustomer
* @memberOf! ()
*
@@ -10627,6 +13217,57 @@ export namespace content_v2_1 {
/**
* content.orders.createtestorder
* @desc Sandbox only. Creates a test order.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.createtestorder({
+ * // The ID of the account that should manage the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "country": "my_country",
+ * // "templateName": "my_templateName",
+ * // "testOrder": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "orderId": "my_orderId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.createtestorder
* @memberOf! ()
*
@@ -10711,6 +13352,57 @@ export namespace content_v2_1 {
/**
* content.orders.createtestreturn
* @desc Sandbox only. Creates a test return.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.createtestreturn({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "items": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "returnId": "my_returnId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.createtestreturn
* @memberOf! ()
*
@@ -10795,6 +13487,68 @@ export namespace content_v2_1 {
/**
* content.orders.get
* @desc Retrieves an order from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.get({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "acknowledged": false,
+ * // "billingAddress": {},
+ * // "customer": {},
+ * // "deliveryDetails": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lineItems": [],
+ * // "merchantId": "my_merchantId",
+ * // "merchantOrderId": "my_merchantOrderId",
+ * // "netPriceAmount": {},
+ * // "netTaxAmount": {},
+ * // "paymentStatus": "my_paymentStatus",
+ * // "pickupDetails": {},
+ * // "placedDate": "my_placedDate",
+ * // "promotions": [],
+ * // "refunds": [],
+ * // "shipments": [],
+ * // "shippingCost": {},
+ * // "shippingCostTax": {},
+ * // "status": "my_status",
+ * // "taxCollector": "my_taxCollector"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.get
* @memberOf! ()
*
@@ -10866,6 +13620,49 @@ export namespace content_v2_1 {
/**
* content.orders.getbymerchantorderid
* @desc Retrieves an order using merchant order ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.getbymerchantorderid({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The merchant order ID to be looked for.
+ * merchantOrderId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "order": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.getbymerchantorderid
* @memberOf! ()
*
@@ -10950,6 +13747,51 @@ export namespace content_v2_1 {
/**
* content.orders.gettestordertemplate
* @desc Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.gettestordertemplate({
+ * // The country of the template to retrieve. Defaults to `US`.
+ * country: 'placeholder-value',
+ * // The ID of the account that should manage the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The name of the template to retrieve.
+ * templateName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "template": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.gettestordertemplate
* @memberOf! ()
*
@@ -11035,6 +13877,64 @@ export namespace content_v2_1 {
/**
* content.orders.instorerefundlineitem
* @desc Deprecated. Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store). Note: We recommend calling the returnrefundlineitem method to refund in-store returns. We will issue the refund directly to the customer. This helps to prevent possible differences arising between merchant and Google transaction records. We also recommend having the point of sale system communicate with Google to ensure that customers do not receive a double refund by first refunding via Google then via an in-store return.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.instorerefundlineitem({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "lineItemId": "my_lineItemId",
+ * // "operationId": "my_operationId",
+ * // "priceAmount": {},
+ * // "productId": "my_productId",
+ * // "quantity": 0,
+ * // "reason": "my_reason",
+ * // "reasonText": "my_reasonText",
+ * // "taxAmount": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.instorerefundlineitem
* @memberOf! ()
*
@@ -11122,6 +14022,67 @@ export namespace content_v2_1 {
/**
* content.orders.list
* @desc Lists the orders in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.list({
+ * // Obtains orders that match the acknowledgement status. When set to true, obtains orders that have been acknowledged. When false, obtains orders that have not been acknowledged.
+ * // We recommend using this filter set to `false`, in conjunction with the `acknowledge` call, such that only un-acknowledged orders are returned.
+ * acknowledged: 'placeholder-value',
+ * // The maximum number of orders to return in the response, used for paging. The default value is 25 orders per page, and the maximum allowed value is 250 orders per page.
+ * maxResults: 'placeholder-value',
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // Order results by placement date in descending or ascending order.
+ * //
+ * // Acceptable values are:
+ * // - placedDateAsc
+ * // - placedDateDesc
+ * orderBy: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * // Obtains orders placed before this date (exclusively), in ISO 8601 format.
+ * placedDateEnd: 'placeholder-value',
+ * // Obtains orders placed after this date (inclusively), in ISO 8601 format.
+ * placedDateStart: 'placeholder-value',
+ * // Obtains orders that match any of the specified statuses. Please note that `active` is a shortcut for `pendingShipment` and `partiallyShipped`, and `completed` is a shortcut for `shipped`, `partiallyDelivered`, `delivered`, `partiallyReturned`, `returned`, and `canceled`.
+ * statuses: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.list
* @memberOf! ()
*
@@ -11202,6 +14163,62 @@ export namespace content_v2_1 {
/**
* content.orders.rejectreturnlineitem
* @desc Rejects return on an line item.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.rejectreturnlineitem({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "lineItemId": "my_lineItemId",
+ * // "operationId": "my_operationId",
+ * // "productId": "my_productId",
+ * // "quantity": 0,
+ * // "reason": "my_reason",
+ * // "reasonText": "my_reasonText"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.rejectreturnlineitem
* @memberOf! ()
*
@@ -11287,6 +14304,64 @@ export namespace content_v2_1 {
/**
* content.orders.returnrefundlineitem
* @desc Returns and refunds a line item. Note that this method can only be called on fully shipped orders.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.returnrefundlineitem({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "lineItemId": "my_lineItemId",
+ * // "operationId": "my_operationId",
+ * // "priceAmount": {},
+ * // "productId": "my_productId",
+ * // "quantity": 0,
+ * // "reason": "my_reason",
+ * // "reasonText": "my_reasonText",
+ * // "taxAmount": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.returnrefundlineitem
* @memberOf! ()
*
@@ -11372,6 +14447,60 @@ export namespace content_v2_1 {
/**
* content.orders.setlineitemmetadata
* @desc Sets (or overrides if it already exists) merchant provided annotations in the form of key-value pairs. A common use case would be to supply us with additional structured information about a line item that cannot be provided via other methods. Submitted key-value pairs can be retrieved as part of the orders resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.setlineitemmetadata({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "annotations": [],
+ * // "lineItemId": "my_lineItemId",
+ * // "operationId": "my_operationId",
+ * // "productId": "my_productId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.setlineitemmetadata
* @memberOf! ()
*
@@ -11457,6 +14586,60 @@ export namespace content_v2_1 {
/**
* content.orders.shiplineitems
* @desc Marks line item(s) as shipped.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.shiplineitems({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "lineItems": [],
+ * // "operationId": "my_operationId",
+ * // "shipmentGroupId": "my_shipmentGroupId",
+ * // "shipmentInfos": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.shiplineitems
* @memberOf! ()
*
@@ -11540,6 +14723,61 @@ export namespace content_v2_1 {
/**
* content.orders.updatelineitemshippingdetails
* @desc Updates ship by and delivery by dates for a line item.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.updatelineitemshippingdetails({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deliverByDate": "my_deliverByDate",
+ * // "lineItemId": "my_lineItemId",
+ * // "operationId": "my_operationId",
+ * // "productId": "my_productId",
+ * // "shipByDate": "my_shipByDate"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.updatelineitemshippingdetails
* @memberOf! ()
*
@@ -11641,6 +14879,58 @@ export namespace content_v2_1 {
/**
* content.orders.updatemerchantorderid
* @desc Updates the merchant order ID for a given order.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.updatemerchantorderid({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "merchantOrderId": "my_merchantOrderId",
+ * // "operationId": "my_operationId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.updatemerchantorderid
* @memberOf! ()
*
@@ -11728,6 +15018,62 @@ export namespace content_v2_1 {
/**
* content.orders.updateshipment
* @desc Updates a shipment's status, carrier, and/or tracking ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.updateshipment({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "carrier": "my_carrier",
+ * // "deliveryDate": "my_deliveryDate",
+ * // "operationId": "my_operationId",
+ * // "shipmentId": "my_shipmentId",
+ * // "status": "my_status",
+ * // "trackingId": "my_trackingId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.updateshipment
* @memberOf! ()
*
@@ -12216,6 +15562,52 @@ export namespace content_v2_1 {
/**
* content.pos.custombatch
* @desc Batches multiple POS-related calls in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.pos.custombatch({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.pos.custombatch
* @memberOf! ()
*
@@ -12293,6 +15685,45 @@ export namespace content_v2_1 {
/**
* content.pos.delete
* @desc Deletes a store for the given merchant.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.pos.delete({
+ * // The ID of the POS or inventory data provider.
+ * merchantId: 'placeholder-value',
+ * // A store code that is unique per merchant.
+ * storeCode: 'placeholder-value',
+ * // The ID of the target merchant.
+ * targetMerchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.pos.delete
* @memberOf! ()
*
@@ -12366,6 +15797,52 @@ export namespace content_v2_1 {
/**
* content.pos.get
* @desc Retrieves information about the given store.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.pos.get({
+ * // The ID of the POS or inventory data provider.
+ * merchantId: 'placeholder-value',
+ * // A store code that is unique per merchant.
+ * storeCode: 'placeholder-value',
+ * // The ID of the target merchant.
+ * targetMerchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "storeAddress": "my_storeAddress",
+ * // "storeCode": "my_storeCode"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.pos.get
* @memberOf! ()
*
@@ -12439,6 +15916,60 @@ export namespace content_v2_1 {
/**
* content.pos.insert
* @desc Creates a store for the given merchant.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.pos.insert({
+ * // The ID of the POS or inventory data provider.
+ * merchantId: 'placeholder-value',
+ * // The ID of the target merchant.
+ * targetMerchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "storeAddress": "my_storeAddress",
+ * // "storeCode": "my_storeCode"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "storeAddress": "my_storeAddress",
+ * // "storeCode": "my_storeCode"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.pos.insert
* @memberOf! ()
*
@@ -12512,6 +16043,71 @@ export namespace content_v2_1 {
/**
* content.pos.inventory
* @desc Submit inventory for the given merchant.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.pos.inventory({
+ * // The ID of the POS or inventory data provider.
+ * merchantId: 'placeholder-value',
+ * // The ID of the target merchant.
+ * targetMerchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "contentLanguage": "my_contentLanguage",
+ * // "gtin": "my_gtin",
+ * // "itemId": "my_itemId",
+ * // "price": {},
+ * // "quantity": "my_quantity",
+ * // "storeCode": "my_storeCode",
+ * // "targetCountry": "my_targetCountry",
+ * // "timestamp": "my_timestamp"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "contentLanguage": "my_contentLanguage",
+ * // "gtin": "my_gtin",
+ * // "itemId": "my_itemId",
+ * // "kind": "my_kind",
+ * // "price": {},
+ * // "quantity": "my_quantity",
+ * // "storeCode": "my_storeCode",
+ * // "targetCountry": "my_targetCountry",
+ * // "timestamp": "my_timestamp"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.pos.inventory
* @memberOf! ()
*
@@ -12591,6 +16187,49 @@ export namespace content_v2_1 {
/**
* content.pos.list
* @desc Lists the stores of the target merchant.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.pos.list({
+ * // The ID of the POS or inventory data provider.
+ * merchantId: 'placeholder-value',
+ * // The ID of the target merchant.
+ * targetMerchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.pos.list
* @memberOf! ()
*
@@ -12665,6 +16304,73 @@ export namespace content_v2_1 {
/**
* content.pos.sale
* @desc Submit a sale event for the given merchant.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.pos.sale({
+ * // The ID of the POS or inventory data provider.
+ * merchantId: 'placeholder-value',
+ * // The ID of the target merchant.
+ * targetMerchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "contentLanguage": "my_contentLanguage",
+ * // "gtin": "my_gtin",
+ * // "itemId": "my_itemId",
+ * // "price": {},
+ * // "quantity": "my_quantity",
+ * // "saleId": "my_saleId",
+ * // "storeCode": "my_storeCode",
+ * // "targetCountry": "my_targetCountry",
+ * // "timestamp": "my_timestamp"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "contentLanguage": "my_contentLanguage",
+ * // "gtin": "my_gtin",
+ * // "itemId": "my_itemId",
+ * // "kind": "my_kind",
+ * // "price": {},
+ * // "quantity": "my_quantity",
+ * // "saleId": "my_saleId",
+ * // "storeCode": "my_storeCode",
+ * // "targetCountry": "my_targetCountry",
+ * // "timestamp": "my_timestamp"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.pos.sale
* @memberOf! ()
*
@@ -12871,6 +16577,52 @@ export namespace content_v2_1 {
/**
* content.products.custombatch
* @desc Retrieves, inserts, and deletes multiple products in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.products.custombatch({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.products.custombatch
* @memberOf! ()
*
@@ -12952,6 +16704,45 @@ export namespace content_v2_1 {
/**
* content.products.delete
* @desc Deletes a product from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.products.delete({
+ * // The Content API Supplemental Feed ID.
+ * feedId: 'placeholder-value',
+ * // The ID of the account that contains the product. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The REST ID of the product.
+ * productId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.products.delete
* @memberOf! ()
*
@@ -13024,6 +16815,122 @@ export namespace content_v2_1 {
/**
* content.products.get
* @desc Retrieves a product from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.products.get({
+ * // The ID of the account that contains the product. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The REST ID of the product.
+ * productId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "additionalImageLinks": [],
+ * // "adsGrouping": "my_adsGrouping",
+ * // "adsLabels": [],
+ * // "adsRedirect": "my_adsRedirect",
+ * // "adult": false,
+ * // "ageGroup": "my_ageGroup",
+ * // "availability": "my_availability",
+ * // "availabilityDate": "my_availabilityDate",
+ * // "brand": "my_brand",
+ * // "channel": "my_channel",
+ * // "color": "my_color",
+ * // "condition": "my_condition",
+ * // "contentLanguage": "my_contentLanguage",
+ * // "costOfGoodsSold": {},
+ * // "customAttributes": [],
+ * // "customLabel0": "my_customLabel0",
+ * // "customLabel1": "my_customLabel1",
+ * // "customLabel2": "my_customLabel2",
+ * // "customLabel3": "my_customLabel3",
+ * // "customLabel4": "my_customLabel4",
+ * // "description": "my_description",
+ * // "displayAdsId": "my_displayAdsId",
+ * // "displayAdsLink": "my_displayAdsLink",
+ * // "displayAdsSimilarIds": [],
+ * // "displayAdsTitle": "my_displayAdsTitle",
+ * // "displayAdsValue": {},
+ * // "energyEfficiencyClass": "my_energyEfficiencyClass",
+ * // "excludedDestinations": [],
+ * // "expirationDate": "my_expirationDate",
+ * // "gender": "my_gender",
+ * // "googleProductCategory": "my_googleProductCategory",
+ * // "gtin": "my_gtin",
+ * // "id": "my_id",
+ * // "identifierExists": false,
+ * // "imageLink": "my_imageLink",
+ * // "includedDestinations": [],
+ * // "installment": {},
+ * // "isBundle": false,
+ * // "itemGroupId": "my_itemGroupId",
+ * // "kind": "my_kind",
+ * // "link": "my_link",
+ * // "loyaltyPoints": {},
+ * // "material": "my_material",
+ * // "maxEnergyEfficiencyClass": "my_maxEnergyEfficiencyClass",
+ * // "maxHandlingTime": "my_maxHandlingTime",
+ * // "minEnergyEfficiencyClass": "my_minEnergyEfficiencyClass",
+ * // "minHandlingTime": "my_minHandlingTime",
+ * // "mobileLink": "my_mobileLink",
+ * // "mpn": "my_mpn",
+ * // "multipack": "my_multipack",
+ * // "offerId": "my_offerId",
+ * // "pattern": "my_pattern",
+ * // "price": {},
+ * // "productTypes": [],
+ * // "promotionIds": [],
+ * // "salePrice": {},
+ * // "salePriceEffectiveDate": "my_salePriceEffectiveDate",
+ * // "sellOnGoogleQuantity": "my_sellOnGoogleQuantity",
+ * // "shipping": [],
+ * // "shippingHeight": {},
+ * // "shippingLabel": "my_shippingLabel",
+ * // "shippingLength": {},
+ * // "shippingWeight": {},
+ * // "shippingWidth": {},
+ * // "sizeSystem": "my_sizeSystem",
+ * // "sizeType": "my_sizeType",
+ * // "sizes": [],
+ * // "source": "my_source",
+ * // "targetCountry": "my_targetCountry",
+ * // "taxCategory": "my_taxCategory",
+ * // "taxes": [],
+ * // "title": "my_title",
+ * // "transitTimeLabel": "my_transitTimeLabel",
+ * // "unitPricingBaseMeasure": {},
+ * // "unitPricingMeasure": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.products.get
* @memberOf! ()
*
@@ -13095,6 +17002,204 @@ export namespace content_v2_1 {
/**
* content.products.insert
* @desc Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.products.insert({
+ * // The Content API Supplemental Feed ID.
+ * feedId: 'placeholder-value',
+ * // The ID of the account that contains the product. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "additionalImageLinks": [],
+ * // "adsGrouping": "my_adsGrouping",
+ * // "adsLabels": [],
+ * // "adsRedirect": "my_adsRedirect",
+ * // "adult": false,
+ * // "ageGroup": "my_ageGroup",
+ * // "availability": "my_availability",
+ * // "availabilityDate": "my_availabilityDate",
+ * // "brand": "my_brand",
+ * // "channel": "my_channel",
+ * // "color": "my_color",
+ * // "condition": "my_condition",
+ * // "contentLanguage": "my_contentLanguage",
+ * // "costOfGoodsSold": {},
+ * // "customAttributes": [],
+ * // "customLabel0": "my_customLabel0",
+ * // "customLabel1": "my_customLabel1",
+ * // "customLabel2": "my_customLabel2",
+ * // "customLabel3": "my_customLabel3",
+ * // "customLabel4": "my_customLabel4",
+ * // "description": "my_description",
+ * // "displayAdsId": "my_displayAdsId",
+ * // "displayAdsLink": "my_displayAdsLink",
+ * // "displayAdsSimilarIds": [],
+ * // "displayAdsTitle": "my_displayAdsTitle",
+ * // "displayAdsValue": {},
+ * // "energyEfficiencyClass": "my_energyEfficiencyClass",
+ * // "excludedDestinations": [],
+ * // "expirationDate": "my_expirationDate",
+ * // "gender": "my_gender",
+ * // "googleProductCategory": "my_googleProductCategory",
+ * // "gtin": "my_gtin",
+ * // "id": "my_id",
+ * // "identifierExists": false,
+ * // "imageLink": "my_imageLink",
+ * // "includedDestinations": [],
+ * // "installment": {},
+ * // "isBundle": false,
+ * // "itemGroupId": "my_itemGroupId",
+ * // "kind": "my_kind",
+ * // "link": "my_link",
+ * // "loyaltyPoints": {},
+ * // "material": "my_material",
+ * // "maxEnergyEfficiencyClass": "my_maxEnergyEfficiencyClass",
+ * // "maxHandlingTime": "my_maxHandlingTime",
+ * // "minEnergyEfficiencyClass": "my_minEnergyEfficiencyClass",
+ * // "minHandlingTime": "my_minHandlingTime",
+ * // "mobileLink": "my_mobileLink",
+ * // "mpn": "my_mpn",
+ * // "multipack": "my_multipack",
+ * // "offerId": "my_offerId",
+ * // "pattern": "my_pattern",
+ * // "price": {},
+ * // "productTypes": [],
+ * // "promotionIds": [],
+ * // "salePrice": {},
+ * // "salePriceEffectiveDate": "my_salePriceEffectiveDate",
+ * // "sellOnGoogleQuantity": "my_sellOnGoogleQuantity",
+ * // "shipping": [],
+ * // "shippingHeight": {},
+ * // "shippingLabel": "my_shippingLabel",
+ * // "shippingLength": {},
+ * // "shippingWeight": {},
+ * // "shippingWidth": {},
+ * // "sizeSystem": "my_sizeSystem",
+ * // "sizeType": "my_sizeType",
+ * // "sizes": [],
+ * // "source": "my_source",
+ * // "targetCountry": "my_targetCountry",
+ * // "taxCategory": "my_taxCategory",
+ * // "taxes": [],
+ * // "title": "my_title",
+ * // "transitTimeLabel": "my_transitTimeLabel",
+ * // "unitPricingBaseMeasure": {},
+ * // "unitPricingMeasure": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "additionalImageLinks": [],
+ * // "adsGrouping": "my_adsGrouping",
+ * // "adsLabels": [],
+ * // "adsRedirect": "my_adsRedirect",
+ * // "adult": false,
+ * // "ageGroup": "my_ageGroup",
+ * // "availability": "my_availability",
+ * // "availabilityDate": "my_availabilityDate",
+ * // "brand": "my_brand",
+ * // "channel": "my_channel",
+ * // "color": "my_color",
+ * // "condition": "my_condition",
+ * // "contentLanguage": "my_contentLanguage",
+ * // "costOfGoodsSold": {},
+ * // "customAttributes": [],
+ * // "customLabel0": "my_customLabel0",
+ * // "customLabel1": "my_customLabel1",
+ * // "customLabel2": "my_customLabel2",
+ * // "customLabel3": "my_customLabel3",
+ * // "customLabel4": "my_customLabel4",
+ * // "description": "my_description",
+ * // "displayAdsId": "my_displayAdsId",
+ * // "displayAdsLink": "my_displayAdsLink",
+ * // "displayAdsSimilarIds": [],
+ * // "displayAdsTitle": "my_displayAdsTitle",
+ * // "displayAdsValue": {},
+ * // "energyEfficiencyClass": "my_energyEfficiencyClass",
+ * // "excludedDestinations": [],
+ * // "expirationDate": "my_expirationDate",
+ * // "gender": "my_gender",
+ * // "googleProductCategory": "my_googleProductCategory",
+ * // "gtin": "my_gtin",
+ * // "id": "my_id",
+ * // "identifierExists": false,
+ * // "imageLink": "my_imageLink",
+ * // "includedDestinations": [],
+ * // "installment": {},
+ * // "isBundle": false,
+ * // "itemGroupId": "my_itemGroupId",
+ * // "kind": "my_kind",
+ * // "link": "my_link",
+ * // "loyaltyPoints": {},
+ * // "material": "my_material",
+ * // "maxEnergyEfficiencyClass": "my_maxEnergyEfficiencyClass",
+ * // "maxHandlingTime": "my_maxHandlingTime",
+ * // "minEnergyEfficiencyClass": "my_minEnergyEfficiencyClass",
+ * // "minHandlingTime": "my_minHandlingTime",
+ * // "mobileLink": "my_mobileLink",
+ * // "mpn": "my_mpn",
+ * // "multipack": "my_multipack",
+ * // "offerId": "my_offerId",
+ * // "pattern": "my_pattern",
+ * // "price": {},
+ * // "productTypes": [],
+ * // "promotionIds": [],
+ * // "salePrice": {},
+ * // "salePriceEffectiveDate": "my_salePriceEffectiveDate",
+ * // "sellOnGoogleQuantity": "my_sellOnGoogleQuantity",
+ * // "shipping": [],
+ * // "shippingHeight": {},
+ * // "shippingLabel": "my_shippingLabel",
+ * // "shippingLength": {},
+ * // "shippingWeight": {},
+ * // "shippingWidth": {},
+ * // "sizeSystem": "my_sizeSystem",
+ * // "sizeType": "my_sizeType",
+ * // "sizes": [],
+ * // "source": "my_source",
+ * // "targetCountry": "my_targetCountry",
+ * // "taxCategory": "my_taxCategory",
+ * // "taxes": [],
+ * // "title": "my_title",
+ * // "transitTimeLabel": "my_transitTimeLabel",
+ * // "unitPricingBaseMeasure": {},
+ * // "unitPricingMeasure": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.products.insert
* @memberOf! ()
*
@@ -13168,6 +17273,52 @@ export namespace content_v2_1 {
/**
* content.products.list
* @desc Lists the products in your Merchant Center account. The response might contain fewer items than specified by maxResults. Rely on nextPageToken to determine if there are more items to be requested.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.products.list({
+ * // The maximum number of products to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the account that contains the products. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.products.list
* @memberOf! ()
*
@@ -13338,6 +17489,52 @@ export namespace content_v2_1 {
/**
* content.productstatuses.custombatch
* @desc Gets the statuses of multiple products in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.productstatuses.custombatch({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.productstatuses.custombatch
* @memberOf! ()
*
@@ -13421,6 +17618,58 @@ export namespace content_v2_1 {
/**
* content.productstatuses.get
* @desc Gets the status of a product from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.productstatuses.get({
+ * // If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.
+ * destinations: 'placeholder-value',
+ * // The ID of the account that contains the product. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The REST ID of the product.
+ * productId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationDate": "my_creationDate",
+ * // "destinationStatuses": [],
+ * // "googleExpirationDate": "my_googleExpirationDate",
+ * // "itemLevelIssues": [],
+ * // "kind": "my_kind",
+ * // "lastUpdateDate": "my_lastUpdateDate",
+ * // "link": "my_link",
+ * // "productId": "my_productId",
+ * // "title": "my_title"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.productstatuses.get
* @memberOf! ()
*
@@ -13496,6 +17745,54 @@ export namespace content_v2_1 {
/**
* content.productstatuses.list
* @desc Lists the statuses of the products in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.productstatuses.list({
+ * // If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.
+ * destinations: 'placeholder-value',
+ * // The maximum number of product statuses to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the account that contains the products. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.productstatuses.list
* @memberOf! ()
*
@@ -13643,6 +17940,48 @@ export namespace content_v2_1 {
/**
* content.pubsubnotificationsettings.get
* @desc Retrieves a Merchant Center account's pubsub notification settings.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.pubsubnotificationsettings.get({
+ * // The ID of the account for which to get pubsub notification settings.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cloudTopicName": "my_cloudTopicName",
+ * // "kind": "my_kind",
+ * // "registeredEvents": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.pubsubnotificationsettings.get
* @memberOf! ()
*
@@ -13723,6 +18062,58 @@ export namespace content_v2_1 {
/**
* content.pubsubnotificationsettings.update
* @desc Register a Merchant Center account for pubsub notifications. Note that cloud topic name should not be provided as part of the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.pubsubnotificationsettings.update({
+ * // The ID of the account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "cloudTopicName": "my_cloudTopicName",
+ * // "kind": "my_kind",
+ * // "registeredEvents": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cloudTopicName": "my_cloudTopicName",
+ * // "kind": "my_kind",
+ * // "registeredEvents": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.pubsubnotificationsettings.update
* @memberOf! ()
*
@@ -13841,6 +18232,52 @@ export namespace content_v2_1 {
/**
* content.regionalinventory.custombatch
* @desc Updates regional inventory for multiple products or regions in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.regionalinventory.custombatch({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.regionalinventory.custombatch
* @memberOf! ()
*
@@ -13932,6 +18369,68 @@ export namespace content_v2_1 {
/**
* content.regionalinventory.insert
* @desc Update the regional inventory of a product in your Merchant Center account. If a regional inventory with the same region ID already exists, this method updates that entry.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.regionalinventory.insert({
+ * // The ID of the account that contains the product. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The REST ID of the product for which to update the regional inventory.
+ * productId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "availability": "my_availability",
+ * // "customAttributes": [],
+ * // "kind": "my_kind",
+ * // "price": {},
+ * // "regionId": "my_regionId",
+ * // "salePrice": {},
+ * // "salePriceEffectiveDate": "my_salePriceEffectiveDate"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "availability": "my_availability",
+ * // "customAttributes": [],
+ * // "kind": "my_kind",
+ * // "price": {},
+ * // "regionId": "my_regionId",
+ * // "salePrice": {},
+ * // "salePriceEffectiveDate": "my_salePriceEffectiveDate"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.regionalinventory.insert
* @memberOf! ()
*
@@ -14049,6 +18548,52 @@ export namespace content_v2_1 {
/**
* content.returnaddress.custombatch
* @desc Batches multiple return address related calls in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.returnaddress.custombatch({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.returnaddress.custombatch
* @memberOf! ()
*
@@ -14132,6 +18677,43 @@ export namespace content_v2_1 {
/**
* content.returnaddress.delete
* @desc Deletes a return address for the given Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.returnaddress.delete({
+ * // The Merchant Center account from which to delete the given return address.
+ * merchantId: 'placeholder-value',
+ * // Return address ID generated by Google.
+ * returnAddressId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.returnaddress.delete
* @memberOf! ()
*
@@ -14205,6 +18787,53 @@ export namespace content_v2_1 {
/**
* content.returnaddress.get
* @desc Gets a return address of the Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.returnaddress.get({
+ * // The Merchant Center account to get a return address for.
+ * merchantId: 'placeholder-value',
+ * // Return address ID generated by Google.
+ * returnAddressId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": {},
+ * // "country": "my_country",
+ * // "kind": "my_kind",
+ * // "label": "my_label",
+ * // "phoneNumber": "my_phoneNumber",
+ * // "returnAddressId": "my_returnAddressId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.returnaddress.get
* @memberOf! ()
*
@@ -14280,6 +18909,64 @@ export namespace content_v2_1 {
/**
* content.returnaddress.insert
* @desc Inserts a return address for the Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.returnaddress.insert({
+ * // The Merchant Center account to insert a return address for.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "address": {},
+ * // "country": "my_country",
+ * // "kind": "my_kind",
+ * // "label": "my_label",
+ * // "phoneNumber": "my_phoneNumber",
+ * // "returnAddressId": "my_returnAddressId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "address": {},
+ * // "country": "my_country",
+ * // "kind": "my_kind",
+ * // "label": "my_label",
+ * // "phoneNumber": "my_phoneNumber",
+ * // "returnAddressId": "my_returnAddressId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.returnaddress.insert
* @memberOf! ()
*
@@ -14355,6 +19042,54 @@ export namespace content_v2_1 {
/**
* content.returnaddress.list
* @desc Lists the return addresses of the Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.returnaddress.list({
+ * // List only return addresses applicable to the given country of sale. When omitted, all return addresses are listed.
+ * country: 'placeholder-value',
+ * // The maximum number of addresses in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The Merchant Center account to list return addresses for.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.returnaddress.list
* @memberOf! ()
*
@@ -14532,6 +19267,52 @@ export namespace content_v2_1 {
/**
* content.returnpolicy.custombatch
* @desc Batches multiple return policy related calls in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.returnpolicy.custombatch({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.returnpolicy.custombatch
* @memberOf! ()
*
@@ -14615,6 +19396,43 @@ export namespace content_v2_1 {
/**
* content.returnpolicy.delete
* @desc Deletes a return policy for the given Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.returnpolicy.delete({
+ * // The Merchant Center account from which to delete the given return policy.
+ * merchantId: 'placeholder-value',
+ * // Return policy ID generated by Google.
+ * returnPolicyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.returnpolicy.delete
* @memberOf! ()
*
@@ -14688,6 +19506,55 @@ export namespace content_v2_1 {
/**
* content.returnpolicy.get
* @desc Gets a return policy of the Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.returnpolicy.get({
+ * // The Merchant Center account to get a return policy for.
+ * merchantId: 'placeholder-value',
+ * // Return policy ID generated by Google.
+ * returnPolicyId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "country": "my_country",
+ * // "kind": "my_kind",
+ * // "label": "my_label",
+ * // "name": "my_name",
+ * // "nonFreeReturnReasons": [],
+ * // "policy": {},
+ * // "returnPolicyId": "my_returnPolicyId",
+ * // "seasonalOverrides": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.returnpolicy.get
* @memberOf! ()
*
@@ -14762,6 +19629,68 @@ export namespace content_v2_1 {
/**
* content.returnpolicy.insert
* @desc Inserts a return policy for the Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.returnpolicy.insert({
+ * // The Merchant Center account to insert a return policy for.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "country": "my_country",
+ * // "kind": "my_kind",
+ * // "label": "my_label",
+ * // "name": "my_name",
+ * // "nonFreeReturnReasons": [],
+ * // "policy": {},
+ * // "returnPolicyId": "my_returnPolicyId",
+ * // "seasonalOverrides": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "country": "my_country",
+ * // "kind": "my_kind",
+ * // "label": "my_label",
+ * // "name": "my_name",
+ * // "nonFreeReturnReasons": [],
+ * // "policy": {},
+ * // "returnPolicyId": "my_returnPolicyId",
+ * // "seasonalOverrides": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.returnpolicy.insert
* @memberOf! ()
*
@@ -14837,6 +19766,47 @@ export namespace content_v2_1 {
/**
* content.returnpolicy.list
* @desc Lists the return policies of the Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.returnpolicy.list({
+ * // The Merchant Center account to list return policies for.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.returnpolicy.list
* @memberOf! ()
*
@@ -14993,6 +19963,55 @@ export namespace content_v2_1 {
/**
* content.settlementreports.get
* @desc Retrieves a settlement report from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.settlementreports.get({
+ * // The Merchant Center account of the settlement report.
+ * merchantId: 'placeholder-value',
+ * // The Google-provided ID of the settlement.
+ * settlementId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "endDate": "my_endDate",
+ * // "kind": "my_kind",
+ * // "previousBalance": {},
+ * // "settlementId": "my_settlementId",
+ * // "startDate": "my_startDate",
+ * // "transferAmount": {},
+ * // "transferDate": "my_transferDate",
+ * // "transferIds": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.settlementreports.get
* @memberOf! ()
*
@@ -15068,6 +20087,56 @@ export namespace content_v2_1 {
/**
* content.settlementreports.list
* @desc Retrieves a list of settlement reports from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.settlementreports.list({
+ * // The maximum number of settlements to return in the response, used for paging. The default value is 200 returns per page, and the maximum allowed value is 5000 returns per page.
+ * maxResults: 'placeholder-value',
+ * // The Merchant Center account to list settlements for.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * // Obtains settlements which have transactions before this date (inclusively), in ISO 8601 format.
+ * transferEndDate: 'placeholder-value',
+ * // Obtains settlements which have transactions after this date (inclusively), in ISO 8601 format.
+ * transferStartDate: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.settlementreports.list
* @memberOf! ()
*
@@ -15206,6 +20275,56 @@ export namespace content_v2_1 {
/**
* content.settlementtransactions.list
* @desc Retrieves a list of transactions for the settlement.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.settlementtransactions.list({
+ * // The maximum number of transactions to return in the response, used for paging. The default value is 200 transactions per page, and the maximum allowed value is 5000 transactions per page.
+ * maxResults: 'placeholder-value',
+ * // The Merchant Center account to list transactions for.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * // The Google-provided ID of the settlement.
+ * settlementId: 'placeholder-value',
+ * // The list of transactions to return. If not set, all transactions will be returned.
+ * transactionIds: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.settlementtransactions.list
* @memberOf! ()
*
@@ -15329,6 +20448,52 @@ export namespace content_v2_1 {
/**
* content.shippingsettings.custombatch
* @desc Retrieves and updates the shipping settings of multiple accounts in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.shippingsettings.custombatch({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.shippingsettings.custombatch
* @memberOf! ()
*
@@ -15414,6 +20579,50 @@ export namespace content_v2_1 {
/**
* content.shippingsettings.get
* @desc Retrieves the shipping settings of the account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.shippingsettings.get({
+ * // The ID of the account for which to get/update shipping settings.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "postalCodeGroups": [],
+ * // "services": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.shippingsettings.get
* @memberOf! ()
*
@@ -15489,6 +20698,47 @@ export namespace content_v2_1 {
/**
* content.shippingsettings.getsupportedcarriers
* @desc Retrieves supported carriers and carrier services for an account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.shippingsettings.getsupportedcarriers({
+ * // The ID of the account for which to retrieve the supported carriers.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "carriers": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.shippingsettings.getsupportedcarriers
* @memberOf! ()
*
@@ -15587,6 +20837,47 @@ export namespace content_v2_1 {
/**
* content.shippingsettings.getsupportedholidays
* @desc Retrieves supported holidays for an account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.shippingsettings.getsupportedholidays({
+ * // The ID of the account for which to retrieve the supported holidays.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "holidays": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.shippingsettings.getsupportedholidays
* @memberOf! ()
*
@@ -15685,6 +20976,47 @@ export namespace content_v2_1 {
/**
* content.shippingsettings.getsupportedpickupservices
* @desc Retrieves supported pickup services for an account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.shippingsettings.getsupportedpickupservices({
+ * // The ID of the account for which to retrieve the supported pickup services.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "pickupServices": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.shippingsettings.getsupportedpickupservices
* @memberOf! ()
*
@@ -15782,6 +21114,52 @@ export namespace content_v2_1 {
/**
* content.shippingsettings.list
* @desc Lists the shipping settings of the sub-accounts in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.shippingsettings.list({
+ * // The maximum number of shipping settings to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the managing account. This must be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.shippingsettings.list
* @memberOf! ()
*
@@ -15866,6 +21244,60 @@ export namespace content_v2_1 {
/**
* content.shippingsettings.update
* @desc Updates the shipping settings of the account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2.1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.shippingsettings.update({
+ * // The ID of the account for which to get/update shipping settings.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "postalCodeGroups": [],
+ * // "services": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "postalCodeGroups": [],
+ * // "services": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.shippingsettings.update
* @memberOf! ()
*
diff --git a/src/apis/content/v2.ts b/src/apis/content/v2.ts
index 25bcae65a61..8529e768db1 100644
--- a/src/apis/content/v2.ts
+++ b/src/apis/content/v2.ts
@@ -5410,6 +5410,44 @@ export namespace content_v2 {
/**
* content.accounts.authinfo
* @desc Returns information about the authenticated user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.authinfo({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountIdentifiers": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.authinfo
* @memberOf! ()
*
@@ -5487,6 +5525,50 @@ export namespace content_v2 {
/**
* content.accounts.claimwebsite
* @desc Claims the website of a Merchant Center sub-account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.claimwebsite({
+ * // The ID of the account whose website is claimed.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * // Only available to selected merchants. When set to `True`, this flag removes any existing claim on the requested website by another account and replaces it with a claim from this account.
+ * overwrite: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.claimwebsite
* @memberOf! ()
*
@@ -5572,6 +5654,55 @@ export namespace content_v2 {
/**
* content.accounts.custombatch
* @desc Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.custombatch({
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.custombatch
* @memberOf! ()
*
@@ -5654,6 +5785,47 @@ export namespace content_v2 {
/**
* content.accounts.delete
* @desc Deletes a Merchant Center sub-account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.delete({
+ * // The ID of the account.
+ * accountId: 'placeholder-value',
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ * // Flag to delete sub-accounts with products. The default value is false.
+ * force: 'placeholder-value',
+ * // The ID of the managing account. This must be a multi-client account, and accountId must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.delete
* @memberOf! ()
*
@@ -5727,6 +5899,59 @@ export namespace content_v2 {
/**
* content.accounts.get
* @desc Retrieves a Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.get({
+ * // The ID of the account.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adultContent": false,
+ * // "adwordsLinks": [],
+ * // "businessInformation": {},
+ * // "googleMyBusinessLink": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "reviewsUrl": "my_reviewsUrl",
+ * // "sellerId": "my_sellerId",
+ * // "users": [],
+ * // "websiteUrl": "my_websiteUrl",
+ * // "youtubeChannelLinks": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.get
* @memberOf! ()
*
@@ -5798,6 +6023,78 @@ export namespace content_v2 {
/**
* content.accounts.insert
* @desc Creates a Merchant Center sub-account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.insert({
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ * // The ID of the managing account. This must be a multi-client account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adultContent": false,
+ * // "adwordsLinks": [],
+ * // "businessInformation": {},
+ * // "googleMyBusinessLink": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "reviewsUrl": "my_reviewsUrl",
+ * // "sellerId": "my_sellerId",
+ * // "users": [],
+ * // "websiteUrl": "my_websiteUrl",
+ * // "youtubeChannelLinks": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adultContent": false,
+ * // "adwordsLinks": [],
+ * // "businessInformation": {},
+ * // "googleMyBusinessLink": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "reviewsUrl": "my_reviewsUrl",
+ * // "sellerId": "my_sellerId",
+ * // "users": [],
+ * // "websiteUrl": "my_websiteUrl",
+ * // "youtubeChannelLinks": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.insert
* @memberOf! ()
*
@@ -5871,6 +6168,58 @@ export namespace content_v2 {
/**
* content.accounts.link
* @desc Performs an action on a link between two Merchant Center accounts, namely accountId and linkedAccountId.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.link({
+ * // The ID of the account that should be linked.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "linkType": "my_linkType",
+ * // "linkedAccountId": "my_linkedAccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.link
* @memberOf! ()
*
@@ -5947,6 +6296,52 @@ export namespace content_v2 {
/**
* content.accounts.list
* @desc Lists the sub-accounts in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.list({
+ * // The maximum number of accounts to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the managing account. This must be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.list
* @memberOf! ()
*
@@ -6024,6 +6419,80 @@ export namespace content_v2 {
/**
* content.accounts.update
* @desc Updates a Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounts.update({
+ * // The ID of the account.
+ * accountId: 'placeholder-value',
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "adultContent": false,
+ * // "adwordsLinks": [],
+ * // "businessInformation": {},
+ * // "googleMyBusinessLink": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "reviewsUrl": "my_reviewsUrl",
+ * // "sellerId": "my_sellerId",
+ * // "users": [],
+ * // "websiteUrl": "my_websiteUrl",
+ * // "youtubeChannelLinks": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "adultContent": false,
+ * // "adwordsLinks": [],
+ * // "businessInformation": {},
+ * // "googleMyBusinessLink": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "reviewsUrl": "my_reviewsUrl",
+ * // "sellerId": "my_sellerId",
+ * // "users": [],
+ * // "websiteUrl": "my_websiteUrl",
+ * // "youtubeChannelLinks": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounts.update
* @memberOf! ()
*
@@ -6270,6 +6739,52 @@ export namespace content_v2 {
/**
* content.accountstatuses.custombatch
* @desc Retrieves multiple Merchant Center account statuses in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accountstatuses.custombatch({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accountstatuses.custombatch
* @memberOf! ()
*
@@ -6353,6 +6868,55 @@ export namespace content_v2 {
/**
* content.accountstatuses.get
* @desc Retrieves the status of a Merchant Center account. No itemLevelIssues are returned for multi-client accounts.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accountstatuses.get({
+ * // The ID of the account.
+ * accountId: 'placeholder-value',
+ * // If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.
+ * destinations: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "accountLevelIssues": [],
+ * // "dataQualityIssues": [],
+ * // "kind": "my_kind",
+ * // "products": [],
+ * // "websiteClaimed": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accountstatuses.get
* @memberOf! ()
*
@@ -6428,6 +6992,54 @@ export namespace content_v2 {
/**
* content.accountstatuses.list
* @desc Lists the statuses of the sub-accounts in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accountstatuses.list({
+ * // If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.
+ * destinations: 'placeholder-value',
+ * // The maximum number of account statuses to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the managing account. This must be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accountstatuses.list
* @memberOf! ()
*
@@ -6576,6 +7188,55 @@ export namespace content_v2 {
/**
* content.accounttax.custombatch
* @desc Retrieves and updates tax settings of multiple accounts in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounttax.custombatch({
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounttax.custombatch
* @memberOf! ()
*
@@ -6660,6 +7321,50 @@ export namespace content_v2 {
/**
* content.accounttax.get
* @desc Retrieves the tax settings of the account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounttax.get({
+ * // The ID of the account for which to get/update account tax settings.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "kind": "my_kind",
+ * // "rules": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounttax.get
* @memberOf! ()
*
@@ -6733,6 +7438,52 @@ export namespace content_v2 {
/**
* content.accounttax.list
* @desc Lists the tax settings of the sub-accounts in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounttax.list({
+ * // The maximum number of tax settings to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the managing account. This must be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounttax.list
* @memberOf! ()
*
@@ -6810,6 +7561,62 @@ export namespace content_v2 {
/**
* content.accounttax.update
* @desc Updates the tax settings of the account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.accounttax.update({
+ * // The ID of the account for which to get/update account tax settings.
+ * accountId: 'placeholder-value',
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "kind": "my_kind",
+ * // "rules": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "kind": "my_kind",
+ * // "rules": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.accounttax.update
* @memberOf! ()
*
@@ -6970,6 +7777,55 @@ export namespace content_v2 {
/**
* content.datafeeds.custombatch
* @desc Deletes, fetches, gets, inserts and updates multiple datafeeds in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeeds.custombatch({
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeeds.custombatch
* @memberOf! ()
*
@@ -7054,6 +7910,45 @@ export namespace content_v2 {
/**
* content.datafeeds.delete
* @desc Deletes a datafeed configuration from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeeds.delete({
+ * // The ID of the datafeed.
+ * datafeedId: 'placeholder-value',
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ * // The ID of the account that manages the datafeed. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeeds.delete
* @memberOf! ()
*
@@ -7126,6 +8021,50 @@ export namespace content_v2 {
/**
* content.datafeeds.fetchnow
* @desc Invokes a fetch for the datafeed in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeeds.fetchnow({
+ * // The ID of the datafeed to be fetched.
+ * datafeedId: 'placeholder-value',
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ * // The ID of the account that manages the datafeed. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeeds.fetchnow
* @memberOf! ()
*
@@ -7209,6 +8148,59 @@ export namespace content_v2 {
/**
* content.datafeeds.get
* @desc Retrieves a datafeed configuration from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeeds.get({
+ * // The ID of the datafeed.
+ * datafeedId: 'placeholder-value',
+ * // The ID of the account that manages the datafeed. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attributeLanguage": "my_attributeLanguage",
+ * // "contentLanguage": "my_contentLanguage",
+ * // "contentType": "my_contentType",
+ * // "fetchSchedule": {},
+ * // "fileName": "my_fileName",
+ * // "format": {},
+ * // "id": "my_id",
+ * // "intendedDestinations": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "targetCountry": "my_targetCountry",
+ * // "targets": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeeds.get
* @memberOf! ()
*
@@ -7280,6 +8272,78 @@ export namespace content_v2 {
/**
* content.datafeeds.insert
* @desc Registers a datafeed configuration with your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeeds.insert({
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ * // The ID of the account that manages the datafeed. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attributeLanguage": "my_attributeLanguage",
+ * // "contentLanguage": "my_contentLanguage",
+ * // "contentType": "my_contentType",
+ * // "fetchSchedule": {},
+ * // "fileName": "my_fileName",
+ * // "format": {},
+ * // "id": "my_id",
+ * // "intendedDestinations": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "targetCountry": "my_targetCountry",
+ * // "targets": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attributeLanguage": "my_attributeLanguage",
+ * // "contentLanguage": "my_contentLanguage",
+ * // "contentType": "my_contentType",
+ * // "fetchSchedule": {},
+ * // "fileName": "my_fileName",
+ * // "format": {},
+ * // "id": "my_id",
+ * // "intendedDestinations": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "targetCountry": "my_targetCountry",
+ * // "targets": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeeds.insert
* @memberOf! ()
*
@@ -7353,6 +8417,52 @@ export namespace content_v2 {
/**
* content.datafeeds.list
* @desc Lists the configurations for datafeeds in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeeds.list({
+ * // The maximum number of products to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the account that manages the datafeeds. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeeds.list
* @memberOf! ()
*
@@ -7430,6 +8540,80 @@ export namespace content_v2 {
/**
* content.datafeeds.update
* @desc Updates a datafeed configuration of your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeeds.update({
+ * // The ID of the datafeed.
+ * datafeedId: 'placeholder-value',
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ * // The ID of the account that manages the datafeed. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "attributeLanguage": "my_attributeLanguage",
+ * // "contentLanguage": "my_contentLanguage",
+ * // "contentType": "my_contentType",
+ * // "fetchSchedule": {},
+ * // "fileName": "my_fileName",
+ * // "format": {},
+ * // "id": "my_id",
+ * // "intendedDestinations": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "targetCountry": "my_targetCountry",
+ * // "targets": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "attributeLanguage": "my_attributeLanguage",
+ * // "contentLanguage": "my_contentLanguage",
+ * // "contentType": "my_contentType",
+ * // "fetchSchedule": {},
+ * // "fileName": "my_fileName",
+ * // "format": {},
+ * // "id": "my_id",
+ * // "intendedDestinations": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "targetCountry": "my_targetCountry",
+ * // "targets": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeeds.update
* @memberOf! ()
*
@@ -7645,6 +8829,52 @@ export namespace content_v2 {
/**
* content.datafeedstatuses.custombatch
* @desc Gets multiple Merchant Center datafeed statuses in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeedstatuses.custombatch({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeedstatuses.custombatch
* @memberOf! ()
*
@@ -7730,6 +8960,61 @@ export namespace content_v2 {
/**
* content.datafeedstatuses.get
* @desc Retrieves the status of a datafeed from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeedstatuses.get({
+ * // The country for which to get the datafeed status. If this parameter is provided then language must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.
+ * country: 'placeholder-value',
+ * // The ID of the datafeed.
+ * datafeedId: 'placeholder-value',
+ * // The language for which to get the datafeed status. If this parameter is provided then country must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.
+ * language: 'placeholder-value',
+ * // The ID of the account that manages the datafeed. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "country": "my_country",
+ * // "datafeedId": "my_datafeedId",
+ * // "errors": [],
+ * // "itemsTotal": "my_itemsTotal",
+ * // "itemsValid": "my_itemsValid",
+ * // "kind": "my_kind",
+ * // "language": "my_language",
+ * // "lastUploadDate": "my_lastUploadDate",
+ * // "processingStatus": "my_processingStatus",
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeedstatuses.get
* @memberOf! ()
*
@@ -7806,6 +9091,52 @@ export namespace content_v2 {
/**
* content.datafeedstatuses.list
* @desc Lists the statuses of the datafeeds in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.datafeedstatuses.list({
+ * // The maximum number of products to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the account that manages the datafeeds. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.datafeedstatuses.list
* @memberOf! ()
*
@@ -7954,6 +9285,55 @@ export namespace content_v2 {
/**
* content.inventory.custombatch
* @desc Updates price and availability for multiple products or stores in a single request. This operation does not update the expiration date of the products.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.inventory.custombatch({
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.inventory.custombatch
* @memberOf! ()
*
@@ -8038,6 +9418,74 @@ export namespace content_v2 {
/**
* content.inventory.set
* @desc Updates price and availability of a product in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.inventory.set({
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ * // The ID of the account that contains the product. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The REST ID of the product for which to update price and availability.
+ * productId: 'placeholder-value',
+ * // The code of the store for which to update price and availability. Use `online` to update price and availability of an online product.
+ * storeCode: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "availability": "my_availability",
+ * // "customLabel0": "my_customLabel0",
+ * // "customLabel1": "my_customLabel1",
+ * // "customLabel2": "my_customLabel2",
+ * // "customLabel3": "my_customLabel3",
+ * // "customLabel4": "my_customLabel4",
+ * // "installment": {},
+ * // "instoreProductLocation": "my_instoreProductLocation",
+ * // "loyaltyPoints": {},
+ * // "pickup": {},
+ * // "price": {},
+ * // "quantity": 0,
+ * // "salePrice": {},
+ * // "salePriceEffectiveDate": "my_salePriceEffectiveDate",
+ * // "sellOnGoogleQuantity": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.inventory.set
* @memberOf! ()
*
@@ -8170,6 +9618,55 @@ export namespace content_v2 {
/**
* content.liasettings.custombatch
* @desc Retrieves and/or updates the LIA settings of multiple accounts in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.custombatch({
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.custombatch
* @memberOf! ()
*
@@ -8254,6 +9751,50 @@ export namespace content_v2 {
/**
* content.liasettings.get
* @desc Retrieves the LIA settings of the account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.get({
+ * // The ID of the account for which to get or update LIA settings.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "countrySettings": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.get
* @memberOf! ()
*
@@ -8327,6 +9868,50 @@ export namespace content_v2 {
/**
* content.liasettings.getaccessiblegmbaccounts
* @desc Retrieves the list of accessible Google My Business accounts.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.getaccessiblegmbaccounts({
+ * // The ID of the account for which to retrieve accessible Google My Business accounts.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "gmbAccounts": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.getaccessiblegmbaccounts
* @memberOf! ()
*
@@ -8427,6 +10012,52 @@ export namespace content_v2 {
/**
* content.liasettings.list
* @desc Lists the LIA settings of the sub-accounts in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.list({
+ * // The maximum number of LIA settings to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the managing account. This must be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.list
* @memberOf! ()
*
@@ -8504,6 +10135,44 @@ export namespace content_v2 {
/**
* content.liasettings.listposdataproviders
* @desc Retrieves the list of POS data providers that have active settings for the all eiligible countries.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.listposdataproviders({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "posDataProviders": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.listposdataproviders
* @memberOf! ()
*
@@ -8594,6 +10263,50 @@ export namespace content_v2 {
/**
* content.liasettings.requestgmbaccess
* @desc Requests access to a specified Google My Business account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.requestgmbaccess({
+ * // The ID of the account for which GMB access is requested.
+ * accountId: 'placeholder-value',
+ * // The email of the Google My Business account.
+ * gmbEmail: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.requestgmbaccess
* @memberOf! ()
*
@@ -8681,6 +10394,50 @@ export namespace content_v2 {
/**
* content.liasettings.requestinventoryverification
* @desc Requests inventory validation for the specified country.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.requestinventoryverification({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * accountId: 'placeholder-value',
+ * // The country for which inventory validation is requested.
+ * country: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.requestinventoryverification
* @memberOf! ()
*
@@ -8781,6 +10538,56 @@ export namespace content_v2 {
/**
* content.liasettings.setinventoryverificationcontact
* @desc Sets the inventory verification contract for the specified country.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.setinventoryverificationcontact({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * accountId: 'placeholder-value',
+ * // The email of the inventory verification contact.
+ * contactEmail: 'placeholder-value',
+ * // The name of the inventory verification contact.
+ * contactName: 'placeholder-value',
+ * // The country for which inventory verification is requested.
+ * country: 'placeholder-value',
+ * // The language for which inventory verification is requested.
+ * language: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.setinventoryverificationcontact
* @memberOf! ()
*
@@ -8891,6 +10698,54 @@ export namespace content_v2 {
/**
* content.liasettings.setposdataprovider
* @desc Sets the POS data provider for the specified country.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.setposdataprovider({
+ * // The ID of the account for which to retrieve accessible Google My Business accounts.
+ * accountId: 'placeholder-value',
+ * // The country for which the POS data provider is selected.
+ * country: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * // The ID of POS data provider.
+ * posDataProviderId: 'placeholder-value',
+ * // The account ID by which this merchant is known to the POS data provider.
+ * posExternalAccountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.setposdataprovider
* @memberOf! ()
*
@@ -8986,6 +10841,62 @@ export namespace content_v2 {
/**
* content.liasettings.update
* @desc Updates the LIA settings of the account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.liasettings.update({
+ * // The ID of the account for which to get or update LIA settings.
+ * accountId: 'placeholder-value',
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "countrySettings": [],
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "countrySettings": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.liasettings.update
* @memberOf! ()
*
@@ -9269,6 +11180,61 @@ export namespace content_v2 {
/**
* content.orderinvoices.createchargeinvoice
* @desc Creates a charge invoice for a shipment group, and triggers a charge capture for orderinvoice enabled orders.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orderinvoices.createchargeinvoice({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "invoiceId": "my_invoiceId",
+ * // "invoiceSummary": {},
+ * // "lineItemInvoices": [],
+ * // "operationId": "my_operationId",
+ * // "shipmentGroupId": "my_shipmentGroupId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orderinvoices.createchargeinvoice
* @memberOf! ()
*
@@ -9362,6 +11328,61 @@ export namespace content_v2 {
/**
* content.orderinvoices.createrefundinvoice
* @desc Creates a refund invoice for one or more shipment groups, and triggers a refund for orderinvoice enabled orders. This can only be used for line items that have previously been charged using `createChargeInvoice`. All amounts (except for the summary) are incremental with respect to the previous invoice.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orderinvoices.createrefundinvoice({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "invoiceId": "my_invoiceId",
+ * // "operationId": "my_operationId",
+ * // "refundOnlyOption": {},
+ * // "returnOption": {},
+ * // "shipmentInvoices": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orderinvoices.createrefundinvoice
* @memberOf! ()
*
@@ -9505,6 +11526,56 @@ export namespace content_v2 {
/**
* content.orderreports.listdisbursements
* @desc Retrieves a report for disbursements from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orderreports.listdisbursements({
+ * // The last date which disbursements occurred. In ISO 8601 format. Default: current date.
+ * disbursementEndDate: 'placeholder-value',
+ * // The first date which disbursements occurred. In ISO 8601 format.
+ * disbursementStartDate: 'placeholder-value',
+ * // The maximum number of disbursements to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "disbursements": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orderreports.listdisbursements
* @memberOf! ()
*
@@ -9599,6 +11670,58 @@ export namespace content_v2 {
/**
* content.orderreports.listtransactions
* @desc Retrieves a list of transactions for a disbursement from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orderreports.listtransactions({
+ * // The Google-provided ID of the disbursement (found in Wallet).
+ * disbursementId: 'placeholder-value',
+ * // The maximum number of disbursements to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * // The last date in which transaction occurred. In ISO 8601 format. Default: current date.
+ * transactionEndDate: 'placeholder-value',
+ * // The first date in which transaction occurred. In ISO 8601 format.
+ * transactionStartDate: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "transactions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orderreports.listtransactions
* @memberOf! ()
*
@@ -9767,6 +11890,53 @@ export namespace content_v2 {
/**
* content.orderreturns.get
* @desc Retrieves an order return from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orderreturns.get({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // Merchant order return ID generated by Google.
+ * returnId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationDate": "my_creationDate",
+ * // "merchantOrderId": "my_merchantOrderId",
+ * // "orderId": "my_orderId",
+ * // "orderReturnId": "my_orderReturnId",
+ * // "returnItems": [],
+ * // "returnShipments": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orderreturns.get
* @memberOf! ()
*
@@ -9840,6 +12010,58 @@ export namespace content_v2 {
/**
* content.orderreturns.list
* @desc Lists order returns in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orderreturns.list({
+ * // Obtains order returns created before this date (inclusively), in ISO 8601 format.
+ * createdEndDate: 'placeholder-value',
+ * // Obtains order returns created after this date (inclusively), in ISO 8601 format.
+ * createdStartDate: 'placeholder-value',
+ * // The maximum number of order returns to return in the response, used for paging. The default value is 25 returns per page, and the maximum allowed value is 250 returns per page.
+ * maxResults: 'placeholder-value',
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // Return the results in the specified order.
+ * orderBy: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orderreturns.list
* @memberOf! ()
*
@@ -9976,6 +12198,57 @@ export namespace content_v2 {
/**
* content.orders.acknowledge
* @desc Marks an order as acknowledged.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.acknowledge({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "operationId": "my_operationId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.acknowledge
* @memberOf! ()
*
@@ -10058,6 +12331,48 @@ export namespace content_v2 {
/**
* content.orders.advancetestorder
* @desc Sandbox only. Moves a test order from state "`inProgress`" to state "`pendingShipment`".
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.advancetestorder({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the test order to modify.
+ * orderId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.advancetestorder
* @memberOf! ()
*
@@ -10141,6 +12456,59 @@ export namespace content_v2 {
/**
* content.orders.cancel
* @desc Cancels all line items in an order, making a full refund.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.cancel({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order to cancel.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "operationId": "my_operationId",
+ * // "reason": "my_reason",
+ * // "reasonText": "my_reasonText"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.cancel
* @memberOf! ()
*
@@ -10217,6 +12585,65 @@ export namespace content_v2 {
/**
* content.orders.cancellineitem
* @desc Cancels a line item, making a full refund.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.cancellineitem({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "amount": {},
+ * // "amountPretax": {},
+ * // "amountTax": {},
+ * // "lineItemId": "my_lineItemId",
+ * // "operationId": "my_operationId",
+ * // "productId": "my_productId",
+ * // "quantity": 0,
+ * // "reason": "my_reason",
+ * // "reasonText": "my_reasonText"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.cancellineitem
* @memberOf! ()
*
@@ -10302,6 +12729,56 @@ export namespace content_v2 {
/**
* content.orders.canceltestorderbycustomer
* @desc Sandbox only. Cancels a test order for customer-initiated cancellation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.canceltestorderbycustomer({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the test order to cancel.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "reason": "my_reason"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.canceltestorderbycustomer
* @memberOf! ()
*
@@ -10395,6 +12872,57 @@ export namespace content_v2 {
/**
* content.orders.createtestorder
* @desc Sandbox only. Creates a test order.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.createtestorder({
+ * // The ID of the account that should manage the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "country": "my_country",
+ * // "templateName": "my_templateName",
+ * // "testOrder": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "orderId": "my_orderId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.createtestorder
* @memberOf! ()
*
@@ -10479,6 +13007,57 @@ export namespace content_v2 {
/**
* content.orders.createtestreturn
* @desc Sandbox only. Creates a test return.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.createtestreturn({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "items": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "returnId": "my_returnId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.createtestreturn
* @memberOf! ()
*
@@ -10563,6 +13142,52 @@ export namespace content_v2 {
/**
* content.orders.custombatch
* @desc Retrieves or modifies multiple orders in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.custombatch({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.custombatch
* @memberOf! ()
*
@@ -10644,6 +13269,69 @@ export namespace content_v2 {
/**
* content.orders.get
* @desc Retrieves an order from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.get({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "acknowledged": false,
+ * // "channelType": "my_channelType",
+ * // "customer": {},
+ * // "deliveryDetails": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lineItems": [],
+ * // "merchantId": "my_merchantId",
+ * // "merchantOrderId": "my_merchantOrderId",
+ * // "netAmount": {},
+ * // "paymentMethod": {},
+ * // "paymentStatus": "my_paymentStatus",
+ * // "pickupDetails": {},
+ * // "placedDate": "my_placedDate",
+ * // "promotions": [],
+ * // "refunds": [],
+ * // "shipments": [],
+ * // "shippingCost": {},
+ * // "shippingCostTax": {},
+ * // "shippingOption": "my_shippingOption",
+ * // "status": "my_status",
+ * // "taxCollector": "my_taxCollector"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.get
* @memberOf! ()
*
@@ -10715,6 +13403,49 @@ export namespace content_v2 {
/**
* content.orders.getbymerchantorderid
* @desc Retrieves an order using merchant order ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.getbymerchantorderid({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The merchant order ID to be looked for.
+ * merchantOrderId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "order": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.getbymerchantorderid
* @memberOf! ()
*
@@ -10799,6 +13530,51 @@ export namespace content_v2 {
/**
* content.orders.gettestordertemplate
* @desc Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.gettestordertemplate({
+ * // The country of the template to retrieve. Defaults to `US`.
+ * country: 'placeholder-value',
+ * // The ID of the account that should manage the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The name of the template to retrieve.
+ * templateName: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "template": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.gettestordertemplate
* @memberOf! ()
*
@@ -10884,6 +13660,64 @@ export namespace content_v2 {
/**
* content.orders.instorerefundlineitem
* @desc Deprecated. Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store). Note: We recommend calling the returnrefundlineitem method to refund in-store returns. We will issue the refund directly to the customer. This helps to prevent possible differences arising between merchant and Google transaction records. We also recommend having the point of sale system communicate with Google to ensure that customers do not receive a double refund by first refunding via Google then via an in-store return.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.instorerefundlineitem({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "amountPretax": {},
+ * // "amountTax": {},
+ * // "lineItemId": "my_lineItemId",
+ * // "operationId": "my_operationId",
+ * // "productId": "my_productId",
+ * // "quantity": 0,
+ * // "reason": "my_reason",
+ * // "reasonText": "my_reasonText"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.instorerefundlineitem
* @memberOf! ()
*
@@ -10971,6 +13805,67 @@ export namespace content_v2 {
/**
* content.orders.list
* @desc Lists the orders in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.list({
+ * // Obtains orders that match the acknowledgement status. When set to true, obtains orders that have been acknowledged. When false, obtains orders that have not been acknowledged.
+ * // We recommend using this filter set to `false`, in conjunction with the `acknowledge` call, such that only un-acknowledged orders are returned.
+ * acknowledged: 'placeholder-value',
+ * // The maximum number of orders to return in the response, used for paging. The default value is 25 orders per page, and the maximum allowed value is 250 orders per page.
+ * maxResults: 'placeholder-value',
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // Order results by placement date in descending or ascending order.
+ * //
+ * // Acceptable values are:
+ * // - placedDateAsc
+ * // - placedDateDesc
+ * orderBy: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * // Obtains orders placed before this date (exclusively), in ISO 8601 format.
+ * placedDateEnd: 'placeholder-value',
+ * // Obtains orders placed after this date (inclusively), in ISO 8601 format.
+ * placedDateStart: 'placeholder-value',
+ * // Obtains orders that match any of the specified statuses. Please note that `active` is a shortcut for `pendingShipment` and `partiallyShipped`, and `completed` is a shortcut for `shipped`, `partiallyDelivered`, `delivered`, `partiallyReturned`, `returned`, and `canceled`.
+ * statuses: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.list
* @memberOf! ()
*
@@ -11051,6 +13946,62 @@ export namespace content_v2 {
/**
* content.orders.refund
* @desc Deprecated, please use returnRefundLineItem instead.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.refund({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order to refund.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "amount": {},
+ * // "amountPretax": {},
+ * // "amountTax": {},
+ * // "operationId": "my_operationId",
+ * // "reason": "my_reason",
+ * // "reasonText": "my_reasonText"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.refund
* @memberOf! ()
*
@@ -11127,6 +14078,62 @@ export namespace content_v2 {
/**
* content.orders.rejectreturnlineitem
* @desc Rejects return on an line item.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.rejectreturnlineitem({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "lineItemId": "my_lineItemId",
+ * // "operationId": "my_operationId",
+ * // "productId": "my_productId",
+ * // "quantity": 0,
+ * // "reason": "my_reason",
+ * // "reasonText": "my_reasonText"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.rejectreturnlineitem
* @memberOf! ()
*
@@ -11212,6 +14219,62 @@ export namespace content_v2 {
/**
* content.orders.returnlineitem
* @desc Returns a line item.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.returnlineitem({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "lineItemId": "my_lineItemId",
+ * // "operationId": "my_operationId",
+ * // "productId": "my_productId",
+ * // "quantity": 0,
+ * // "reason": "my_reason",
+ * // "reasonText": "my_reasonText"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.returnlineitem
* @memberOf! ()
*
@@ -11297,6 +14360,64 @@ export namespace content_v2 {
/**
* content.orders.returnrefundlineitem
* @desc Returns and refunds a line item. Note that this method can only be called on fully shipped orders.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.returnrefundlineitem({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "amountPretax": {},
+ * // "amountTax": {},
+ * // "lineItemId": "my_lineItemId",
+ * // "operationId": "my_operationId",
+ * // "productId": "my_productId",
+ * // "quantity": 0,
+ * // "reason": "my_reason",
+ * // "reasonText": "my_reasonText"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.returnrefundlineitem
* @memberOf! ()
*
@@ -11382,6 +14503,60 @@ export namespace content_v2 {
/**
* content.orders.setlineitemmetadata
* @desc Sets (or overrides if it already exists) merchant provided annotations in the form of key-value pairs. A common use case would be to supply us with additional structured information about a line item that cannot be provided via other methods. Submitted key-value pairs can be retrieved as part of the orders resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.setlineitemmetadata({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "annotations": [],
+ * // "lineItemId": "my_lineItemId",
+ * // "operationId": "my_operationId",
+ * // "productId": "my_productId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.setlineitemmetadata
* @memberOf! ()
*
@@ -11467,6 +14642,63 @@ export namespace content_v2 {
/**
* content.orders.shiplineitems
* @desc Marks line item(s) as shipped.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.shiplineitems({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "carrier": "my_carrier",
+ * // "lineItems": [],
+ * // "operationId": "my_operationId",
+ * // "shipmentGroupId": "my_shipmentGroupId",
+ * // "shipmentId": "my_shipmentId",
+ * // "shipmentInfos": [],
+ * // "trackingId": "my_trackingId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.shiplineitems
* @memberOf! ()
*
@@ -11550,6 +14782,61 @@ export namespace content_v2 {
/**
* content.orders.updatelineitemshippingdetails
* @desc Updates ship by and delivery by dates for a line item.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.updatelineitemshippingdetails({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "deliverByDate": "my_deliverByDate",
+ * // "lineItemId": "my_lineItemId",
+ * // "operationId": "my_operationId",
+ * // "productId": "my_productId",
+ * // "shipByDate": "my_shipByDate"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.updatelineitemshippingdetails
* @memberOf! ()
*
@@ -11651,6 +14938,58 @@ export namespace content_v2 {
/**
* content.orders.updatemerchantorderid
* @desc Updates the merchant order ID for a given order.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.updatemerchantorderid({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "merchantOrderId": "my_merchantOrderId",
+ * // "operationId": "my_operationId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.updatemerchantorderid
* @memberOf! ()
*
@@ -11738,6 +15077,62 @@ export namespace content_v2 {
/**
* content.orders.updateshipment
* @desc Updates a shipment's status, carrier, and/or tracking ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.orders.updateshipment({
+ * // The ID of the account that manages the order. This cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The ID of the order.
+ * orderId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "carrier": "my_carrier",
+ * // "deliveryDate": "my_deliveryDate",
+ * // "operationId": "my_operationId",
+ * // "shipmentId": "my_shipmentId",
+ * // "status": "my_status",
+ * // "trackingId": "my_trackingId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "executionStatus": "my_executionStatus",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.orders.updateshipment
* @memberOf! ()
*
@@ -12279,6 +15674,55 @@ export namespace content_v2 {
/**
* content.pos.custombatch
* @desc Batches multiple POS-related calls in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.pos.custombatch({
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.pos.custombatch
* @memberOf! ()
*
@@ -12357,6 +15801,47 @@ export namespace content_v2 {
/**
* content.pos.delete
* @desc Deletes a store for the given merchant.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.pos.delete({
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ * // The ID of the POS or inventory data provider.
+ * merchantId: 'placeholder-value',
+ * // A store code that is unique per merchant.
+ * storeCode: 'placeholder-value',
+ * // The ID of the target merchant.
+ * targetMerchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.pos.delete
* @memberOf! ()
*
@@ -12431,6 +15916,52 @@ export namespace content_v2 {
/**
* content.pos.get
* @desc Retrieves information about the given store.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.pos.get({
+ * // The ID of the POS or inventory data provider.
+ * merchantId: 'placeholder-value',
+ * // A store code that is unique per merchant.
+ * storeCode: 'placeholder-value',
+ * // The ID of the target merchant.
+ * targetMerchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "storeAddress": "my_storeAddress",
+ * // "storeCode": "my_storeCode"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.pos.get
* @memberOf! ()
*
@@ -12504,6 +16035,62 @@ export namespace content_v2 {
/**
* content.pos.insert
* @desc Creates a store for the given merchant.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.pos.insert({
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ * // The ID of the POS or inventory data provider.
+ * merchantId: 'placeholder-value',
+ * // The ID of the target merchant.
+ * targetMerchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "storeAddress": "my_storeAddress",
+ * // "storeCode": "my_storeCode"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "storeAddress": "my_storeAddress",
+ * // "storeCode": "my_storeCode"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.pos.insert
* @memberOf! ()
*
@@ -12577,6 +16164,73 @@ export namespace content_v2 {
/**
* content.pos.inventory
* @desc Submit inventory for the given merchant.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.pos.inventory({
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ * // The ID of the POS or inventory data provider.
+ * merchantId: 'placeholder-value',
+ * // The ID of the target merchant.
+ * targetMerchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "contentLanguage": "my_contentLanguage",
+ * // "gtin": "my_gtin",
+ * // "itemId": "my_itemId",
+ * // "price": {},
+ * // "quantity": "my_quantity",
+ * // "storeCode": "my_storeCode",
+ * // "targetCountry": "my_targetCountry",
+ * // "timestamp": "my_timestamp"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "contentLanguage": "my_contentLanguage",
+ * // "gtin": "my_gtin",
+ * // "itemId": "my_itemId",
+ * // "kind": "my_kind",
+ * // "price": {},
+ * // "quantity": "my_quantity",
+ * // "storeCode": "my_storeCode",
+ * // "targetCountry": "my_targetCountry",
+ * // "timestamp": "my_timestamp"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.pos.inventory
* @memberOf! ()
*
@@ -12657,6 +16311,49 @@ export namespace content_v2 {
/**
* content.pos.list
* @desc Lists the stores of the target merchant.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.pos.list({
+ * // The ID of the POS or inventory data provider.
+ * merchantId: 'placeholder-value',
+ * // The ID of the target merchant.
+ * targetMerchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.pos.list
* @memberOf! ()
*
@@ -12730,6 +16427,75 @@ export namespace content_v2 {
/**
* content.pos.sale
* @desc Submit a sale event for the given merchant.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.pos.sale({
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ * // The ID of the POS or inventory data provider.
+ * merchantId: 'placeholder-value',
+ * // The ID of the target merchant.
+ * targetMerchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "contentLanguage": "my_contentLanguage",
+ * // "gtin": "my_gtin",
+ * // "itemId": "my_itemId",
+ * // "price": {},
+ * // "quantity": "my_quantity",
+ * // "saleId": "my_saleId",
+ * // "storeCode": "my_storeCode",
+ * // "targetCountry": "my_targetCountry",
+ * // "timestamp": "my_timestamp"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "contentLanguage": "my_contentLanguage",
+ * // "gtin": "my_gtin",
+ * // "itemId": "my_itemId",
+ * // "kind": "my_kind",
+ * // "price": {},
+ * // "quantity": "my_quantity",
+ * // "saleId": "my_saleId",
+ * // "storeCode": "my_storeCode",
+ * // "targetCountry": "my_targetCountry",
+ * // "timestamp": "my_timestamp"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.pos.sale
* @memberOf! ()
*
@@ -12958,6 +16724,55 @@ export namespace content_v2 {
/**
* content.products.custombatch
* @desc Retrieves, inserts, and deletes multiple products in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.products.custombatch({
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.products.custombatch
* @memberOf! ()
*
@@ -13040,6 +16855,45 @@ export namespace content_v2 {
/**
* content.products.delete
* @desc Deletes a product from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.products.delete({
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ * // The ID of the account that contains the product. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The REST ID of the product.
+ * productId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.products.delete
* @memberOf! ()
*
@@ -13112,6 +16966,125 @@ export namespace content_v2 {
/**
* content.products.get
* @desc Retrieves a product from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.products.get({
+ * // The ID of the account that contains the product. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The REST ID of the product.
+ * productId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "additionalImageLinks": [],
+ * // "additionalProductTypes": [],
+ * // "adult": false,
+ * // "adwordsGrouping": "my_adwordsGrouping",
+ * // "adwordsLabels": [],
+ * // "adwordsRedirect": "my_adwordsRedirect",
+ * // "ageGroup": "my_ageGroup",
+ * // "aspects": [],
+ * // "availability": "my_availability",
+ * // "availabilityDate": "my_availabilityDate",
+ * // "brand": "my_brand",
+ * // "channel": "my_channel",
+ * // "color": "my_color",
+ * // "condition": "my_condition",
+ * // "contentLanguage": "my_contentLanguage",
+ * // "costOfGoodsSold": {},
+ * // "customAttributes": [],
+ * // "customGroups": [],
+ * // "customLabel0": "my_customLabel0",
+ * // "customLabel1": "my_customLabel1",
+ * // "customLabel2": "my_customLabel2",
+ * // "customLabel3": "my_customLabel3",
+ * // "customLabel4": "my_customLabel4",
+ * // "description": "my_description",
+ * // "destinations": [],
+ * // "displayAdsId": "my_displayAdsId",
+ * // "displayAdsLink": "my_displayAdsLink",
+ * // "displayAdsSimilarIds": [],
+ * // "displayAdsTitle": "my_displayAdsTitle",
+ * // "displayAdsValue": {},
+ * // "energyEfficiencyClass": "my_energyEfficiencyClass",
+ * // "expirationDate": "my_expirationDate",
+ * // "gender": "my_gender",
+ * // "googleProductCategory": "my_googleProductCategory",
+ * // "gtin": "my_gtin",
+ * // "id": "my_id",
+ * // "identifierExists": false,
+ * // "imageLink": "my_imageLink",
+ * // "installment": {},
+ * // "isBundle": false,
+ * // "itemGroupId": "my_itemGroupId",
+ * // "kind": "my_kind",
+ * // "link": "my_link",
+ * // "loyaltyPoints": {},
+ * // "material": "my_material",
+ * // "maxEnergyEfficiencyClass": "my_maxEnergyEfficiencyClass",
+ * // "maxHandlingTime": "my_maxHandlingTime",
+ * // "minEnergyEfficiencyClass": "my_minEnergyEfficiencyClass",
+ * // "minHandlingTime": "my_minHandlingTime",
+ * // "mobileLink": "my_mobileLink",
+ * // "mpn": "my_mpn",
+ * // "multipack": "my_multipack",
+ * // "offerId": "my_offerId",
+ * // "onlineOnly": false,
+ * // "pattern": "my_pattern",
+ * // "price": {},
+ * // "productType": "my_productType",
+ * // "promotionIds": [],
+ * // "salePrice": {},
+ * // "salePriceEffectiveDate": "my_salePriceEffectiveDate",
+ * // "sellOnGoogleQuantity": "my_sellOnGoogleQuantity",
+ * // "shipping": [],
+ * // "shippingHeight": {},
+ * // "shippingLabel": "my_shippingLabel",
+ * // "shippingLength": {},
+ * // "shippingWeight": {},
+ * // "shippingWidth": {},
+ * // "sizeSystem": "my_sizeSystem",
+ * // "sizeType": "my_sizeType",
+ * // "sizes": [],
+ * // "source": "my_source",
+ * // "targetCountry": "my_targetCountry",
+ * // "taxes": [],
+ * // "title": "my_title",
+ * // "unitPricingBaseMeasure": {},
+ * // "unitPricingMeasure": {},
+ * // "validatedDestinations": [],
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.products.get
* @memberOf! ()
*
@@ -13183,6 +17156,210 @@ export namespace content_v2 {
/**
* content.products.insert
* @desc Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.products.insert({
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ * // The ID of the account that contains the product. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "additionalImageLinks": [],
+ * // "additionalProductTypes": [],
+ * // "adult": false,
+ * // "adwordsGrouping": "my_adwordsGrouping",
+ * // "adwordsLabels": [],
+ * // "adwordsRedirect": "my_adwordsRedirect",
+ * // "ageGroup": "my_ageGroup",
+ * // "aspects": [],
+ * // "availability": "my_availability",
+ * // "availabilityDate": "my_availabilityDate",
+ * // "brand": "my_brand",
+ * // "channel": "my_channel",
+ * // "color": "my_color",
+ * // "condition": "my_condition",
+ * // "contentLanguage": "my_contentLanguage",
+ * // "costOfGoodsSold": {},
+ * // "customAttributes": [],
+ * // "customGroups": [],
+ * // "customLabel0": "my_customLabel0",
+ * // "customLabel1": "my_customLabel1",
+ * // "customLabel2": "my_customLabel2",
+ * // "customLabel3": "my_customLabel3",
+ * // "customLabel4": "my_customLabel4",
+ * // "description": "my_description",
+ * // "destinations": [],
+ * // "displayAdsId": "my_displayAdsId",
+ * // "displayAdsLink": "my_displayAdsLink",
+ * // "displayAdsSimilarIds": [],
+ * // "displayAdsTitle": "my_displayAdsTitle",
+ * // "displayAdsValue": {},
+ * // "energyEfficiencyClass": "my_energyEfficiencyClass",
+ * // "expirationDate": "my_expirationDate",
+ * // "gender": "my_gender",
+ * // "googleProductCategory": "my_googleProductCategory",
+ * // "gtin": "my_gtin",
+ * // "id": "my_id",
+ * // "identifierExists": false,
+ * // "imageLink": "my_imageLink",
+ * // "installment": {},
+ * // "isBundle": false,
+ * // "itemGroupId": "my_itemGroupId",
+ * // "kind": "my_kind",
+ * // "link": "my_link",
+ * // "loyaltyPoints": {},
+ * // "material": "my_material",
+ * // "maxEnergyEfficiencyClass": "my_maxEnergyEfficiencyClass",
+ * // "maxHandlingTime": "my_maxHandlingTime",
+ * // "minEnergyEfficiencyClass": "my_minEnergyEfficiencyClass",
+ * // "minHandlingTime": "my_minHandlingTime",
+ * // "mobileLink": "my_mobileLink",
+ * // "mpn": "my_mpn",
+ * // "multipack": "my_multipack",
+ * // "offerId": "my_offerId",
+ * // "onlineOnly": false,
+ * // "pattern": "my_pattern",
+ * // "price": {},
+ * // "productType": "my_productType",
+ * // "promotionIds": [],
+ * // "salePrice": {},
+ * // "salePriceEffectiveDate": "my_salePriceEffectiveDate",
+ * // "sellOnGoogleQuantity": "my_sellOnGoogleQuantity",
+ * // "shipping": [],
+ * // "shippingHeight": {},
+ * // "shippingLabel": "my_shippingLabel",
+ * // "shippingLength": {},
+ * // "shippingWeight": {},
+ * // "shippingWidth": {},
+ * // "sizeSystem": "my_sizeSystem",
+ * // "sizeType": "my_sizeType",
+ * // "sizes": [],
+ * // "source": "my_source",
+ * // "targetCountry": "my_targetCountry",
+ * // "taxes": [],
+ * // "title": "my_title",
+ * // "unitPricingBaseMeasure": {},
+ * // "unitPricingMeasure": {},
+ * // "validatedDestinations": [],
+ * // "warnings": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "additionalImageLinks": [],
+ * // "additionalProductTypes": [],
+ * // "adult": false,
+ * // "adwordsGrouping": "my_adwordsGrouping",
+ * // "adwordsLabels": [],
+ * // "adwordsRedirect": "my_adwordsRedirect",
+ * // "ageGroup": "my_ageGroup",
+ * // "aspects": [],
+ * // "availability": "my_availability",
+ * // "availabilityDate": "my_availabilityDate",
+ * // "brand": "my_brand",
+ * // "channel": "my_channel",
+ * // "color": "my_color",
+ * // "condition": "my_condition",
+ * // "contentLanguage": "my_contentLanguage",
+ * // "costOfGoodsSold": {},
+ * // "customAttributes": [],
+ * // "customGroups": [],
+ * // "customLabel0": "my_customLabel0",
+ * // "customLabel1": "my_customLabel1",
+ * // "customLabel2": "my_customLabel2",
+ * // "customLabel3": "my_customLabel3",
+ * // "customLabel4": "my_customLabel4",
+ * // "description": "my_description",
+ * // "destinations": [],
+ * // "displayAdsId": "my_displayAdsId",
+ * // "displayAdsLink": "my_displayAdsLink",
+ * // "displayAdsSimilarIds": [],
+ * // "displayAdsTitle": "my_displayAdsTitle",
+ * // "displayAdsValue": {},
+ * // "energyEfficiencyClass": "my_energyEfficiencyClass",
+ * // "expirationDate": "my_expirationDate",
+ * // "gender": "my_gender",
+ * // "googleProductCategory": "my_googleProductCategory",
+ * // "gtin": "my_gtin",
+ * // "id": "my_id",
+ * // "identifierExists": false,
+ * // "imageLink": "my_imageLink",
+ * // "installment": {},
+ * // "isBundle": false,
+ * // "itemGroupId": "my_itemGroupId",
+ * // "kind": "my_kind",
+ * // "link": "my_link",
+ * // "loyaltyPoints": {},
+ * // "material": "my_material",
+ * // "maxEnergyEfficiencyClass": "my_maxEnergyEfficiencyClass",
+ * // "maxHandlingTime": "my_maxHandlingTime",
+ * // "minEnergyEfficiencyClass": "my_minEnergyEfficiencyClass",
+ * // "minHandlingTime": "my_minHandlingTime",
+ * // "mobileLink": "my_mobileLink",
+ * // "mpn": "my_mpn",
+ * // "multipack": "my_multipack",
+ * // "offerId": "my_offerId",
+ * // "onlineOnly": false,
+ * // "pattern": "my_pattern",
+ * // "price": {},
+ * // "productType": "my_productType",
+ * // "promotionIds": [],
+ * // "salePrice": {},
+ * // "salePriceEffectiveDate": "my_salePriceEffectiveDate",
+ * // "sellOnGoogleQuantity": "my_sellOnGoogleQuantity",
+ * // "shipping": [],
+ * // "shippingHeight": {},
+ * // "shippingLabel": "my_shippingLabel",
+ * // "shippingLength": {},
+ * // "shippingWeight": {},
+ * // "shippingWidth": {},
+ * // "sizeSystem": "my_sizeSystem",
+ * // "sizeType": "my_sizeType",
+ * // "sizes": [],
+ * // "source": "my_source",
+ * // "targetCountry": "my_targetCountry",
+ * // "taxes": [],
+ * // "title": "my_title",
+ * // "unitPricingBaseMeasure": {},
+ * // "unitPricingMeasure": {},
+ * // "validatedDestinations": [],
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.products.insert
* @memberOf! ()
*
@@ -13256,6 +17433,54 @@ export namespace content_v2 {
/**
* content.products.list
* @desc Lists the products in your Merchant Center account. The response might contain fewer items than specified by maxResults. Rely on nextPageToken to determine if there are more items to be requested.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.products.list({
+ * // Flag to include the invalid inserted items in the result of the list request. By default the invalid items are not shown (the default value is false).
+ * includeInvalidInsertedItems: 'placeholder-value',
+ * // The maximum number of products to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the account that contains the products. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.products.list
* @memberOf! ()
*
@@ -13436,6 +17661,55 @@ export namespace content_v2 {
/**
* content.productstatuses.custombatch
* @desc Gets the statuses of multiple products in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.productstatuses.custombatch({
+ * // Flag to include full product data in the results of this request. The default value is false.
+ * includeAttributes: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.productstatuses.custombatch
* @memberOf! ()
*
@@ -13520,6 +17794,62 @@ export namespace content_v2 {
/**
* content.productstatuses.get
* @desc Gets the status of a product from your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.productstatuses.get({
+ * // If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.
+ * destinations: 'placeholder-value',
+ * // Flag to include full product data in the result of this get request. The default value is false.
+ * includeAttributes: 'placeholder-value',
+ * // The ID of the account that contains the product. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The REST ID of the product.
+ * productId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationDate": "my_creationDate",
+ * // "dataQualityIssues": [],
+ * // "destinationStatuses": [],
+ * // "googleExpirationDate": "my_googleExpirationDate",
+ * // "itemLevelIssues": [],
+ * // "kind": "my_kind",
+ * // "lastUpdateDate": "my_lastUpdateDate",
+ * // "link": "my_link",
+ * // "product": {},
+ * // "productId": "my_productId",
+ * // "title": "my_title"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.productstatuses.get
* @memberOf! ()
*
@@ -13596,6 +17926,58 @@ export namespace content_v2 {
/**
* content.productstatuses.list
* @desc Lists the statuses of the products in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.productstatuses.list({
+ * // If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.
+ * destinations: 'placeholder-value',
+ * // Flag to include full product data in the results of the list request. The default value is false.
+ * includeAttributes: 'placeholder-value',
+ * // Flag to include the invalid inserted items in the result of the list request. By default the invalid items are not shown (the default value is false).
+ * includeInvalidInsertedItems: 'placeholder-value',
+ * // The maximum number of product statuses to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the account that contains the products. This account cannot be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.productstatuses.list
* @memberOf! ()
*
@@ -13763,6 +18145,55 @@ export namespace content_v2 {
/**
* content.shippingsettings.custombatch
* @desc Retrieves and updates the shipping settings of multiple accounts in a single request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.shippingsettings.custombatch({
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entries": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.shippingsettings.custombatch
* @memberOf! ()
*
@@ -13849,6 +18280,50 @@ export namespace content_v2 {
/**
* content.shippingsettings.get
* @desc Retrieves the shipping settings of the account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.shippingsettings.get({
+ * // The ID of the account for which to get/update shipping settings.
+ * accountId: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "postalCodeGroups": [],
+ * // "services": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.shippingsettings.get
* @memberOf! ()
*
@@ -13923,6 +18398,47 @@ export namespace content_v2 {
/**
* content.shippingsettings.getsupportedcarriers
* @desc Retrieves supported carriers and carrier services for an account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.shippingsettings.getsupportedcarriers({
+ * // The ID of the account for which to retrieve the supported carriers.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "carriers": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.shippingsettings.getsupportedcarriers
* @memberOf! ()
*
@@ -14021,6 +18537,47 @@ export namespace content_v2 {
/**
* content.shippingsettings.getsupportedholidays
* @desc Retrieves supported holidays for an account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.shippingsettings.getsupportedholidays({
+ * // The ID of the account for which to retrieve the supported holidays.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "holidays": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.shippingsettings.getsupportedholidays
* @memberOf! ()
*
@@ -14119,6 +18676,47 @@ export namespace content_v2 {
/**
* content.shippingsettings.getsupportedpickupservices
* @desc Retrieves supported pickup services for an account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.shippingsettings.getsupportedpickupservices({
+ * // The ID of the account for which to retrieve the supported pickup services.
+ * merchantId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "pickupServices": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.shippingsettings.getsupportedpickupservices
* @memberOf! ()
*
@@ -14216,6 +18814,52 @@ export namespace content_v2 {
/**
* content.shippingsettings.list
* @desc Lists the shipping settings of the sub-accounts in your Merchant Center account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.shippingsettings.list({
+ * // The maximum number of shipping settings to return in the response, used for paging.
+ * maxResults: 'placeholder-value',
+ * // The ID of the managing account. This must be a multi-client account.
+ * merchantId: 'placeholder-value',
+ * // The token returned by the previous request.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.shippingsettings.list
* @memberOf! ()
*
@@ -14300,6 +18944,62 @@ export namespace content_v2 {
/**
* content.shippingsettings.update
* @desc Updates the shipping settings of the account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/content.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const content = google.content('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/content'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await content.shippingsettings.update({
+ * // The ID of the account for which to get/update shipping settings.
+ * accountId: 'placeholder-value',
+ * // Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
+ * dryRun: 'placeholder-value',
+ * // The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
+ * merchantId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "postalCodeGroups": [],
+ * // "services": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "postalCodeGroups": [],
+ * // "services": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias content.shippingsettings.update
* @memberOf! ()
*
diff --git a/src/apis/customsearch/v1.ts b/src/apis/customsearch/v1.ts
index ab8e1b3e10b..b61388b6a80 100644
--- a/src/apis/customsearch/v1.ts
+++ b/src/apis/customsearch/v1.ts
@@ -210,6 +210,113 @@ export namespace customsearch_v1 {
/**
* search.cse.list
* @desc Returns metadata about the search performed, metadata about the custom search engine used for the search, and the search results.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/customsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const customsearch = google.customsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await search.cse.list({
+ * // Turns off the translation between zh-CN and zh-TW.
+ * c2coff: 'placeholder-value',
+ * // Country restrict(s).
+ * cr: 'placeholder-value',
+ * // The custom search engine ID to scope this search query
+ * cx: 'placeholder-value',
+ * // Specifies all search results are from a time period
+ * dateRestrict: 'placeholder-value',
+ * // Identifies a phrase that all documents in the search results must contain
+ * exactTerms: 'placeholder-value',
+ * // Identifies a word or phrase that should not appear in any documents in the search results
+ * excludeTerms: 'placeholder-value',
+ * // Returns images of a specified type. Some of the allowed values are: bmp, gif, png, jpg, svg, pdf, ...
+ * fileType: 'placeholder-value',
+ * // Controls turning on or off the duplicate content filter.
+ * filter: 'placeholder-value',
+ * // Geolocation of end user.
+ * gl: 'placeholder-value',
+ * // The local Google domain to use to perform the search.
+ * googlehost: 'placeholder-value',
+ * // Creates a range in form as_nlo value..as_nhi value and attempts to append it to query
+ * highRange: 'placeholder-value',
+ * // Sets the user interface language.
+ * hl: 'placeholder-value',
+ * // Appends the extra query terms to the query.
+ * hq: 'placeholder-value',
+ * // Returns black and white, grayscale, or color images: mono, gray, and color.
+ * imgColorType: 'placeholder-value',
+ * // Returns images of a specific dominant color: red, orange, yellow, green, teal, blue, purple, pink, white, gray, black and brown.
+ * imgDominantColor: 'placeholder-value',
+ * // Returns images of a specified size, where size can be one of: icon, small, medium, large, xlarge, xxlarge, and huge.
+ * imgSize: 'placeholder-value',
+ * // Returns images of a type, which can be one of: clipart, face, lineart, news, and photo.
+ * imgType: 'placeholder-value',
+ * // Specifies that all search results should contain a link to a particular URL
+ * linkSite: 'placeholder-value',
+ * // Creates a range in form as_nlo value..as_nhi value and attempts to append it to query
+ * lowRange: 'placeholder-value',
+ * // The language restriction for the search results
+ * lr: 'placeholder-value',
+ * // Number of search results to return
+ * num: 'placeholder-value',
+ * // Provides additional search terms to check for in a document, where each document in the search results must contain at least one of the additional search terms
+ * orTerms: 'placeholder-value',
+ * // Query
+ * q: 'placeholder-value',
+ * // Specifies that all search results should be pages that are related to the specified URL
+ * relatedSite: 'placeholder-value',
+ * // Filters based on licensing. Supported values include: cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived and combinations of these.
+ * rights: 'placeholder-value',
+ * // Search safety level
+ * safe: 'placeholder-value',
+ * // Specifies the search type: image.
+ * searchType: 'placeholder-value',
+ * // Specifies all search results should be pages from a given site
+ * siteSearch: 'placeholder-value',
+ * // Controls whether to include or exclude results from the site named in the as_sitesearch parameter
+ * siteSearchFilter: 'placeholder-value',
+ * // The sort expression to apply to the results
+ * sort: 'placeholder-value',
+ * // The index of the first result to return
+ * start: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "context": {},
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "promotions": [],
+ * // "queries": {},
+ * // "searchInformation": {},
+ * // "spelling": {},
+ * // "url": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias search.cse.list
* @memberOf! ()
*
@@ -447,6 +554,113 @@ export namespace customsearch_v1 {
/**
* search.cse.siterestrict.list
* @desc Returns metadata about the search performed, metadata about the custom search engine used for the search, and the search results. Uses a small set of url patterns.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/customsearch.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const customsearch = google.customsearch('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await search.cse.siterestrict.list({
+ * // Turns off the translation between zh-CN and zh-TW.
+ * c2coff: 'placeholder-value',
+ * // Country restrict(s).
+ * cr: 'placeholder-value',
+ * // The custom search engine ID to scope this search query
+ * cx: 'placeholder-value',
+ * // Specifies all search results are from a time period
+ * dateRestrict: 'placeholder-value',
+ * // Identifies a phrase that all documents in the search results must contain
+ * exactTerms: 'placeholder-value',
+ * // Identifies a word or phrase that should not appear in any documents in the search results
+ * excludeTerms: 'placeholder-value',
+ * // Returns images of a specified type. Some of the allowed values are: bmp, gif, png, jpg, svg, pdf, ...
+ * fileType: 'placeholder-value',
+ * // Controls turning on or off the duplicate content filter.
+ * filter: 'placeholder-value',
+ * // Geolocation of end user.
+ * gl: 'placeholder-value',
+ * // The local Google domain to use to perform the search.
+ * googlehost: 'placeholder-value',
+ * // Creates a range in form as_nlo value..as_nhi value and attempts to append it to query
+ * highRange: 'placeholder-value',
+ * // Sets the user interface language.
+ * hl: 'placeholder-value',
+ * // Appends the extra query terms to the query.
+ * hq: 'placeholder-value',
+ * // Returns black and white, grayscale, or color images: mono, gray, and color.
+ * imgColorType: 'placeholder-value',
+ * // Returns images of a specific dominant color: red, orange, yellow, green, teal, blue, purple, pink, white, gray, black and brown.
+ * imgDominantColor: 'placeholder-value',
+ * // Returns images of a specified size, where size can be one of: icon, small, medium, large, xlarge, xxlarge, and huge.
+ * imgSize: 'placeholder-value',
+ * // Returns images of a type, which can be one of: clipart, face, lineart, news, and photo.
+ * imgType: 'placeholder-value',
+ * // Specifies that all search results should contain a link to a particular URL
+ * linkSite: 'placeholder-value',
+ * // Creates a range in form as_nlo value..as_nhi value and attempts to append it to query
+ * lowRange: 'placeholder-value',
+ * // The language restriction for the search results
+ * lr: 'placeholder-value',
+ * // Number of search results to return
+ * num: 'placeholder-value',
+ * // Provides additional search terms to check for in a document, where each document in the search results must contain at least one of the additional search terms
+ * orTerms: 'placeholder-value',
+ * // Query
+ * q: 'placeholder-value',
+ * // Specifies that all search results should be pages that are related to the specified URL
+ * relatedSite: 'placeholder-value',
+ * // Filters based on licensing. Supported values include: cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived and combinations of these.
+ * rights: 'placeholder-value',
+ * // Search safety level
+ * safe: 'placeholder-value',
+ * // Specifies the search type: image.
+ * searchType: 'placeholder-value',
+ * // Specifies all search results should be pages from a given site
+ * siteSearch: 'placeholder-value',
+ * // Controls whether to include or exclude results from the site named in the as_sitesearch parameter
+ * siteSearchFilter: 'placeholder-value',
+ * // The sort expression to apply to the results
+ * sort: 'placeholder-value',
+ * // The index of the first result to return
+ * start: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "context": {},
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "promotions": [],
+ * // "queries": {},
+ * // "searchInformation": {},
+ * // "spelling": {},
+ * // "url": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias search.cse.siterestrict.list
* @memberOf! ()
*
diff --git a/src/apis/datacatalog/v1beta1.ts b/src/apis/datacatalog/v1beta1.ts
index 9a97079d151..d70d7c724fc 100644
--- a/src/apis/datacatalog/v1beta1.ts
+++ b/src/apis/datacatalog/v1beta1.ts
@@ -843,6 +843,56 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.catalog.search
* @desc Searches Data Catalog for multiple resources like entries, tags that match a query. This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not return the complete resource, only the resource identifier and high level fields. Clients can subsequentally call `Get` methods. Note that Data Catalog search queries do not guarantee full recall. Query results that match your query may not be returned, even in subsequent result pages. Also note that results returned (and not returned) can vary across repeated search queries. See [Data Catalog Search Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more information.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.catalog.search({
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "orderBy": "my_orderBy",
+ * // "pageSize": 0,
+ * // "pageToken": "my_pageToken",
+ * // "query": "my_query",
+ * // "scope": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "results": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.catalog.search
* @memberOf! ()
*
@@ -959,6 +1009,79 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.entries.lookup
* @desc Get an entry by target resource name. This method allows clients to use the resource name from the source Google Cloud Platform service to get the Data Catalog Entry.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.entries.lookup({
+ * // The full name of the Google Cloud Platform resource the Data Catalog
+ * // entry represents. See:
+ * // https://cloud.google.com/apis/design/resource_names#full_resource_name.
+ * // Full names are case-sensitive.
+ * //
+ * // Examples:
+ * //
+ * // * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+ * // * //pubsub.googleapis.com/projects/projectId/topics/topicId
+ * linkedResource: 'placeholder-value',
+ * // The SQL name of the entry. SQL names are case-sensitive.
+ * //
+ * // Examples:
+ * //
+ * // * `pubsub.project_id.topic_id`
+ * // * ``pubsub.project_id.`topic.id.with.dots` ``
+ * // * `bigquery.table.project_id.dataset_id.table_id`
+ * // * `bigquery.dataset.project_id.dataset_id`
+ * // * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id`
+ * //
+ * // `*_id`s shoud satisfy the standard SQL rules for identifiers.
+ * // https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical.
+ * sqlResource: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bigqueryDateShardedSpec": {},
+ * // "bigqueryTableSpec": {},
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "gcsFilesetSpec": {},
+ * // "integratedSystem": "my_integratedSystem",
+ * // "linkedResource": "my_linkedResource",
+ * // "name": "my_name",
+ * // "schema": {},
+ * // "sourceSystemTimestamps": {},
+ * // "type": "my_type",
+ * // "userSpecifiedSystem": "my_userSpecifiedSystem",
+ * // "userSpecifiedType": "my_userSpecifiedType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.entries.lookup
* @memberOf! ()
*
@@ -1101,6 +1224,69 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.create
* @desc A maximum of 10,000 entry groups may be created per organization across all locations. Users should enable the Data Catalog API in the project identified by the `parent` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.create({
+ * // Required. The id of the entry group to create.
+ * // The id must begin with a letter or underscore, contain only English
+ * // letters, numbers and underscores, and be at most 64 characters.
+ * entryGroupId: 'placeholder-value',
+ * // Required. The name of the project this entry group is in. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}
+ * //
+ * // Note that this EntryGroup and its child resources may not actually be
+ * // stored in the location in this name.
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "dataCatalogTimestamps": {},
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dataCatalogTimestamps": {},
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.create
* @memberOf! ()
*
@@ -1194,6 +1380,47 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.delete
* @desc Deletes an EntryGroup. Only entry groups that do not contain entries can be deleted. Users should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.delete({
+ * // Optional. If true, deletes all entries in the entry group.
+ * force: 'placeholder-value',
+ * // Required. The name of the entry group. For example,
+ * // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+ * name: 'projects/my-project/locations/my-location/entryGroups/my-entryGroup',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.delete
* @memberOf! ()
*
@@ -1264,6 +1491,52 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.get
* @desc Gets an EntryGroup.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.get({
+ * // Required. The name of the entry group. For example,
+ * // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+ * name: 'projects/my-project/locations/my-location/entryGroups/my-entryGroup',
+ * // The fields to return. If not set or empty, all fields are returned.
+ * readMask: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dataCatalogTimestamps": {},
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.get
* @memberOf! ()
*
@@ -1353,6 +1626,58 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.getIamPolicy
* @desc Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource does not exist. An empty policy is returned if the resource exists but does not have a policy set on it. Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. Callers must have following Google IAM permission - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.getIamPolicy
* @memberOf! ()
*
@@ -1426,6 +1751,56 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.list
* @desc Lists entry groups.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.list({
+ * // Optional. The maximum number of items to return. Default is 10. Max limit is 1000.
+ * // Throws an invalid argument for `page_size > 1000`.
+ * pageSize: 'placeholder-value',
+ * // Optional. Token that specifies which page is requested. If empty, the first page is
+ * // returned.
+ * pageToken: 'placeholder-value',
+ * // Required. The name of the location that contains the entry groups, which can be
+ * // provided in URL format. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entryGroups": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.list
* @memberOf! ()
*
@@ -1528,6 +1903,68 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.patch
* @desc Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by the `entry_group.name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.patch({
+ * // The resource name of the entry group in URL format. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+ * //
+ * // Note that this EntryGroup and its child resources may not actually be
+ * // stored in the location in this name.
+ * name: 'projects/my-project/locations/my-location/entryGroups/my-entryGroup',
+ * // The fields to update on the entry group. If absent or empty, all modifiable
+ * // fields are updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "dataCatalogTimestamps": {},
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dataCatalogTimestamps": {},
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.patch
* @memberOf! ()
*
@@ -1618,6 +2055,58 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.setIamPolicy
* @desc Sets the access control policy for a resource. Replaces any existing policy. Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. Callers must have following Google IAM permission - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.setIamPolicy
* @memberOf! ()
*
@@ -1691,6 +2180,58 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.testIamPermissions
* @desc Returns the caller's permissions on a resource. If the resource does not exist, an empty set of permissions is returned (We don't return a `NOT_FOUND` error). Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. A caller is not required to have Google IAM permission to make this request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.testIamPermissions
* @memberOf! ()
*
@@ -1930,6 +2471,86 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.entries.create
* @desc Creates an entry. Only entries of 'FILESET' type or user-specified type can be created. Users should enable the Data Catalog API in the project identified by the `parent` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). A maximum of 100,000 entries may be created per entry group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.entries.create({
+ * // Required. The id of the entry to create.
+ * entryId: 'placeholder-value',
+ * // Required. The name of the entry group this entry is in. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+ * //
+ * // Note that this Entry and its child resources may not actually be stored in
+ * // the location in this name.
+ * parent:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bigqueryDateShardedSpec": {},
+ * // "bigqueryTableSpec": {},
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "gcsFilesetSpec": {},
+ * // "integratedSystem": "my_integratedSystem",
+ * // "linkedResource": "my_linkedResource",
+ * // "name": "my_name",
+ * // "schema": {},
+ * // "sourceSystemTimestamps": {},
+ * // "type": "my_type",
+ * // "userSpecifiedSystem": "my_userSpecifiedSystem",
+ * // "userSpecifiedType": "my_userSpecifiedType"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bigqueryDateShardedSpec": {},
+ * // "bigqueryTableSpec": {},
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "gcsFilesetSpec": {},
+ * // "integratedSystem": "my_integratedSystem",
+ * // "linkedResource": "my_linkedResource",
+ * // "name": "my_name",
+ * // "schema": {},
+ * // "sourceSystemTimestamps": {},
+ * // "type": "my_type",
+ * // "userSpecifiedSystem": "my_userSpecifiedSystem",
+ * // "userSpecifiedType": "my_userSpecifiedType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.entries.create
* @memberOf! ()
*
@@ -2015,6 +2636,47 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.entries.delete
* @desc Deletes an existing entry. Only entries created through CreateEntry method can be deleted. Users should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.entries.delete({
+ * // Required. The name of the entry. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+ * name:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup/entries/my-entrie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.entries.delete
* @memberOf! ()
*
@@ -2084,6 +2746,61 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.entries.get
* @desc Gets an entry.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.entries.get({
+ * // Required. The name of the entry. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+ * name:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup/entries/my-entrie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bigqueryDateShardedSpec": {},
+ * // "bigqueryTableSpec": {},
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "gcsFilesetSpec": {},
+ * // "integratedSystem": "my_integratedSystem",
+ * // "linkedResource": "my_linkedResource",
+ * // "name": "my_name",
+ * // "schema": {},
+ * // "sourceSystemTimestamps": {},
+ * // "type": "my_type",
+ * // "userSpecifiedSystem": "my_userSpecifiedSystem",
+ * // "userSpecifiedType": "my_userSpecifiedType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.entries.get
* @memberOf! ()
*
@@ -2164,6 +2881,60 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.entries.getIamPolicy
* @desc Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource does not exist. An empty policy is returned if the resource exists but does not have a policy set on it. Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. Callers must have following Google IAM permission - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.entries.getIamPolicy(
+ * {
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup/entries/my-entrie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.entries.getIamPolicy
* @memberOf! ()
*
@@ -2237,6 +3008,62 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.entries.list
* @desc Lists entries.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.entries.list({
+ * // The maximum number of items to return. Default is 10. Max limit is 1000.
+ * // Throws an invalid argument for `page_size > 1000`.
+ * pageSize: 'placeholder-value',
+ * // Token that specifies which page is requested. If empty, the first page is
+ * // returned.
+ * pageToken: 'placeholder-value',
+ * // Required. The name of the entry group that contains the entries, which can
+ * // be provided in URL format. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+ * parent:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup',
+ * // The fields to return for each Entry. If not set or empty, all
+ * // fields are returned.
+ * // For example, setting read_mask to contain only one path "name" will cause
+ * // ListEntries to return a list of Entries with only "name" field.
+ * readMask: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entries": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.entries.list
* @memberOf! ()
*
@@ -2338,6 +3165,105 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.entries.patch
* @desc Updates an existing entry. Users should enable the Data Catalog API in the project identified by the `entry.name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.entries.patch({
+ * // The Data Catalog resource name of the entry in URL format. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+ * //
+ * // Note that this Entry and its child resources may not actually be stored in
+ * // the location in this name.
+ * name:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup/entries/my-entrie',
+ * // The fields to update on the entry. If absent or empty, all modifiable
+ * // fields are updated.
+ * //
+ * // The following fields are modifiable:
+ * // * For entries with type `DATA_STREAM`:
+ * // * `schema`
+ * // * For entries with type `FILESET`
+ * // * `schema`
+ * // * `display_name`
+ * // * `description`
+ * // * `gcs_fileset_spec`
+ * // * `gcs_fileset_spec.file_patterns`
+ * // * For entries with `user_specified_type`
+ * // * `schema`
+ * // * `display_name`
+ * // * `description`
+ * // * user_specified_type
+ * // * user_specified_system
+ * // * linked_resource
+ * // * source_system_timestamps
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bigqueryDateShardedSpec": {},
+ * // "bigqueryTableSpec": {},
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "gcsFilesetSpec": {},
+ * // "integratedSystem": "my_integratedSystem",
+ * // "linkedResource": "my_linkedResource",
+ * // "name": "my_name",
+ * // "schema": {},
+ * // "sourceSystemTimestamps": {},
+ * // "type": "my_type",
+ * // "userSpecifiedSystem": "my_userSpecifiedSystem",
+ * // "userSpecifiedType": "my_userSpecifiedType"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bigqueryDateShardedSpec": {},
+ * // "bigqueryTableSpec": {},
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "gcsFilesetSpec": {},
+ * // "integratedSystem": "my_integratedSystem",
+ * // "linkedResource": "my_linkedResource",
+ * // "name": "my_name",
+ * // "schema": {},
+ * // "sourceSystemTimestamps": {},
+ * // "type": "my_type",
+ * // "userSpecifiedSystem": "my_userSpecifiedSystem",
+ * // "userSpecifiedType": "my_userSpecifiedType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.entries.patch
* @memberOf! ()
*
@@ -2420,6 +3346,58 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.entries.testIamPermissions
* @desc Returns the caller's permissions on a resource. If the resource does not exist, an empty set of permissions is returned (We don't return a `NOT_FOUND` error). Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. A caller is not required to have Google IAM permission to make this request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.entries.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup/entries/my-entrie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.entries.testIamPermissions
* @memberOf! ()
*
@@ -2634,6 +3612,71 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.entries.tags.create
* @desc Creates a tag on an Entry. Note: The project identified by the `parent` parameter for the [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters) and the [tag template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) used to create the tag must be from the same organization.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.entries.tags.create(
+ * {
+ * // Required. The name of the resource to attach this tag to. Tags can be attached to
+ * // Entries. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+ * //
+ * // Note that this Tag and its child resources may not actually be stored in
+ * // the location in this name.
+ * parent:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup/entries/my-entrie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "column": "my_column",
+ * // "fields": {},
+ * // "name": "my_name",
+ * // "template": "my_template",
+ * // "templateDisplayName": "my_templateDisplayName"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "column": "my_column",
+ * // "fields": {},
+ * // "name": "my_name",
+ * // "template": "my_template",
+ * // "templateDisplayName": "my_templateDisplayName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.entries.tags.create
* @memberOf! ()
*
@@ -2718,6 +3761,49 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.entries.tags.delete
* @desc Deletes a tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.entries.tags.delete(
+ * {
+ * // Required. The name of the tag to delete. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+ * name:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup/entries/my-entrie/tags/my-tag',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.entries.tags.delete
* @memberOf! ()
*
@@ -2787,6 +3873,62 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.entries.tags.list
* @desc Lists the tags on an Entry.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.entries.tags.list(
+ * {
+ * // The maximum number of tags to return. Default is 10. Max limit is 1000.
+ * pageSize: 'placeholder-value',
+ * // Token that specifies which page is requested. If empty, the first page is
+ * // returned.
+ * pageToken: 'placeholder-value',
+ * // Required. The name of the Data Catalog resource to list the tags of. The resource
+ * // could be an Entry or an
+ * // EntryGroup.
+ * //
+ * // Examples:
+ * //
+ * // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+ * // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+ * parent:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup/entries/my-entrie',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "tags": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.entries.tags.list
* @memberOf! ()
*
@@ -2888,6 +4030,73 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.entries.tags.patch
* @desc Updates an existing tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.entries.tags.patch(
+ * {
+ * // The resource name of the tag in URL format. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+ * //
+ * // where `tag_id` is a system-generated identifier.
+ * // Note that this Tag may not actually be stored in the location in this name.
+ * name:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup/entries/my-entrie/tags/my-tag',
+ * // The fields to update on the Tag. If absent or empty, all modifiable fields
+ * // are updated. Currently the only modifiable field is the field `fields`.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "column": "my_column",
+ * // "fields": {},
+ * // "name": "my_name",
+ * // "template": "my_template",
+ * // "templateDisplayName": "my_templateDisplayName"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "column": "my_column",
+ * // "fields": {},
+ * // "name": "my_name",
+ * // "template": "my_template",
+ * // "templateDisplayName": "my_templateDisplayName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.entries.tags.patch
* @memberOf! ()
*
@@ -3048,6 +4257,69 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.tags.create
* @desc Creates a tag on an Entry. Note: The project identified by the `parent` parameter for the [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters) and the [tag template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) used to create the tag must be from the same organization.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.tags.create({
+ * // Required. The name of the resource to attach this tag to. Tags can be attached to
+ * // Entries. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+ * //
+ * // Note that this Tag and its child resources may not actually be stored in
+ * // the location in this name.
+ * parent:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "column": "my_column",
+ * // "fields": {},
+ * // "name": "my_name",
+ * // "template": "my_template",
+ * // "templateDisplayName": "my_templateDisplayName"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "column": "my_column",
+ * // "fields": {},
+ * // "name": "my_name",
+ * // "template": "my_template",
+ * // "templateDisplayName": "my_templateDisplayName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.tags.create
* @memberOf! ()
*
@@ -3132,6 +4404,47 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.tags.delete
* @desc Deletes a tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.tags.delete({
+ * // Required. The name of the tag to delete. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+ * name:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup/tags/my-tag',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.tags.delete
* @memberOf! ()
*
@@ -3201,6 +4514,60 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.tags.list
* @desc Lists the tags on an Entry.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.tags.list({
+ * // The maximum number of tags to return. Default is 10. Max limit is 1000.
+ * pageSize: 'placeholder-value',
+ * // Token that specifies which page is requested. If empty, the first page is
+ * // returned.
+ * pageToken: 'placeholder-value',
+ * // Required. The name of the Data Catalog resource to list the tags of. The resource
+ * // could be an Entry or an
+ * // EntryGroup.
+ * //
+ * // Examples:
+ * //
+ * // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+ * // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+ * parent:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "tags": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.tags.list
* @memberOf! ()
*
@@ -3302,6 +4669,71 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.entryGroups.tags.patch
* @desc Updates an existing tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.entryGroups.tags.patch({
+ * // The resource name of the tag in URL format. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+ * //
+ * // where `tag_id` is a system-generated identifier.
+ * // Note that this Tag may not actually be stored in the location in this name.
+ * name:
+ * 'projects/my-project/locations/my-location/entryGroups/my-entryGroup/tags/my-tag',
+ * // The fields to update on the Tag. If absent or empty, all modifiable fields
+ * // are updated. Currently the only modifiable field is the field `fields`.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "column": "my_column",
+ * // "fields": {},
+ * // "name": "my_name",
+ * // "template": "my_template",
+ * // "templateDisplayName": "my_templateDisplayName"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "column": "my_column",
+ * // "fields": {},
+ * // "name": "my_name",
+ * // "template": "my_template",
+ * // "templateDisplayName": "my_templateDisplayName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.entryGroups.tags.patch
* @memberOf! ()
*
@@ -3466,6 +4898,65 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.tagTemplates.create
* @desc Creates a tag template. The user should enable the Data Catalog API in the project identified by the `parent` parameter (see [Data Catalog Resource Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.tagTemplates.create({
+ * // Required. The name of the project and the template location
+ * // [region](https://cloud.google.com/data-catalog/docs/concepts/regions.
+ * //
+ * // Example:
+ * //
+ * // * projects/{project_id}/locations/us-central1
+ * parent: 'projects/my-project/locations/my-location',
+ * // Required. The id of the tag template to create.
+ * tagTemplateId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "displayName": "my_displayName",
+ * // "fields": {},
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "fields": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.tagTemplates.create
* @memberOf! ()
*
@@ -3559,6 +5050,51 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.tagTemplates.delete
* @desc Deletes a tag template and all tags using the template. Users should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.tagTemplates.delete({
+ * // Required. Currently, this field must always be set to `true`.
+ * // This confirms the deletion of any possible tags using this template.
+ * // `force = false` will be supported in the future.
+ * force: 'placeholder-value',
+ * // Required. The name of the tag template to delete. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+ * name:
+ * 'projects/my-project/locations/my-location/tagTemplates/my-tagTemplate',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.tagTemplates.delete
* @memberOf! ()
*
@@ -3629,6 +5165,51 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.tagTemplates.get
* @desc Gets a tag template.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.tagTemplates.get({
+ * // Required. The name of the tag template. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+ * name:
+ * 'projects/my-project/locations/my-location/tagTemplates/my-tagTemplate',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "fields": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.tagTemplates.get
* @memberOf! ()
*
@@ -3717,6 +5298,58 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.tagTemplates.getIamPolicy
* @desc Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource does not exist. An empty policy is returned if the resource exists but does not have a policy set on it. Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. Callers must have following Google IAM permission - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.tagTemplates.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/tagTemplates/my-tagTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.tagTemplates.getIamPolicy
* @memberOf! ()
*
@@ -3790,6 +5423,72 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.tagTemplates.patch
* @desc Updates a tag template. This method cannot be used to update the fields of a template. The tag template fields are represented as separate resources and should be updated using their own create/update/delete methods. Users should enable the Data Catalog API in the project identified by the `tag_template.name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.tagTemplates.patch({
+ * // The resource name of the tag template in URL format. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+ * //
+ * // Note that this TagTemplate and its child resources may not actually be
+ * // stored in the location in this name.
+ * name:
+ * 'projects/my-project/locations/my-location/tagTemplates/my-tagTemplate',
+ * // The field mask specifies the parts of the template to overwrite.
+ * //
+ * // Allowed fields:
+ * //
+ * // * `display_name`
+ * //
+ * // If absent or empty, all of the allowed fields above will be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "displayName": "my_displayName",
+ * // "fields": {},
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "fields": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.tagTemplates.patch
* @memberOf! ()
*
@@ -3880,6 +5579,58 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.tagTemplates.setIamPolicy
* @desc Sets the access control policy for a resource. Replaces any existing policy. Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. Callers must have following Google IAM permission - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.tagTemplates.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/tagTemplates/my-tagTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.tagTemplates.setIamPolicy
* @memberOf! ()
*
@@ -3953,6 +5704,58 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.tagTemplates.testIamPermissions
* @desc Returns the caller's permissions on a resource. If the resource does not exist, an empty set of permissions is returned (We don't return a `NOT_FOUND` error). Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. A caller is not required to have Google IAM permission to make this request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.tagTemplates.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/tagTemplates/my-tagTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.tagTemplates.testIamPermissions
* @memberOf! ()
*
@@ -4164,6 +5967,74 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.tagTemplates.fields.create
* @desc Creates a field in a tag template. The user should enable the Data Catalog API in the project identified by the `parent` parameter (see [Data Catalog Resource Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.tagTemplates.fields.create({
+ * // Required. The name of the project and the template location
+ * // [region](https://cloud.google.com/data-catalog/docs/concepts/regions).
+ * //
+ * // Example:
+ * //
+ * // * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id}
+ * parent:
+ * 'projects/my-project/locations/my-location/tagTemplates/my-tagTemplate',
+ * // Required. The ID of the tag template field to create.
+ * // Field ids can contain letters (both uppercase and lowercase), numbers
+ * // (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
+ * // character long and at most 128 characters long. Field IDs must also be
+ * // unique within their template.
+ * tagTemplateFieldId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "displayName": "my_displayName",
+ * // "isRequired": false,
+ * // "name": "my_name",
+ * // "order": 0,
+ * // "type": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "isRequired": false,
+ * // "name": "my_name",
+ * // "order": 0,
+ * // "type": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.tagTemplates.fields.create
* @memberOf! ()
*
@@ -4265,6 +6136,51 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.tagTemplates.fields.delete
* @desc Deletes a field in a tag template and all uses of that field. Users should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.tagTemplates.fields.delete({
+ * // Required. Currently, this field must always be set to `true`.
+ * // This confirms the deletion of this field from any tags using this field.
+ * // `force = false` will be supported in the future.
+ * force: 'placeholder-value',
+ * // Required. The name of the tag template field to delete. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+ * name:
+ * 'projects/my-project/locations/my-location/tagTemplates/my-tagTemplate/fields/my-field',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.tagTemplates.fields.delete
* @memberOf! ()
*
@@ -4335,6 +6251,80 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.tagTemplates.fields.patch
* @desc Updates a field in a tag template. This method cannot be used to update the field type. Users should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.tagTemplates.fields.patch({
+ * // Required. The name of the tag template field. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+ * name:
+ * 'projects/my-project/locations/my-location/tagTemplates/my-tagTemplate/fields/my-field',
+ * // Optional. The field mask specifies the parts of the template to be updated.
+ * // Allowed fields:
+ * //
+ * // * `display_name`
+ * // * `type.enum_type`
+ * // * `is_required`
+ * //
+ * // If `update_mask` is not set or empty, all of the allowed fields above will
+ * // be updated.
+ * //
+ * // When updating an enum type, the provided values will be merged with the
+ * // existing values. Therefore, enum values can only be added, existing enum
+ * // values cannot be deleted nor renamed. Updating a template field from
+ * // optional to required is NOT allowed.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "displayName": "my_displayName",
+ * // "isRequired": false,
+ * // "name": "my_name",
+ * // "order": 0,
+ * // "type": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "isRequired": false,
+ * // "name": "my_name",
+ * // "order": 0,
+ * // "type": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.tagTemplates.fields.patch
* @memberOf! ()
*
@@ -4433,6 +6423,61 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.tagTemplates.fields.rename
* @desc Renames a field in a tag template. The user should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.tagTemplates.fields.rename({
+ * // Required. The name of the tag template. Example:
+ * //
+ * // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+ * name:
+ * 'projects/my-project/locations/my-location/tagTemplates/my-tagTemplate/fields/my-field',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "newTagTemplateFieldId": "my_newTagTemplateFieldId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "isRequired": false,
+ * // "name": "my_name",
+ * // "order": 0,
+ * // "type": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.tagTemplates.fields.rename
* @memberOf! ()
*
@@ -4620,6 +6665,60 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.create
* @desc Creates a taxonomy in the specified project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.create({
+ * // Required. Resource name of the project that the taxonomy will belong to.
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "activatedPolicyTypes": [],
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "activatedPolicyTypes": [],
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.create
* @memberOf! ()
*
@@ -4712,6 +6811,45 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.delete
* @desc Deletes a taxonomy. This operation will also delete all policy tags in this taxonomy along with their associated policies.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.delete({
+ * // Required. Resource name of the taxonomy to be deleted. All policy tags in
+ * // this taxonomy will also be deleted.
+ * name: 'projects/my-project/locations/my-location/taxonomies/my-taxonomie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.delete
* @memberOf! ()
*
@@ -4781,6 +6919,51 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.export
* @desc Exports all taxonomies and their policy tags in a project. This method generates SerializedTaxonomy protos with nested policy tags that can be used as an input for future ImportTaxonomies calls.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.export({
+ * // Required. Resource name of the project that taxonomies to be exported
+ * // will share.
+ * parent: 'projects/my-project/locations/my-location',
+ * // Export taxonomies as serialized taxonomies.
+ * serializedTaxonomies: 'placeholder-value',
+ * // Required. Resource names of the taxonomies to be exported.
+ * taxonomies: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "taxonomies": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.export
* @memberOf! ()
*
@@ -4883,6 +7066,49 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.get
* @desc Gets a taxonomy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.get({
+ * // Required. Resource name of the requested taxonomy.
+ * name: 'projects/my-project/locations/my-location/taxonomies/my-taxonomie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "activatedPolicyTypes": [],
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.get
* @memberOf! ()
*
@@ -4971,6 +7197,58 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.getIamPolicy
* @desc Gets the IAM policy for a taxonomy or a policy tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/taxonomies/my-taxonomie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.getIamPolicy
* @memberOf! ()
*
@@ -5044,6 +7322,55 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.import
* @desc Imports all taxonomies and their policy tags to a project as new taxonomies. This method provides a bulk taxonomy / policy tag creation using nested proto structure.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.import({
+ * // Required. Resource name of project that the newly created taxonomies will
+ * // belong to.
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "inlineSource": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "taxonomies": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.import
* @memberOf! ()
*
@@ -5145,6 +7472,53 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.list
* @desc Lists all taxonomies in a project in a particular location that the caller has permission to view.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.list({
+ * // The maximum number of items to return. Must be a value between 1 and 1000.
+ * // If not set, defaults to 50.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous list request, if any. If
+ * // not set, defaults to an empty string.
+ * pageToken: 'placeholder-value',
+ * // Required. Resource name of the project to list the taxonomies of.
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "taxonomies": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.list
* @memberOf! ()
*
@@ -5247,6 +7621,66 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.patch
* @desc Updates a taxonomy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.patch({
+ * // Output only. Resource name of this taxonomy, whose format is:
+ * // "projects/{project_number}/locations/{location_id}/taxonomies/{id}".
+ * name: 'projects/my-project/locations/my-location/taxonomies/my-taxonomie',
+ * // The update mask applies to the resource. For the `FieldMask` definition,
+ * // see
+ * // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
+ * // If not set, defaults to all of the fields that are allowed to update.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "activatedPolicyTypes": [],
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "activatedPolicyTypes": [],
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.patch
* @memberOf! ()
*
@@ -5337,6 +7771,58 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.setIamPolicy
* @desc Sets the IAM policy for a taxonomy or a policy tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/taxonomies/my-taxonomie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.setIamPolicy
* @memberOf! ()
*
@@ -5410,6 +7896,58 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.testIamPermissions
* @desc Returns the permissions that a caller has on the specified taxonomy or policy tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/taxonomies/my-taxonomie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.testIamPermissions
* @memberOf! ()
*
@@ -5670,6 +8208,65 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.policyTags.create
* @desc Creates a policy tag in the specified taxonomy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.policyTags.create(
+ * {
+ * // Required. Resource name of the taxonomy that the policy tag will belong to.
+ * parent:
+ * 'projects/my-project/locations/my-location/taxonomies/my-taxonomie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "childPolicyTags": [],
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name",
+ * // "parentPolicyTag": "my_parentPolicyTag"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "childPolicyTags": [],
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name",
+ * // "parentPolicyTag": "my_parentPolicyTag"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.policyTags.create
* @memberOf! ()
*
@@ -5762,6 +8359,48 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.policyTags.delete
* @desc Deletes a policy tag. Also deletes all of its descendant policy tags.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.policyTags.delete(
+ * {
+ * // Required. Resource name of the policy tag to be deleted. All of its descendant
+ * // policy tags will also be deleted.
+ * name:
+ * 'projects/my-project/locations/my-location/taxonomies/my-taxonomie/policyTags/my-policyTag',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.policyTags.delete
* @memberOf! ()
*
@@ -5831,6 +8470,51 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.policyTags.get
* @desc Gets a policy tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.policyTags.get({
+ * // Required. Resource name of the requested policy tag.
+ * name:
+ * 'projects/my-project/locations/my-location/taxonomies/my-taxonomie/policyTags/my-policyTag',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "childPolicyTags": [],
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name",
+ * // "parentPolicyTag": "my_parentPolicyTag"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.policyTags.get
* @memberOf! ()
*
@@ -5919,6 +8603,60 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.policyTags.getIamPolicy
* @desc Gets the IAM policy for a taxonomy or a policy tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.policyTags.getIamPolicy(
+ * {
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/taxonomies/my-taxonomie/policyTags/my-policyTag',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.policyTags.getIamPolicy
* @memberOf! ()
*
@@ -5992,6 +8730,53 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.policyTags.list
* @desc Lists all policy tags in a taxonomy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.policyTags.list({
+ * // The maximum number of items to return. Must be a value between 1 and 1000.
+ * // If not set, defaults to 50.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any. If
+ * // not set, defaults to an empty string.
+ * pageToken: 'placeholder-value',
+ * // Required. Resource name of the taxonomy to list the policy tags of.
+ * parent: 'projects/my-project/locations/my-location/taxonomies/my-taxonomie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "policyTags": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.policyTags.list
* @memberOf! ()
*
@@ -6094,6 +8879,72 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.policyTags.patch
* @desc Updates a policy tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.policyTags.patch({
+ * // Output only. Resource name of this policy tag, whose format is:
+ * // "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{id}".
+ * name:
+ * 'projects/my-project/locations/my-location/taxonomies/my-taxonomie/policyTags/my-policyTag',
+ * // The update mask applies to the resource. Only display_name, description and
+ * // parent_policy_tag can be updated and thus can be listed in the mask. If
+ * // update_mask is not provided, all allowed fields (i.e. display_name,
+ * // description and parent) will be updated. For more information including the
+ * // `FieldMask` definition, see
+ * // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
+ * // If not set, defaults to all of the fields that are allowed to update.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "childPolicyTags": [],
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name",
+ * // "parentPolicyTag": "my_parentPolicyTag"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "childPolicyTags": [],
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "name": "my_name",
+ * // "parentPolicyTag": "my_parentPolicyTag"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.policyTags.patch
* @memberOf! ()
*
@@ -6184,6 +9035,60 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.policyTags.setIamPolicy
* @desc Sets the IAM policy for a taxonomy or a policy tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.policyTags.setIamPolicy(
+ * {
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/taxonomies/my-taxonomie/policyTags/my-policyTag',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.policyTags.setIamPolicy
* @memberOf! ()
*
@@ -6257,6 +9162,58 @@ export namespace datacatalog_v1beta1 {
/**
* datacatalog.projects.locations.taxonomies.policyTags.testIamPermissions
* @desc Returns the permissions that a caller has on the specified taxonomy or policy tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datacatalog.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datacatalog = google.datacatalog('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datacatalog.projects.locations.taxonomies.policyTags.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/taxonomies/my-taxonomie/policyTags/my-policyTag',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datacatalog.projects.locations.taxonomies.policyTags.testIamPermissions
* @memberOf! ()
*
diff --git a/src/apis/dataflow/v1b3.ts b/src/apis/dataflow/v1b3.ts
index 195c70b97e5..937299b8d71 100644
--- a/src/apis/dataflow/v1b3.ts
+++ b/src/apis/dataflow/v1b3.ts
@@ -3290,6 +3290,53 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.deleteSnapshots
* @desc Deletes a snapshot.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.deleteSnapshots({
+ * // The location that contains this snapshot.
+ * location: 'placeholder-value',
+ * // The ID of the Cloud Platform project that the snapshot belongs to.
+ * projectId: 'placeholder-value',
+ * // The ID of the snapshot.
+ * snapshotId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.deleteSnapshots
* @memberOf! ()
*
@@ -3370,6 +3417,60 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.workerMessages
* @desc Send a worker_message to the service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.workerMessages({
+ * // The project to send the WorkerMessages to.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "location": "my_location",
+ * // "workerMessages": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "workerMessageResponses": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.workerMessages
* @memberOf! ()
*
@@ -3502,6 +3603,68 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.jobs.aggregated
* @desc List the jobs of a project across all regions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.jobs.aggregated({
+ * // The kind of filter to use.
+ * filter: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains this job.
+ * location: 'placeholder-value',
+ * // If there are many jobs, limit response to at most this many.
+ * // The actual number of jobs returned will be the lesser of max_responses
+ * // and an unspecified server-defined limit.
+ * pageSize: 'placeholder-value',
+ * // Set this to the 'next_page_token' field of a previous response
+ * // to request additional results in a long list.
+ * pageToken: 'placeholder-value',
+ * // The project which owns the jobs.
+ * projectId: 'placeholder-value',
+ * // Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "failedLocation": [],
+ * // "jobs": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.jobs.aggregated
* @memberOf! ()
*
@@ -3580,6 +3743,113 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.jobs.create
* @desc Creates a Cloud Dataflow job. To create a job, we recommend using `projects.locations.jobs.create` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.create` is not recommended, as your job will always start in `us-central1`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.jobs.create({
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains this job.
+ * location: 'placeholder-value',
+ * // The ID of the Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // Deprecated. This field is now in the Job message.
+ * replaceJobId: 'placeholder-value',
+ * // The level of information requested in response.
+ * view: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clientRequestId": "my_clientRequestId",
+ * // "createTime": "my_createTime",
+ * // "createdFromSnapshotId": "my_createdFromSnapshotId",
+ * // "currentState": "my_currentState",
+ * // "currentStateTime": "my_currentStateTime",
+ * // "environment": {},
+ * // "executionInfo": {},
+ * // "id": "my_id",
+ * // "jobMetadata": {},
+ * // "labels": {},
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "pipelineDescription": {},
+ * // "projectId": "my_projectId",
+ * // "replaceJobId": "my_replaceJobId",
+ * // "replacedByJobId": "my_replacedByJobId",
+ * // "requestedState": "my_requestedState",
+ * // "stageStates": [],
+ * // "startTime": "my_startTime",
+ * // "steps": [],
+ * // "stepsLocation": "my_stepsLocation",
+ * // "tempFiles": [],
+ * // "transformNameMapping": {},
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientRequestId": "my_clientRequestId",
+ * // "createTime": "my_createTime",
+ * // "createdFromSnapshotId": "my_createdFromSnapshotId",
+ * // "currentState": "my_currentState",
+ * // "currentStateTime": "my_currentStateTime",
+ * // "environment": {},
+ * // "executionInfo": {},
+ * // "id": "my_id",
+ * // "jobMetadata": {},
+ * // "labels": {},
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "pipelineDescription": {},
+ * // "projectId": "my_projectId",
+ * // "replaceJobId": "my_replaceJobId",
+ * // "replacedByJobId": "my_replacedByJobId",
+ * // "requestedState": "my_requestedState",
+ * // "stageStates": [],
+ * // "startTime": "my_startTime",
+ * // "steps": [],
+ * // "stepsLocation": "my_stepsLocation",
+ * // "tempFiles": [],
+ * // "transformNameMapping": {},
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.jobs.create
* @memberOf! ()
*
@@ -3656,6 +3926,82 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.jobs.get
* @desc Gets the state of the specified Cloud Dataflow job. To get the state of a job, we recommend using `projects.locations.jobs.get` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.get` is not recommended, as you can only get the state of jobs that are running in `us-central1`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.jobs.get({
+ * // The job ID.
+ * jobId: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains this job.
+ * location: 'placeholder-value',
+ * // The ID of the Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // The level of information requested in response.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientRequestId": "my_clientRequestId",
+ * // "createTime": "my_createTime",
+ * // "createdFromSnapshotId": "my_createdFromSnapshotId",
+ * // "currentState": "my_currentState",
+ * // "currentStateTime": "my_currentStateTime",
+ * // "environment": {},
+ * // "executionInfo": {},
+ * // "id": "my_id",
+ * // "jobMetadata": {},
+ * // "labels": {},
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "pipelineDescription": {},
+ * // "projectId": "my_projectId",
+ * // "replaceJobId": "my_replaceJobId",
+ * // "replacedByJobId": "my_replacedByJobId",
+ * // "requestedState": "my_requestedState",
+ * // "stageStates": [],
+ * // "startTime": "my_startTime",
+ * // "steps": [],
+ * // "stepsLocation": "my_stepsLocation",
+ * // "tempFiles": [],
+ * // "transformNameMapping": {},
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.jobs.get
* @memberOf! ()
*
@@ -3731,6 +4077,61 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.jobs.getMetrics
* @desc Request the job status. To request the status of a job, we recommend using `projects.locations.jobs.getMetrics` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.getMetrics` is not recommended, as you can only request the status of jobs that are running in `us-central1`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.jobs.getMetrics({
+ * // The job to get messages for.
+ * jobId: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains the job specified by job_id.
+ * location: 'placeholder-value',
+ * // A project id.
+ * projectId: 'placeholder-value',
+ * // Return only metric data that has changed since this time.
+ * // Default is to return all information about all metrics for the job.
+ * startTime: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "metricTime": "my_metricTime",
+ * // "metrics": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.jobs.getMetrics
* @memberOf! ()
*
@@ -3807,6 +4208,68 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.jobs.list
* @desc List the jobs of a project. To list the jobs of a project in a region, we recommend using `projects.locations.jobs.get` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To list the all jobs across all regions, use `projects.jobs.aggregated`. Using `projects.jobs.list` is not recommended, as you can only get the list of jobs that are running in `us-central1`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.jobs.list({
+ * // The kind of filter to use.
+ * filter: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains this job.
+ * location: 'placeholder-value',
+ * // If there are many jobs, limit response to at most this many.
+ * // The actual number of jobs returned will be the lesser of max_responses
+ * // and an unspecified server-defined limit.
+ * pageSize: 'placeholder-value',
+ * // Set this to the 'next_page_token' field of a previous response
+ * // to request additional results in a long list.
+ * pageToken: 'placeholder-value',
+ * // The project which owns the jobs.
+ * projectId: 'placeholder-value',
+ * // Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "failedLocation": [],
+ * // "jobs": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.jobs.list
* @memberOf! ()
*
@@ -3886,6 +4349,72 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.jobs.snapshot
* @desc Snapshot the state of a streaming job.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.jobs.snapshot({
+ * // The job to be snapshotted.
+ * jobId: 'placeholder-value',
+ * // The project which owns the job to be snapshotted.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "location": "my_location",
+ * // "snapshotSources": false,
+ * // "ttl": "my_ttl"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "diskSizeBytes": "my_diskSizeBytes",
+ * // "id": "my_id",
+ * // "projectId": "my_projectId",
+ * // "pubsubMetadata": [],
+ * // "sourceJobId": "my_sourceJobId",
+ * // "state": "my_state",
+ * // "ttl": "my_ttl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.jobs.snapshot
* @memberOf! ()
*
@@ -3959,6 +4488,111 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.jobs.update
* @desc Updates the state of an existing Cloud Dataflow job. To update the state of an existing job, we recommend using `projects.locations.jobs.update` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.update` is not recommended, as you can only update the state of jobs that are running in `us-central1`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.jobs.update({
+ * // The job ID.
+ * jobId: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains this job.
+ * location: 'placeholder-value',
+ * // The ID of the Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clientRequestId": "my_clientRequestId",
+ * // "createTime": "my_createTime",
+ * // "createdFromSnapshotId": "my_createdFromSnapshotId",
+ * // "currentState": "my_currentState",
+ * // "currentStateTime": "my_currentStateTime",
+ * // "environment": {},
+ * // "executionInfo": {},
+ * // "id": "my_id",
+ * // "jobMetadata": {},
+ * // "labels": {},
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "pipelineDescription": {},
+ * // "projectId": "my_projectId",
+ * // "replaceJobId": "my_replaceJobId",
+ * // "replacedByJobId": "my_replacedByJobId",
+ * // "requestedState": "my_requestedState",
+ * // "stageStates": [],
+ * // "startTime": "my_startTime",
+ * // "steps": [],
+ * // "stepsLocation": "my_stepsLocation",
+ * // "tempFiles": [],
+ * // "transformNameMapping": {},
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientRequestId": "my_clientRequestId",
+ * // "createTime": "my_createTime",
+ * // "createdFromSnapshotId": "my_createdFromSnapshotId",
+ * // "currentState": "my_currentState",
+ * // "currentStateTime": "my_currentStateTime",
+ * // "environment": {},
+ * // "executionInfo": {},
+ * // "id": "my_id",
+ * // "jobMetadata": {},
+ * // "labels": {},
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "pipelineDescription": {},
+ * // "projectId": "my_projectId",
+ * // "replaceJobId": "my_replaceJobId",
+ * // "replacedByJobId": "my_replacedByJobId",
+ * // "requestedState": "my_requestedState",
+ * // "stageStates": [],
+ * // "startTime": "my_startTime",
+ * // "steps": [],
+ * // "stepsLocation": "my_stepsLocation",
+ * // "tempFiles": [],
+ * // "transformNameMapping": {},
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.jobs.update
* @memberOf! ()
*
@@ -4229,6 +4863,63 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.jobs.debug.getConfig
* @desc Get encoded debug configuration for component. Not cacheable.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.jobs.debug.getConfig({
+ * // The job id.
+ * jobId: 'placeholder-value',
+ * // The project id.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "componentId": "my_componentId",
+ * // "location": "my_location",
+ * // "workerId": "my_workerId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "config": "my_config"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.jobs.debug.getConfig
* @memberOf! ()
*
@@ -4309,6 +5000,62 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.jobs.debug.sendCapture
* @desc Send encoded debug capture data for component.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.jobs.debug.sendCapture({
+ * // The job id.
+ * jobId: 'placeholder-value',
+ * // The project id.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "componentId": "my_componentId",
+ * // "data": "my_data",
+ * // "location": "my_location",
+ * // "workerId": "my_workerId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.jobs.debug.sendCapture
* @memberOf! ()
*
@@ -4439,6 +5186,75 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.jobs.messages.list
* @desc Request the job status. To request the status of a job, we recommend using `projects.locations.jobs.messages.list` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.messages.list` is not recommended, as you can only request the status of jobs that are running in `us-central1`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.jobs.messages.list({
+ * // Return only messages with timestamps < end_time. The default is now
+ * // (i.e. return up to the latest messages available).
+ * endTime: 'placeholder-value',
+ * // The job to get messages about.
+ * jobId: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains the job specified by job_id.
+ * location: 'placeholder-value',
+ * // Filter to only get messages with importance >= level
+ * minimumImportance: 'placeholder-value',
+ * // If specified, determines the maximum number of messages to
+ * // return. If unspecified, the service may choose an appropriate
+ * // default, or may return an arbitrarily large number of results.
+ * pageSize: 'placeholder-value',
+ * // If supplied, this should be the value of next_page_token returned
+ * // by an earlier call. This will cause the next page of results to
+ * // be returned.
+ * pageToken: 'placeholder-value',
+ * // A project id.
+ * projectId: 'placeholder-value',
+ * // If specified, return only messages with timestamps >= start_time.
+ * // The default is the job creation time (i.e. beginning of messages).
+ * startTime: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoscalingEvents": [],
+ * // "jobMessages": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.jobs.messages.list
* @memberOf! ()
*
@@ -4569,6 +5385,68 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.jobs.workItems.lease
* @desc Leases a dataflow WorkItem to run.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.jobs.workItems.lease({
+ * // Identifies the workflow job this worker belongs to.
+ * jobId: 'placeholder-value',
+ * // Identifies the project this worker belongs to.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "currentWorkerTime": "my_currentWorkerTime",
+ * // "location": "my_location",
+ * // "requestedLeaseDuration": "my_requestedLeaseDuration",
+ * // "unifiedWorkerRequest": {},
+ * // "workItemTypes": [],
+ * // "workerCapabilities": [],
+ * // "workerId": "my_workerId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "unifiedWorkerResponse": {},
+ * // "workItems": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.jobs.workItems.lease
* @memberOf! ()
*
@@ -4647,6 +5525,66 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.jobs.workItems.reportStatus
* @desc Reports the status of dataflow WorkItems leased by a worker.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.jobs.workItems.reportStatus({
+ * // The job which the WorkItem is part of.
+ * jobId: 'placeholder-value',
+ * // The project which owns the WorkItem's job.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "currentWorkerTime": "my_currentWorkerTime",
+ * // "location": "my_location",
+ * // "unifiedWorkerRequest": {},
+ * // "workItemStatuses": [],
+ * // "workerId": "my_workerId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "unifiedWorkerResponse": {},
+ * // "workItemServiceStates": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.jobs.workItems.reportStatus
* @memberOf! ()
*
@@ -4794,6 +5732,64 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.workerMessages
* @desc Send a worker_message to the service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.workerMessages({
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains the job.
+ * location: 'placeholder-value',
+ * // The project to send the WorkerMessages to.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "location": "my_location",
+ * // "workerMessages": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "workerMessageResponses": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.workerMessages
* @memberOf! ()
*
@@ -4906,6 +5902,64 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.flexTemplates.launch
* @desc Launch a job with a FlexTemplate.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.flexTemplates.launch({
+ * // Required. The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to
+ * // which to direct the request. E.g., us-central1, us-west1.
+ * location: 'placeholder-value',
+ * // Required. The ID of the Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "launchParameter": {},
+ * // "validateOnly": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "job": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.flexTemplates.launch
* @memberOf! ()
*
@@ -5032,6 +6086,113 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.jobs.create
* @desc Creates a Cloud Dataflow job. To create a job, we recommend using `projects.locations.jobs.create` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.create` is not recommended, as your job will always start in `us-central1`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.jobs.create({
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains this job.
+ * location: 'placeholder-value',
+ * // The ID of the Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // Deprecated. This field is now in the Job message.
+ * replaceJobId: 'placeholder-value',
+ * // The level of information requested in response.
+ * view: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clientRequestId": "my_clientRequestId",
+ * // "createTime": "my_createTime",
+ * // "createdFromSnapshotId": "my_createdFromSnapshotId",
+ * // "currentState": "my_currentState",
+ * // "currentStateTime": "my_currentStateTime",
+ * // "environment": {},
+ * // "executionInfo": {},
+ * // "id": "my_id",
+ * // "jobMetadata": {},
+ * // "labels": {},
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "pipelineDescription": {},
+ * // "projectId": "my_projectId",
+ * // "replaceJobId": "my_replaceJobId",
+ * // "replacedByJobId": "my_replacedByJobId",
+ * // "requestedState": "my_requestedState",
+ * // "stageStates": [],
+ * // "startTime": "my_startTime",
+ * // "steps": [],
+ * // "stepsLocation": "my_stepsLocation",
+ * // "tempFiles": [],
+ * // "transformNameMapping": {},
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientRequestId": "my_clientRequestId",
+ * // "createTime": "my_createTime",
+ * // "createdFromSnapshotId": "my_createdFromSnapshotId",
+ * // "currentState": "my_currentState",
+ * // "currentStateTime": "my_currentStateTime",
+ * // "environment": {},
+ * // "executionInfo": {},
+ * // "id": "my_id",
+ * // "jobMetadata": {},
+ * // "labels": {},
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "pipelineDescription": {},
+ * // "projectId": "my_projectId",
+ * // "replaceJobId": "my_replaceJobId",
+ * // "replacedByJobId": "my_replacedByJobId",
+ * // "requestedState": "my_requestedState",
+ * // "stageStates": [],
+ * // "startTime": "my_startTime",
+ * // "steps": [],
+ * // "stepsLocation": "my_stepsLocation",
+ * // "tempFiles": [],
+ * // "transformNameMapping": {},
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.jobs.create
* @memberOf! ()
*
@@ -5107,6 +6268,82 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.jobs.get
* @desc Gets the state of the specified Cloud Dataflow job. To get the state of a job, we recommend using `projects.locations.jobs.get` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.get` is not recommended, as you can only get the state of jobs that are running in `us-central1`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.jobs.get({
+ * // The job ID.
+ * jobId: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains this job.
+ * location: 'placeholder-value',
+ * // The ID of the Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // The level of information requested in response.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientRequestId": "my_clientRequestId",
+ * // "createTime": "my_createTime",
+ * // "createdFromSnapshotId": "my_createdFromSnapshotId",
+ * // "currentState": "my_currentState",
+ * // "currentStateTime": "my_currentStateTime",
+ * // "environment": {},
+ * // "executionInfo": {},
+ * // "id": "my_id",
+ * // "jobMetadata": {},
+ * // "labels": {},
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "pipelineDescription": {},
+ * // "projectId": "my_projectId",
+ * // "replaceJobId": "my_replaceJobId",
+ * // "replacedByJobId": "my_replacedByJobId",
+ * // "requestedState": "my_requestedState",
+ * // "stageStates": [],
+ * // "startTime": "my_startTime",
+ * // "steps": [],
+ * // "stepsLocation": "my_stepsLocation",
+ * // "tempFiles": [],
+ * // "transformNameMapping": {},
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.jobs.get
* @memberOf! ()
*
@@ -5182,6 +6419,61 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.jobs.getMetrics
* @desc Request the job status. To request the status of a job, we recommend using `projects.locations.jobs.getMetrics` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.getMetrics` is not recommended, as you can only request the status of jobs that are running in `us-central1`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.jobs.getMetrics({
+ * // The job to get messages for.
+ * jobId: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains the job specified by job_id.
+ * location: 'placeholder-value',
+ * // A project id.
+ * projectId: 'placeholder-value',
+ * // Return only metric data that has changed since this time.
+ * // Default is to return all information about all metrics for the job.
+ * startTime: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "metricTime": "my_metricTime",
+ * // "metrics": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.jobs.getMetrics
* @memberOf! ()
*
@@ -5259,6 +6551,68 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.jobs.list
* @desc List the jobs of a project. To list the jobs of a project in a region, we recommend using `projects.locations.jobs.get` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To list the all jobs across all regions, use `projects.jobs.aggregated`. Using `projects.jobs.list` is not recommended, as you can only get the list of jobs that are running in `us-central1`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.jobs.list({
+ * // The kind of filter to use.
+ * filter: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains this job.
+ * location: 'placeholder-value',
+ * // If there are many jobs, limit response to at most this many.
+ * // The actual number of jobs returned will be the lesser of max_responses
+ * // and an unspecified server-defined limit.
+ * pageSize: 'placeholder-value',
+ * // Set this to the 'next_page_token' field of a previous response
+ * // to request additional results in a long list.
+ * pageToken: 'placeholder-value',
+ * // The project which owns the jobs.
+ * projectId: 'placeholder-value',
+ * // Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "failedLocation": [],
+ * // "jobs": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.jobs.list
* @memberOf! ()
*
@@ -5337,6 +6691,74 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.jobs.snapshot
* @desc Snapshot the state of a streaming job.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.jobs.snapshot({
+ * // The job to be snapshotted.
+ * jobId: 'placeholder-value',
+ * // The location that contains this job.
+ * location: 'placeholder-value',
+ * // The project which owns the job to be snapshotted.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "location": "my_location",
+ * // "snapshotSources": false,
+ * // "ttl": "my_ttl"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "diskSizeBytes": "my_diskSizeBytes",
+ * // "id": "my_id",
+ * // "projectId": "my_projectId",
+ * // "pubsubMetadata": [],
+ * // "sourceJobId": "my_sourceJobId",
+ * // "state": "my_state",
+ * // "ttl": "my_ttl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.jobs.snapshot
* @memberOf! ()
*
@@ -5412,6 +6834,111 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.jobs.update
* @desc Updates the state of an existing Cloud Dataflow job. To update the state of an existing job, we recommend using `projects.locations.jobs.update` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.update` is not recommended, as you can only update the state of jobs that are running in `us-central1`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.jobs.update({
+ * // The job ID.
+ * jobId: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains this job.
+ * location: 'placeholder-value',
+ * // The ID of the Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clientRequestId": "my_clientRequestId",
+ * // "createTime": "my_createTime",
+ * // "createdFromSnapshotId": "my_createdFromSnapshotId",
+ * // "currentState": "my_currentState",
+ * // "currentStateTime": "my_currentStateTime",
+ * // "environment": {},
+ * // "executionInfo": {},
+ * // "id": "my_id",
+ * // "jobMetadata": {},
+ * // "labels": {},
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "pipelineDescription": {},
+ * // "projectId": "my_projectId",
+ * // "replaceJobId": "my_replaceJobId",
+ * // "replacedByJobId": "my_replacedByJobId",
+ * // "requestedState": "my_requestedState",
+ * // "stageStates": [],
+ * // "startTime": "my_startTime",
+ * // "steps": [],
+ * // "stepsLocation": "my_stepsLocation",
+ * // "tempFiles": [],
+ * // "transformNameMapping": {},
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientRequestId": "my_clientRequestId",
+ * // "createTime": "my_createTime",
+ * // "createdFromSnapshotId": "my_createdFromSnapshotId",
+ * // "currentState": "my_currentState",
+ * // "currentStateTime": "my_currentStateTime",
+ * // "environment": {},
+ * // "executionInfo": {},
+ * // "id": "my_id",
+ * // "jobMetadata": {},
+ * // "labels": {},
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "pipelineDescription": {},
+ * // "projectId": "my_projectId",
+ * // "replaceJobId": "my_replaceJobId",
+ * // "replacedByJobId": "my_replacedByJobId",
+ * // "requestedState": "my_requestedState",
+ * // "stageStates": [],
+ * // "startTime": "my_startTime",
+ * // "steps": [],
+ * // "stepsLocation": "my_stepsLocation",
+ * // "tempFiles": [],
+ * // "transformNameMapping": {},
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.jobs.update
* @memberOf! ()
*
@@ -5654,6 +7181,67 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.jobs.debug.getConfig
* @desc Get encoded debug configuration for component. Not cacheable.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.jobs.debug.getConfig({
+ * // The job id.
+ * jobId: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains the job specified by job_id.
+ * location: 'placeholder-value',
+ * // The project id.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "componentId": "my_componentId",
+ * // "location": "my_location",
+ * // "workerId": "my_workerId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "config": "my_config"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.jobs.debug.getConfig
* @memberOf! ()
*
@@ -5735,6 +7323,66 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.jobs.debug.sendCapture
* @desc Send encoded debug capture data for component.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.jobs.debug.sendCapture({
+ * // The job id.
+ * jobId: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains the job specified by job_id.
+ * location: 'placeholder-value',
+ * // The project id.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "componentId": "my_componentId",
+ * // "data": "my_data",
+ * // "location": "my_location",
+ * // "workerId": "my_workerId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.jobs.debug.sendCapture
* @memberOf! ()
*
@@ -5874,6 +7522,75 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.jobs.messages.list
* @desc Request the job status. To request the status of a job, we recommend using `projects.locations.jobs.messages.list` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.messages.list` is not recommended, as you can only request the status of jobs that are running in `us-central1`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.jobs.messages.list({
+ * // Return only messages with timestamps < end_time. The default is now
+ * // (i.e. return up to the latest messages available).
+ * endTime: 'placeholder-value',
+ * // The job to get messages about.
+ * jobId: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains the job specified by job_id.
+ * location: 'placeholder-value',
+ * // Filter to only get messages with importance >= level
+ * minimumImportance: 'placeholder-value',
+ * // If specified, determines the maximum number of messages to
+ * // return. If unspecified, the service may choose an appropriate
+ * // default, or may return an arbitrarily large number of results.
+ * pageSize: 'placeholder-value',
+ * // If supplied, this should be the value of next_page_token returned
+ * // by an earlier call. This will cause the next page of results to
+ * // be returned.
+ * pageToken: 'placeholder-value',
+ * // A project id.
+ * projectId: 'placeholder-value',
+ * // If specified, return only messages with timestamps >= start_time.
+ * // The default is the job creation time (i.e. beginning of messages).
+ * startTime: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoscalingEvents": [],
+ * // "jobMessages": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.jobs.messages.list
* @memberOf! ()
*
@@ -6005,6 +7722,55 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.jobs.snapshots.list
* @desc Lists snapshots.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.jobs.snapshots.list({
+ * // If specified, list snapshots created from this job.
+ * jobId: 'placeholder-value',
+ * // The location to list snapshots in.
+ * location: 'placeholder-value',
+ * // The project ID to list snapshots for.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "snapshots": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.jobs.snapshots.list
* @memberOf! ()
*
@@ -6111,6 +7877,72 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.jobs.workItems.lease
* @desc Leases a dataflow WorkItem to run.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.jobs.workItems.lease({
+ * // Identifies the workflow job this worker belongs to.
+ * jobId: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains the WorkItem's job.
+ * location: 'placeholder-value',
+ * // Identifies the project this worker belongs to.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "currentWorkerTime": "my_currentWorkerTime",
+ * // "location": "my_location",
+ * // "requestedLeaseDuration": "my_requestedLeaseDuration",
+ * // "unifiedWorkerRequest": {},
+ * // "workItemTypes": [],
+ * // "workerCapabilities": [],
+ * // "workerId": "my_workerId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "unifiedWorkerResponse": {},
+ * // "workItems": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.jobs.workItems.lease
* @memberOf! ()
*
@@ -6190,6 +8022,70 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.jobs.workItems.reportStatus
* @desc Reports the status of dataflow WorkItems leased by a worker.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.jobs.workItems.reportStatus({
+ * // The job which the WorkItem is part of.
+ * jobId: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
+ * // contains the WorkItem's job.
+ * location: 'placeholder-value',
+ * // The project which owns the WorkItem's job.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "currentWorkerTime": "my_currentWorkerTime",
+ * // "location": "my_location",
+ * // "unifiedWorkerRequest": {},
+ * // "workItemStatuses": [],
+ * // "workerId": "my_workerId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "unifiedWorkerResponse": {},
+ * // "workItemServiceStates": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.jobs.workItems.reportStatus
* @memberOf! ()
*
@@ -6334,6 +8230,53 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.snapshots.delete
* @desc Deletes a snapshot.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.snapshots.delete({
+ * // The location that contains this snapshot.
+ * location: 'placeholder-value',
+ * // The ID of the Cloud Platform project that the snapshot belongs to.
+ * projectId: 'placeholder-value',
+ * // The ID of the snapshot.
+ * snapshotId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.snapshots.delete
* @memberOf! ()
*
@@ -6412,6 +8355,63 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.snapshots.get
* @desc Gets information about a snapshot.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.snapshots.get({
+ * // The location that contains this snapshot.
+ * location: 'placeholder-value',
+ * // The ID of the Cloud Platform project that the snapshot belongs to.
+ * projectId: 'placeholder-value',
+ * // The ID of the snapshot.
+ * snapshotId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "diskSizeBytes": "my_diskSizeBytes",
+ * // "id": "my_id",
+ * // "projectId": "my_projectId",
+ * // "pubsubMetadata": [],
+ * // "sourceJobId": "my_sourceJobId",
+ * // "state": "my_state",
+ * // "ttl": "my_ttl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.snapshots.get
* @memberOf! ()
*
@@ -6486,6 +8486,55 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.snapshots.list
* @desc Lists snapshots.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.snapshots.list({
+ * // If specified, list snapshots created from this job.
+ * jobId: 'placeholder-value',
+ * // The location to list snapshots in.
+ * location: 'placeholder-value',
+ * // The project ID to list snapshots for.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "snapshots": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.snapshots.list
* @memberOf! ()
*
@@ -6632,6 +8681,55 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.sql.validate
* @desc Validates a GoogleSQL query for Cloud Dataflow syntax. Will always confirm the given query parses correctly, and if able to look up schema information from DataCatalog, will validate that the query analyzes properly as well.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.sql.validate({
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to
+ * // which to direct the request.
+ * location: 'placeholder-value',
+ * // Required. The ID of the Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // The sql query to validate.
+ * query: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "errorMessage": "my_errorMessage"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.sql.validate
* @memberOf! ()
*
@@ -6736,6 +8834,90 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.templates.create
* @desc Creates a Cloud Dataflow job from a template.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.templates.create({
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to
+ * // which to direct the request.
+ * location: 'placeholder-value',
+ * // Required. The ID of the Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "environment": {},
+ * // "gcsPath": "my_gcsPath",
+ * // "jobName": "my_jobName",
+ * // "location": "my_location",
+ * // "parameters": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientRequestId": "my_clientRequestId",
+ * // "createTime": "my_createTime",
+ * // "createdFromSnapshotId": "my_createdFromSnapshotId",
+ * // "currentState": "my_currentState",
+ * // "currentStateTime": "my_currentStateTime",
+ * // "environment": {},
+ * // "executionInfo": {},
+ * // "id": "my_id",
+ * // "jobMetadata": {},
+ * // "labels": {},
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "pipelineDescription": {},
+ * // "projectId": "my_projectId",
+ * // "replaceJobId": "my_replaceJobId",
+ * // "replacedByJobId": "my_replacedByJobId",
+ * // "requestedState": "my_requestedState",
+ * // "stageStates": [],
+ * // "startTime": "my_startTime",
+ * // "steps": [],
+ * // "stepsLocation": "my_stepsLocation",
+ * // "tempFiles": [],
+ * // "transformNameMapping": {},
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.templates.create
* @memberOf! ()
*
@@ -6810,6 +8992,64 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.templates.get
* @desc Get the template associated with a template.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.templates.get({
+ * // Required. A Cloud Storage path to the template from which to
+ * // create the job.
+ * // Must be valid Cloud Storage URL, beginning with 'gs://'.
+ * gcsPath: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to
+ * // which to direct the request.
+ * location: 'placeholder-value',
+ * // Required. The ID of the Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // The view to retrieve. Defaults to METADATA_ONLY.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "metadata": {},
+ * // "runtimeMetadata": {},
+ * // "status": {},
+ * // "templateType": "my_templateType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.templates.get
* @memberOf! ()
*
@@ -6887,6 +9127,80 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.locations.templates.launch
* @desc Launch a template.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.locations.templates.launch({
+ * // Path to dynamic template spec file on GCS.
+ * // The file must be a Json serialized DynamicTemplateFieSpec object.
+ * 'dynamicTemplate.gcsPath': 'placeholder-value',
+ * // Cloud Storage path for staging dependencies.
+ * // Must be a valid Cloud Storage URL, beginning with `gs://`.
+ * 'dynamicTemplate.stagingLocation': 'placeholder-value',
+ * // A Cloud Storage path to the template from which to create
+ * // the job.
+ * // Must be valid Cloud Storage URL, beginning with 'gs://'.
+ * gcsPath: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to
+ * // which to direct the request.
+ * location: 'placeholder-value',
+ * // Required. The ID of the Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // If true, the request is validated but not actually executed.
+ * // Defaults to false.
+ * validateOnly: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "environment": {},
+ * // "jobName": "my_jobName",
+ * // "parameters": {},
+ * // "transformNameMapping": {},
+ * // "update": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "job": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.locations.templates.launch
* @memberOf! ()
*
@@ -7059,6 +9373,63 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.snapshots.get
* @desc Gets information about a snapshot.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.snapshots.get({
+ * // The location that contains this snapshot.
+ * location: 'placeholder-value',
+ * // The ID of the Cloud Platform project that the snapshot belongs to.
+ * projectId: 'placeholder-value',
+ * // The ID of the snapshot.
+ * snapshotId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creationTime": "my_creationTime",
+ * // "description": "my_description",
+ * // "diskSizeBytes": "my_diskSizeBytes",
+ * // "id": "my_id",
+ * // "projectId": "my_projectId",
+ * // "pubsubMetadata": [],
+ * // "sourceJobId": "my_sourceJobId",
+ * // "state": "my_state",
+ * // "ttl": "my_ttl"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.snapshots.get
* @memberOf! ()
*
@@ -7132,6 +9503,55 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.snapshots.list
* @desc Lists snapshots.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.snapshots.list({
+ * // If specified, list snapshots created from this job.
+ * jobId: 'placeholder-value',
+ * // The location to list snapshots in.
+ * location: 'placeholder-value',
+ * // The project ID to list snapshots for.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "snapshots": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.snapshots.list
* @memberOf! ()
*
@@ -7258,6 +9678,86 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.templates.create
* @desc Creates a Cloud Dataflow job from a template.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.templates.create({
+ * // Required. The ID of the Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "environment": {},
+ * // "gcsPath": "my_gcsPath",
+ * // "jobName": "my_jobName",
+ * // "location": "my_location",
+ * // "parameters": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientRequestId": "my_clientRequestId",
+ * // "createTime": "my_createTime",
+ * // "createdFromSnapshotId": "my_createdFromSnapshotId",
+ * // "currentState": "my_currentState",
+ * // "currentStateTime": "my_currentStateTime",
+ * // "environment": {},
+ * // "executionInfo": {},
+ * // "id": "my_id",
+ * // "jobMetadata": {},
+ * // "labels": {},
+ * // "location": "my_location",
+ * // "name": "my_name",
+ * // "pipelineDescription": {},
+ * // "projectId": "my_projectId",
+ * // "replaceJobId": "my_replaceJobId",
+ * // "replacedByJobId": "my_replacedByJobId",
+ * // "requestedState": "my_requestedState",
+ * // "stageStates": [],
+ * // "startTime": "my_startTime",
+ * // "steps": [],
+ * // "stepsLocation": "my_stepsLocation",
+ * // "tempFiles": [],
+ * // "transformNameMapping": {},
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.templates.create
* @memberOf! ()
*
@@ -7331,6 +9831,64 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.templates.get
* @desc Get the template associated with a template.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.templates.get({
+ * // Required. A Cloud Storage path to the template from which to
+ * // create the job.
+ * // Must be valid Cloud Storage URL, beginning with 'gs://'.
+ * gcsPath: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to
+ * // which to direct the request.
+ * location: 'placeholder-value',
+ * // Required. The ID of the Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // The view to retrieve. Defaults to METADATA_ONLY.
+ * view: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "metadata": {},
+ * // "runtimeMetadata": {},
+ * // "status": {},
+ * // "templateType": "my_templateType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.templates.get
* @memberOf! ()
*
@@ -7408,6 +9966,80 @@ export namespace dataflow_v1b3 {
/**
* dataflow.projects.templates.launch
* @desc Launch a template.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataflow = google.dataflow('v1b3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/compute',
+ * 'https://www.googleapis.com/auth/compute.readonly',
+ * 'https://www.googleapis.com/auth/userinfo.email',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataflow.projects.templates.launch({
+ * // Path to dynamic template spec file on GCS.
+ * // The file must be a Json serialized DynamicTemplateFieSpec object.
+ * 'dynamicTemplate.gcsPath': 'placeholder-value',
+ * // Cloud Storage path for staging dependencies.
+ * // Must be a valid Cloud Storage URL, beginning with `gs://`.
+ * 'dynamicTemplate.stagingLocation': 'placeholder-value',
+ * // A Cloud Storage path to the template from which to create
+ * // the job.
+ * // Must be valid Cloud Storage URL, beginning with 'gs://'.
+ * gcsPath: 'placeholder-value',
+ * // The [regional endpoint]
+ * // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to
+ * // which to direct the request.
+ * location: 'placeholder-value',
+ * // Required. The ID of the Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // If true, the request is validated but not actually executed.
+ * // Defaults to false.
+ * validateOnly: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "environment": {},
+ * // "jobName": "my_jobName",
+ * // "parameters": {},
+ * // "transformNameMapping": {},
+ * // "update": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "job": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataflow.projects.templates.launch
* @memberOf! ()
*
diff --git a/src/apis/datafusion/v1beta1.ts b/src/apis/datafusion/v1beta1.ts
index 5b296a4fc3a..bb8ac52c21b 100644
--- a/src/apis/datafusion/v1beta1.ts
+++ b/src/apis/datafusion/v1beta1.ts
@@ -537,6 +537,50 @@ export namespace datafusion_v1beta1 {
/**
* datafusion.projects.locations.get
* @desc Gets information about a location.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datafusion.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datafusion = google.datafusion('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datafusion.projects.locations.get({
+ * // Resource name for the location.
+ * name: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "labels": {},
+ * // "locationId": "my_locationId",
+ * // "metadata": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datafusion.projects.locations.get
* @memberOf! ()
*
@@ -606,6 +650,56 @@ export namespace datafusion_v1beta1 {
/**
* datafusion.projects.locations.list
* @desc Lists information about the supported locations for this service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datafusion.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datafusion = google.datafusion('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datafusion.projects.locations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // If true, the returned list will include locations which are not yet
+ * // revealed.
+ * includeUnrevealedLocations: 'placeholder-value',
+ * // The resource that owns the locations collection, if applicable.
+ * name: 'projects/my-project',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "locations": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datafusion.projects.locations.list
* @memberOf! ()
*
@@ -734,6 +828,82 @@ export namespace datafusion_v1beta1 {
/**
* datafusion.projects.locations.instances.create
* @desc Creates a new Data Fusion instance in the specified project and location.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datafusion.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datafusion = google.datafusion('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datafusion.projects.locations.instances.create({
+ * // The name of the instance to create.
+ * instanceId: 'placeholder-value',
+ * // The instance's project and location in the format
+ * // projects/{project}/locations/{location}.
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accelerators": [],
+ * // "apiEndpoint": "my_apiEndpoint",
+ * // "availableVersion": [],
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "enableStackdriverLogging": false,
+ * // "enableStackdriverMonitoring": false,
+ * // "gcsBucket": "my_gcsBucket",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "networkConfig": {},
+ * // "options": {},
+ * // "privateInstance": false,
+ * // "serviceAccount": "my_serviceAccount",
+ * // "serviceEndpoint": "my_serviceEndpoint",
+ * // "state": "my_state",
+ * // "stateMessage": "my_stateMessage",
+ * // "type": "my_type",
+ * // "updateTime": "my_updateTime",
+ * // "version": "my_version",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datafusion.projects.locations.instances.create
* @memberOf! ()
*
@@ -810,6 +980,51 @@ export namespace datafusion_v1beta1 {
/**
* datafusion.projects.locations.instances.delete
* @desc Deletes a single Date Fusion instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datafusion.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datafusion = google.datafusion('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datafusion.projects.locations.instances.delete({
+ * // The instance resource name in the format
+ * // projects/{project}/locations/{location}/instances/{instance}
+ * name: 'projects/my-project/locations/my-location/instances/my-instance',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datafusion.projects.locations.instances.delete
* @memberOf! ()
*
@@ -881,6 +1096,68 @@ export namespace datafusion_v1beta1 {
/**
* datafusion.projects.locations.instances.get
* @desc Gets details of a single Data Fusion instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datafusion.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datafusion = google.datafusion('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datafusion.projects.locations.instances.get({
+ * // The instance resource name in the format
+ * // projects/{project}/locations/{location}/instances/{instance}.
+ * name: 'projects/my-project/locations/my-location/instances/my-instance',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accelerators": [],
+ * // "apiEndpoint": "my_apiEndpoint",
+ * // "availableVersion": [],
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "enableStackdriverLogging": false,
+ * // "enableStackdriverMonitoring": false,
+ * // "gcsBucket": "my_gcsBucket",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "networkConfig": {},
+ * // "options": {},
+ * // "privateInstance": false,
+ * // "serviceAccount": "my_serviceAccount",
+ * // "serviceEndpoint": "my_serviceEndpoint",
+ * // "state": "my_state",
+ * // "stateMessage": "my_stateMessage",
+ * // "type": "my_type",
+ * // "updateTime": "my_updateTime",
+ * // "version": "my_version",
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datafusion.projects.locations.instances.get
* @memberOf! ()
*
@@ -950,6 +1227,59 @@ export namespace datafusion_v1beta1 {
/**
* datafusion.projects.locations.instances.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datafusion.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datafusion = google.datafusion('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datafusion.projects.locations.instances.getIamPolicy({
+ * // Optional. The policy format version to be returned.
+ * //
+ * // Valid values are 0, 1, and 3. Requests specifying an invalid value will be
+ * // rejected.
+ * //
+ * // Requests for policies with any conditional bindings must specify version 3.
+ * // Policies without any conditional bindings may specify any valid value or
+ * // leave the field unset.
+ * 'options.requestedPolicyVersion': 'placeholder-value',
+ * // REQUIRED: The resource for which the policy is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/locations/my-location/instances/my-instance',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datafusion.projects.locations.instances.getIamPolicy
* @memberOf! ()
*
@@ -1023,6 +1353,60 @@ export namespace datafusion_v1beta1 {
/**
* datafusion.projects.locations.instances.list
* @desc Lists Data Fusion instances in the specified project and location.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datafusion.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datafusion = google.datafusion('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datafusion.projects.locations.instances.list({
+ * // List filter.
+ * filter: 'placeholder-value',
+ * // Sort results. Supported values are "name", "name desc", or "" (unsorted).
+ * orderBy: 'placeholder-value',
+ * // The maximum number of items to return.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value to use if there are additional
+ * // results to retrieve for this list request.
+ * pageToken: 'placeholder-value',
+ * // The project and location for which to retrieve instance information
+ * // in the format projects/{project}/locations/{location}. If the location is
+ * // specified as '-' (wildcard), then all regions available to the project
+ * // are queried, and the results are aggregated.
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "instances": [],
+ * // "nextPageToken": "my_nextPageToken",
+ * // "unreachable": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datafusion.projects.locations.instances.list
* @memberOf! ()
*
@@ -1103,6 +1487,87 @@ export namespace datafusion_v1beta1 {
/**
* datafusion.projects.locations.instances.patch
* @desc Updates a single Data Fusion instance.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datafusion.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datafusion = google.datafusion('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datafusion.projects.locations.instances.patch({
+ * // Output only. The name of this instance is in the form of
+ * // projects/{project}/locations/{location}/instances/{instance}.
+ * name: 'projects/my-project/locations/my-location/instances/my-instance',
+ * // Field mask is used to specify the fields that the update will overwrite
+ * // in an instance resource. The fields specified in the update_mask are
+ * // relative to the resource, not the full request.
+ * // A field will be overwritten if it is in the mask.
+ * // If the user does not provide a mask, all the supported fields (labels and
+ * // options currently) will be overwritten.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accelerators": [],
+ * // "apiEndpoint": "my_apiEndpoint",
+ * // "availableVersion": [],
+ * // "createTime": "my_createTime",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "enableStackdriverLogging": false,
+ * // "enableStackdriverMonitoring": false,
+ * // "gcsBucket": "my_gcsBucket",
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "networkConfig": {},
+ * // "options": {},
+ * // "privateInstance": false,
+ * // "serviceAccount": "my_serviceAccount",
+ * // "serviceEndpoint": "my_serviceEndpoint",
+ * // "state": "my_state",
+ * // "stateMessage": "my_stateMessage",
+ * // "type": "my_type",
+ * // "updateTime": "my_updateTime",
+ * // "version": "my_version",
+ * // "zone": "my_zone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datafusion.projects.locations.instances.patch
* @memberOf! ()
*
@@ -1176,6 +1641,57 @@ export namespace datafusion_v1beta1 {
/**
* datafusion.projects.locations.instances.restart
* @desc Restart a single Data Fusion instance. At the end of an operation instance is fully restarted.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datafusion.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datafusion = google.datafusion('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datafusion.projects.locations.instances.restart({
+ * // Name of the Data Fusion instance which need to be restarted in the form of
+ * // projects/{project}/locations/{location}/instances/{instance}
+ * name: 'projects/my-project/locations/my-location/instances/my-instance',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datafusion.projects.locations.instances.restart
* @memberOf! ()
*
@@ -1251,6 +1767,59 @@ export namespace datafusion_v1beta1 {
/**
* datafusion.projects.locations.instances.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy. Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datafusion.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datafusion = google.datafusion('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datafusion.projects.locations.instances.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/locations/my-location/instances/my-instance',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {},
+ * // "updateMask": "my_updateMask"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datafusion.projects.locations.instances.setIamPolicy
* @memberOf! ()
*
@@ -1324,6 +1893,55 @@ export namespace datafusion_v1beta1 {
/**
* datafusion.projects.locations.instances.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datafusion.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datafusion = google.datafusion('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datafusion.projects.locations.instances.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested.
+ * // See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/locations/my-location/instances/my-instance',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datafusion.projects.locations.instances.testIamPermissions
* @memberOf! ()
*
@@ -1406,6 +2024,59 @@ export namespace datafusion_v1beta1 {
/**
* datafusion.projects.locations.instances.upgrade
* @desc Upgrade a single Data Fusion instance. At the end of an operation instance is fully upgraded.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datafusion.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datafusion = google.datafusion('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datafusion.projects.locations.instances.upgrade({
+ * // Name of the Data Fusion instance which need to be upgraded in the form of
+ * // projects/{project}/locations/{location}/instances/{instance}
+ * // Instance will be upgraded with the latest stable version of the Data
+ * // Fusion.
+ * name: 'projects/my-project/locations/my-location/instances/my-instance',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datafusion.projects.locations.instances.upgrade
* @memberOf! ()
*
@@ -1667,6 +2338,50 @@ export namespace datafusion_v1beta1 {
/**
* datafusion.projects.locations.operations.cancel
* @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datafusion.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datafusion = google.datafusion('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datafusion.projects.locations.operations.cancel({
+ * // The name of the operation resource to be cancelled.
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datafusion.projects.locations.operations.cancel
* @memberOf! ()
*
@@ -1740,6 +2455,44 @@ export namespace datafusion_v1beta1 {
/**
* datafusion.projects.locations.operations.delete
* @desc Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datafusion.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datafusion = google.datafusion('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datafusion.projects.locations.operations.delete({
+ * // The name of the operation resource to be deleted.
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datafusion.projects.locations.operations.delete
* @memberOf! ()
*
@@ -1809,6 +2562,50 @@ export namespace datafusion_v1beta1 {
/**
* datafusion.projects.locations.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datafusion.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datafusion = google.datafusion('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datafusion.projects.locations.operations.get({
+ * // The name of the operation resource.
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datafusion.projects.locations.operations.get
* @memberOf! ()
*
@@ -1880,6 +2677,53 @@ export namespace datafusion_v1beta1 {
/**
* datafusion.projects.locations.operations.list
* @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datafusion.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datafusion = google.datafusion('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datafusion.projects.locations.operations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The name of the operation's parent resource.
+ * name: 'projects/my-project/locations/my-location',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datafusion.projects.locations.operations.list
* @memberOf! ()
*
diff --git a/src/apis/dataproc/v1.ts b/src/apis/dataproc/v1.ts
index ef4d700d4a2..860b7cd3539 100644
--- a/src/apis/dataproc/v1.ts
+++ b/src/apis/dataproc/v1.ts
@@ -1698,6 +1698,64 @@ export namespace dataproc_v1 {
/**
* dataproc.projects.locations.autoscalingPolicies.create
* @desc Creates new autoscaling policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.autoscalingPolicies.create({
+ * // Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies.create, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.autoscalingPolicies.create, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.autoscalingPolicies.create
* @memberOf! ()
*
@@ -1773,6 +1831,47 @@ export namespace dataproc_v1 {
/**
* dataproc.projects.locations.autoscalingPolicies.delete
* @desc Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.autoscalingPolicies.delete({
+ * // Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
+ * // For projects.locations.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
+ * name:
+ * 'projects/my-project/locations/my-location/autoscalingPolicies/my-autoscalingPolicie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.autoscalingPolicies.delete
* @memberOf! ()
*
@@ -1842,6 +1941,53 @@ export namespace dataproc_v1 {
/**
* dataproc.projects.locations.autoscalingPolicies.get
* @desc Retrieves autoscaling policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.autoscalingPolicies.get({
+ * // Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
+ * // For projects.locations.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
+ * name:
+ * 'projects/my-project/locations/my-location/autoscalingPolicies/my-autoscalingPolicie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.autoscalingPolicies.get
* @memberOf! ()
*
@@ -1914,56 +2060,58 @@ export namespace dataproc_v1 {
* dataproc.projects.locations.autoscalingPolicies.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for
- * // the appropriate value for this field.
- * resource_: 'projects/my-project/locations/my-location/autoscalingPolicies/my-autoscaling-policy', // TODO: Update placeholder value.
+ * const dataproc = google.dataproc('v1');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * dataproc.projects.locations.autoscalingPolicies.getIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.autoscalingPolicies.getIamPolicy(
+ * {
+ * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/autoscalingPolicies/my-autoscalingPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
+ * },
* }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.locations.autoscalingPolicies.getIamPolicy
* @memberOf! ()
*
@@ -2037,6 +2185,53 @@ export namespace dataproc_v1 {
/**
* dataproc.projects.locations.autoscalingPolicies.list
* @desc Lists autoscaling policies in the project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.autoscalingPolicies.list({
+ * // Optional. The maximum number of results to return in each response. Must be less than or equal to 1000. Defaults to 100.
+ * pageSize: 'placeholder-value',
+ * // Optional. The page token, returned by a previous call, to request the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies.list, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.autoscalingPolicies.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "policies": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.autoscalingPolicies.list
* @memberOf! ()
*
@@ -2123,56 +2318,58 @@ export namespace dataproc_v1 {
* dataproc.projects.locations.autoscalingPolicies.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for
- * // the appropriate value for this field.
- * resource_: 'projects/my-project/locations/my-location/autoscalingPolicies/my-autoscaling-policy', // TODO: Update placeholder value.
+ * const dataproc = google.dataproc('v1');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * dataproc.projects.locations.autoscalingPolicies.setIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.autoscalingPolicies.setIamPolicy(
+ * {
+ * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/autoscalingPolicies/my-autoscalingPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
* }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.locations.autoscalingPolicies.setIamPolicy
* @memberOf! ()
*
@@ -2247,56 +2444,56 @@ export namespace dataproc_v1 {
* dataproc.projects.locations.autoscalingPolicies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy detail is being requested. See the operation
- * // documentation for the appropriate value for this field.
- * resource_: 'projects/my-project/locations/my-location/autoscalingPolicies/my-autoscaling-policy', // TODO: Update placeholder value.
+ * const dataproc = google.dataproc('v1');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * dataproc.projects.locations.autoscalingPolicies.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.autoscalingPolicies.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/autoscalingPolicies/my-autoscalingPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
* }
+ * );
+ * console.log(res.data);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.locations.autoscalingPolicies.testIamPermissions
* @memberOf! ()
*
@@ -2379,6 +2576,65 @@ export namespace dataproc_v1 {
/**
* dataproc.projects.locations.autoscalingPolicies.update
* @desc Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.autoscalingPolicies.update({
+ * // Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
+ * // For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
+ * name:
+ * 'projects/my-project/locations/my-location/autoscalingPolicies/my-autoscalingPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.autoscalingPolicies.update
* @memberOf! ()
*
@@ -2589,57 +2845,71 @@ export namespace dataproc_v1 {
* dataproc.projects.locations.workflowTemplates.create
* @desc Creates new workflow template.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required. The "resource name" of the region, as described in
- * // https://cloud.google.com/apis/design/resource_names of the form
- * // projects/{project_id}/regions/{region}
- * parent: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.create({
+ * // Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates,create, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.workflowTemplates.create, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.locations.workflowTemplates.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.locations.workflowTemplates.create
* @memberOf! ()
*
@@ -2716,50 +2986,48 @@ export namespace dataproc_v1 {
* dataproc.projects.locations.workflowTemplates.delete
* @desc Deletes a workflow template. It does not cancel in-progress workflows.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required. The "resource name" of the workflow template, as described in
- * // https://cloud.google.com/apis/design/resource_names of the form
- * // projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
- * name: 'projects/my-project/locations/my-location/workflowTemplates/my-workflow-template', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.locations.workflowTemplates.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * const dataproc = google.dataproc('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
- * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.delete({
+ * // Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates.delete, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
+ * // For projects.locations.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
+ * name:
+ * 'projects/my-project/locations/my-location/workflowTemplates/my-workflowTemplate',
+ * // Optional. The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version.
+ * version: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.workflowTemplates.delete
* @memberOf! ()
*
@@ -2831,53 +3099,58 @@ export namespace dataproc_v1 {
* dataproc.projects.locations.workflowTemplates.get
* @desc Retrieves the latest workflow template.Can retrieve previously instantiated template by specifying optional version parameter.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required. The "resource name" of the workflow template, as described in
- * // https://cloud.google.com/apis/design/resource_names of the form
- * // projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
- * name: 'projects/my-project/locations/my-location/workflowTemplates/my-workflow-template', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.locations.workflowTemplates.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * const dataproc = google.dataproc('v1');
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
- * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.get({
+ * // Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates.get, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
+ * // For projects.locations.workflowTemplates.get, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
+ * name:
+ * 'projects/my-project/locations/my-location/workflowTemplates/my-workflowTemplate',
+ * // Optional. The version of workflow template to retrieve. Only previously instantiated versions can be retrieved.If unspecified, retrieves the current version.
+ * version: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.workflowTemplates.get
* @memberOf! ()
*
@@ -2951,56 +3224,56 @@ export namespace dataproc_v1 {
* dataproc.projects.locations.workflowTemplates.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for
- * // the appropriate value for this field.
- * resource_: 'projects/my-project/locations/my-location/workflowTemplates/my-workflow-template', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.locations.workflowTemplates.getIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.locations.workflowTemplates.getIamPolicy
* @memberOf! ()
*
@@ -3075,57 +3348,62 @@ export namespace dataproc_v1 {
* dataproc.projects.locations.workflowTemplates.instantiate
* @desc Instantiates a template and begins execution.The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.The Operation.metadata will be WorkflowMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). Also see Using WorkflowMetadata (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On successful completion, Operation.response will be Empty.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required. The "resource name" of the workflow template, as described in
- * // https://cloud.google.com/apis/design/resource_names of the form
- * // projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
- * name: 'projects/my-project/locations/my-location/workflowTemplates/my-workflow-template', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.instantiate({
+ * // Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
+ * // For projects.locations.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
+ * name:
+ * 'projects/my-project/locations/my-location/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "parameters": {},
+ * // "requestId": "my_requestId",
+ * // "version": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.locations.workflowTemplates.instantiate(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.locations.workflowTemplates.instantiate
* @memberOf! ()
*
@@ -3202,57 +3480,71 @@ export namespace dataproc_v1 {
* dataproc.projects.locations.workflowTemplates.instantiateInline
* @desc Instantiates a template and begins execution.This method is equivalent to executing the sequence CreateWorkflowTemplate, InstantiateWorkflowTemplate, DeleteWorkflowTemplate.The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.The Operation.metadata will be WorkflowMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). Also see Using WorkflowMetadata (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On successful completion, Operation.response will be Empty.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required. The "resource name" of the workflow template region, as described in
- * // https://cloud.google.com/apis/design/resource_names of the form
- * // projects/{project_id}/regions/{region}
- * parent: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
+ * const dataproc = google.dataproc('v1');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * dataproc.projects.locations.workflowTemplates.instantiateInline(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.instantiateInline(
+ * {
+ * // Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates,instantiateinline, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.workflowTemplates.instantiateinline, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/locations/my-location',
+ * // Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * },
* }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.locations.workflowTemplates.instantiateInline
* @memberOf! ()
*
@@ -3329,66 +3621,52 @@ export namespace dataproc_v1 {
* dataproc.projects.locations.workflowTemplates.list
* @desc Lists workflows that match the specified filter in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required. The "resource name" of the region, as described in
- * // https://cloud.google.com/apis/design/resource_names of the form
- * // projects/{project_id}/regions/{region}
- * parent: 'projects/my-project/locations/my-location', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * const dataproc = google.dataproc('v1');
*
- * var templatesPage = response['templates'];
- * if (!templatesPage) {
- * return;
- * }
- * for (var i = 0; i < templatesPage.length; i++) {
- * // TODO: Change code below to process each resource in `templatesPage`:
- * console.log(JSON.stringify(templatesPage[i], null, 2));
- * }
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * dataproc.projects.locations.workflowTemplates.list(request, handlePage);
- * }
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.list({
+ * // Optional. The maximum number of results to return in each response.
+ * pageSize: 'placeholder-value',
+ * // Optional. The page token, returned by a previous call, to request the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates,list, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.workflowTemplates.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "templates": []
+ * // }
+ * }
*
- * dataproc.projects.locations.workflowTemplates.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.locations.workflowTemplates.list
* @memberOf! ()
*
@@ -3475,56 +3753,56 @@ export namespace dataproc_v1 {
* dataproc.projects.locations.workflowTemplates.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for
- * // the appropriate value for this field.
- * resource_: 'projects/my-project/locations/my-location/workflowTemplates/my-workflow-template', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.locations.workflowTemplates.setIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.locations.workflowTemplates.setIamPolicy
* @memberOf! ()
*
@@ -3599,56 +3877,56 @@ export namespace dataproc_v1 {
* dataproc.projects.locations.workflowTemplates.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy detail is being requested. See the operation
- * // documentation for the appropriate value for this field.
- * resource_: 'projects/my-project/locations/my-location/workflowTemplates/my-workflow-template', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * const dataproc = google.dataproc('v1');
*
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * dataproc.projects.locations.workflowTemplates.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
* }
+ * );
+ * console.log(res.data);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.locations.workflowTemplates.testIamPermissions
* @memberOf! ()
*
@@ -3732,58 +4010,72 @@ export namespace dataproc_v1 {
* dataproc.projects.locations.workflowTemplates.update
* @desc Updates (replaces) workflow template. The updated template must contain version that matches the current server version.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Output only. The "resource name" of the template, as described in
- * // https://cloud.google.com/apis/design/resource_names of the form
- * // projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
- * name: 'projects/my-project/locations/my-location/workflowTemplates/my-workflow-template', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
- * },
+ * const dataproc = google.dataproc('v1');
*
- * auth: authClient,
- * };
- *
- * dataproc.projects.locations.workflowTemplates.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
- * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.update({
+ * // Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
+ * // For projects.locations.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
+ * name:
+ * 'projects/my-project/locations/my-location/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.workflowTemplates.update
* @memberOf! ()
*
@@ -4060,6 +4352,64 @@ export namespace dataproc_v1 {
/**
* dataproc.projects.regions.autoscalingPolicies.create
* @desc Creates new autoscaling policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.autoscalingPolicies.create({
+ * // Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies.create, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.autoscalingPolicies.create, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/regions/my-region',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.autoscalingPolicies.create
* @memberOf! ()
*
@@ -4135,6 +4485,47 @@ export namespace dataproc_v1 {
/**
* dataproc.projects.regions.autoscalingPolicies.delete
* @desc Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.autoscalingPolicies.delete({
+ * // Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
+ * // For projects.locations.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
+ * name:
+ * 'projects/my-project/regions/my-region/autoscalingPolicies/my-autoscalingPolicie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.autoscalingPolicies.delete
* @memberOf! ()
*
@@ -4204,6 +4595,53 @@ export namespace dataproc_v1 {
/**
* dataproc.projects.regions.autoscalingPolicies.get
* @desc Retrieves autoscaling policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.autoscalingPolicies.get({
+ * // Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
+ * // For projects.locations.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
+ * name:
+ * 'projects/my-project/regions/my-region/autoscalingPolicies/my-autoscalingPolicie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.autoscalingPolicies.get
* @memberOf! ()
*
@@ -4276,56 +4714,56 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.autoscalingPolicies.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for
- * // the appropriate value for this field.
- * resource_: 'projects/my-project/regions/my-region/autoscalingPolicies/my-autoscaling-policy', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.autoscalingPolicies.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/regions/my-region/autoscalingPolicies/my-autoscalingPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.autoscalingPolicies.getIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.autoscalingPolicies.getIamPolicy
* @memberOf! ()
*
@@ -4399,6 +4837,53 @@ export namespace dataproc_v1 {
/**
* dataproc.projects.regions.autoscalingPolicies.list
* @desc Lists autoscaling policies in the project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.autoscalingPolicies.list({
+ * // Optional. The maximum number of results to return in each response. Must be less than or equal to 1000. Defaults to 100.
+ * pageSize: 'placeholder-value',
+ * // Optional. The page token, returned by a previous call, to request the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies.list, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.autoscalingPolicies.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/regions/my-region',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "policies": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.autoscalingPolicies.list
* @memberOf! ()
*
@@ -4485,56 +4970,56 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.autoscalingPolicies.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for
- * // the appropriate value for this field.
- * resource_: 'projects/my-project/regions/my-region/autoscalingPolicies/my-autoscaling-policy', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.autoscalingPolicies.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/regions/my-region/autoscalingPolicies/my-autoscalingPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.autoscalingPolicies.setIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.autoscalingPolicies.setIamPolicy
* @memberOf! ()
*
@@ -4609,56 +5094,56 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.autoscalingPolicies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy detail is being requested. See the operation
- * // documentation for the appropriate value for this field.
- * resource_: 'projects/my-project/regions/my-region/autoscalingPolicies/my-autoscaling-policy', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
+ * const dataproc = google.dataproc('v1');
*
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * dataproc.projects.regions.autoscalingPolicies.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.autoscalingPolicies.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/regions/my-region/autoscalingPolicies/my-autoscalingPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
* }
+ * );
+ * console.log(res.data);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.autoscalingPolicies.testIamPermissions
* @memberOf! ()
*
@@ -4741,6 +5226,65 @@ export namespace dataproc_v1 {
/**
* dataproc.projects.regions.autoscalingPolicies.update
* @desc Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.autoscalingPolicies.update({
+ * // Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
+ * // For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
+ * name:
+ * 'projects/my-project/regions/my-region/autoscalingPolicies/my-autoscalingPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.autoscalingPolicies.update
* @memberOf! ()
*
@@ -4951,58 +5495,68 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.clusters.create
* @desc Creates a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required. The ID of the Google Cloud Platform project that the cluster belongs to.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Required. The Cloud Dataproc region in which to handle the request.
- * region: 'my-region', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.create({
+ * // Required. The ID of the Google Cloud Platform project that the cluster belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ * // Optional. A unique id used to identify the request. If the server receives two CreateClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterName": "my_clusterName",
+ * // "clusterUuid": "my_clusterUuid",
+ * // "config": {},
+ * // "labels": {},
+ * // "metrics": {},
+ * // "projectId": "my_projectId",
+ * // "status": {},
+ * // "statusHistory": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.clusters.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.clusters.create
* @memberOf! ()
*
@@ -5080,57 +5634,57 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.clusters.delete
* @desc Deletes a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required. The ID of the Google Cloud Platform project that the cluster belongs to.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Required. The Cloud Dataproc region in which to handle the request.
- * region: 'my-region', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.delete({
* // Required. The cluster name.
- * clusterName: 'my-cluster-name', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.clusters.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * clusterName: 'placeholder-value',
+ * // Optional. Specifying the cluster_uuid means the RPC should fail (with error NOT_FOUND) if cluster with specified UUID does not exist.
+ * clusterUuid: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the cluster belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ * // Optional. A unique id used to identify the request. If the server receives two DeleteClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
+ * requestId: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.clusters.delete
* @memberOf! ()
*
@@ -5210,61 +5764,59 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.clusters.diagnose
* @desc Gets cluster diagnostic information. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). After the operation completes, Operation.response contains DiagnoseClusterResults (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults).
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required. The ID of the Google Cloud Platform project that the cluster belongs to.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Required. The Cloud Dataproc region in which to handle the request.
- * region: 'my-region', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.diagnose({
* // Required. The cluster name.
- * clusterName: 'my-cluster-name', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * clusterName: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the cluster belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.clusters.diagnose(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.clusters.diagnose
* @memberOf! ()
*
@@ -5343,57 +5895,56 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.clusters.get
* @desc Gets the resource representation for a cluster in a project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required. The ID of the Google Cloud Platform project that the cluster belongs to.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Required. The Cloud Dataproc region in which to handle the request.
- * region: 'my-region', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.get({
* // Required. The cluster name.
- * clusterName: 'my-cluster-name', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.clusters.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * clusterName: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the cluster belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterName": "my_clusterName",
+ * // "clusterUuid": "my_clusterUuid",
+ * // "config": {},
+ * // "labels": {},
+ * // "metrics": {},
+ * // "projectId": "my_projectId",
+ * // "status": {},
+ * // "statusHistory": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.clusters.get
* @memberOf! ()
*
@@ -5469,56 +6020,55 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.clusters.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for
- * // the appropriate value for this field.
- * resource_: 'projects/my-project/regions/my-region/clusters/my-cluster', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.clusters.getIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.clusters.getIamPolicy
* @memberOf! ()
*
@@ -5593,67 +6143,54 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.clusters.list
* @desc Lists all regions/{region}/clusters in a project alphabetically.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required. The ID of the Google Cloud Platform project that the cluster belongs to.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * // Required. The Cloud Dataproc region in which to handle the request.
- * region: 'my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * const dataproc = google.dataproc('v1');
*
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * var clustersPage = response['clusters'];
- * if (!clustersPage) {
- * return;
- * }
- * for (var i = 0; i < clustersPage.length; i++) {
- * // TODO: Change code below to process each resource in `clustersPage`:
- * console.log(JSON.stringify(clustersPage[i], null, 2));
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.list({
+ * // Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = *
+ * filter: 'placeholder-value',
+ * // Optional. The standard List page size.
+ * pageSize: 'placeholder-value',
+ * // Optional. The standard List page token.
+ * pageToken: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the cluster belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * dataproc.projects.regions.clusters.list(request, handlePage);
- * }
- * };
+ * // Example response
+ * // {
+ * // "clusters": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
*
- * dataproc.projects.regions.clusters.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.clusters.list
* @memberOf! ()
*
@@ -5734,62 +6271,90 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.clusters.patch
* @desc Updates a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required. The ID of the Google Cloud Platform project the cluster belongs to.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Required. The Cloud Dataproc region in which to handle the request.
- * region: 'my-region', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.patch({
* // Required. The cluster name.
- * clusterName: 'my-cluster-name', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * clusterName: 'placeholder-value',
+ * // Optional. Timeout for graceful YARN decomissioning. Graceful decommissioning allows removing nodes from the cluster without interrupting jobs in progress. Timeout specifies how long to wait for jobs in progress to finish before forcefully removing nodes (and potentially interrupting jobs). Default timeout is 0 (for forceful decommission), and the maximum allowed timeout is 1 day. (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)).Only supported on Dataproc image versions 1.2 and higher.
+ * gracefulDecommissionTimeout: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project the cluster belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ * // Optional. A unique id used to identify the request. If the server receives two UpdateClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
+ * requestId: 'placeholder-value',
+ * // Required. Specifies the path, relative to Cluster, of the field to update. For example, to change the number of workers in a cluster to 5, the update_mask parameter would be specified as config.worker_config.num_instances, and the PATCH request body would specify the new value, as follows:
+ * // {
+ * // "config":{
+ * // "workerConfig":{
+ * // "numInstances":"5"
+ * // }
+ * // }
+ * // }
+ * // Similarly, to change the number of preemptible workers in a cluster to 5, the update_mask parameter would be config.secondary_worker_config.num_instances, and the PATCH request body would be set as follows:
+ * // {
+ * // "config":{
+ * // "secondaryWorkerConfig":{
+ * // "numInstances":"5"
+ * // }
+ * // }
+ * // }
+ * // Note: Currently, only the following fields can be updated: Mask | Purpose |
labels | Update labels |
config.worker_config.num_instances | Resize primary worker group |
config.secondary_worker_config.num_instances | Resize secondary worker group |
config.autoscaling_config.policy_uri | Use, stop using, or change autoscaling policies |
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterName": "my_clusterName",
+ * // "clusterUuid": "my_clusterUuid",
+ * // "config": {},
+ * // "labels": {},
+ * // "metrics": {},
+ * // "projectId": "my_projectId",
+ * // "status": {},
+ * // "statusHistory": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.clusters.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.clusters.patch
* @memberOf! ()
*
@@ -5871,56 +6436,55 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.clusters.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for
- * // the appropriate value for this field.
- * resource_: 'projects/my-project/regions/my-region/clusters/my-cluster', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.clusters.setIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.clusters.setIamPolicy
* @memberOf! ()
*
@@ -5995,56 +6559,53 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.clusters.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy detail is being requested. See the operation
- * // documentation for the appropriate value for this field.
- * resource_: 'projects/my-project/regions/my-region/clusters/my-cluster', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.clusters.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.clusters.testIamPermissions
* @memberOf! ()
*
@@ -6350,61 +6911,73 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.jobs.cancel
* @desc Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list (https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list) or regions/{region}/jobs.get (https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get).
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required. The ID of the Google Cloud Platform project that the job belongs to.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Required. The Cloud Dataproc region in which to handle the request.
- * region: 'my-region', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.cancel({
* // Required. The job ID.
- * jobId: 'my-job-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * jobId: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.jobs.cancel(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "driverControlFilesUri": "my_driverControlFilesUri",
+ * // "driverOutputResourceUri": "my_driverOutputResourceUri",
+ * // "hadoopJob": {},
+ * // "hiveJob": {},
+ * // "jobUuid": "my_jobUuid",
+ * // "labels": {},
+ * // "pigJob": {},
+ * // "placement": {},
+ * // "prestoJob": {},
+ * // "pysparkJob": {},
+ * // "reference": {},
+ * // "scheduling": {},
+ * // "sparkJob": {},
+ * // "sparkRJob": {},
+ * // "sparkSqlJob": {},
+ * // "status": {},
+ * // "statusHistory": [],
+ * // "yarnApplications": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.jobs.cancel
* @memberOf! ()
*
@@ -6481,54 +7054,47 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.jobs.delete
* @desc Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required. The ID of the Google Cloud Platform project that the job belongs to.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Required. The Cloud Dataproc region in which to handle the request.
- * region: 'my-region', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.delete({
* // Required. The job ID.
- * jobId: 'my-job-id', // TODO: Update placeholder value.
+ * jobId: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
+ * // Example response
+ * // {}
+ * }
*
- * dataproc.projects.regions.jobs.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.jobs.delete
* @memberOf! ()
*
@@ -6603,57 +7169,67 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.jobs.get
* @desc Gets the resource representation for a job in a project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required. The ID of the Google Cloud Platform project that the job belongs to.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Required. The Cloud Dataproc region in which to handle the request.
- * region: 'my-region', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.get({
* // Required. The job ID.
- * jobId: 'my-job-id', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.jobs.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * jobId: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "driverControlFilesUri": "my_driverControlFilesUri",
+ * // "driverOutputResourceUri": "my_driverOutputResourceUri",
+ * // "hadoopJob": {},
+ * // "hiveJob": {},
+ * // "jobUuid": "my_jobUuid",
+ * // "labels": {},
+ * // "pigJob": {},
+ * // "placement": {},
+ * // "prestoJob": {},
+ * // "pysparkJob": {},
+ * // "reference": {},
+ * // "scheduling": {},
+ * // "sparkJob": {},
+ * // "sparkRJob": {},
+ * // "sparkSqlJob": {},
+ * // "status": {},
+ * // "statusHistory": [],
+ * // "yarnApplications": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.jobs.get
* @memberOf! ()
*
@@ -6728,56 +7304,55 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.jobs.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for
- * // the appropriate value for this field.
- * resource_: 'projects/my-project/regions/my-region/jobs/my-job', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/jobs/my-job',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.jobs.getIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.jobs.getIamPolicy
* @memberOf! ()
*
@@ -6852,67 +7427,58 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.jobs.list
* @desc Lists regions/{region}/jobs in a project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required. The ID of the Google Cloud Platform project that the job belongs to.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
- *
- * // Required. The Cloud Dataproc region in which to handle the request.
- * region: 'my-region', // TODO: Update placeholder value.
+ * const dataproc = google.dataproc('v1');
*
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * var jobsPage = response['jobs'];
- * if (!jobsPage) {
- * return;
- * }
- * for (var i = 0; i < jobsPage.length; i++) {
- * // TODO: Change code below to process each resource in `jobsPage`:
- * console.log(JSON.stringify(jobsPage[i], null, 2));
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.list({
+ * // Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.
+ * clusterName: 'placeholder-value',
+ * // Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or NON_ACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = *
+ * filter: 'placeholder-value',
+ * // Optional. Specifies enumerated categories of jobs to list. (default = match ALL jobs).If filter is provided, jobStateMatcher will be ignored.
+ * jobStateMatcher: 'placeholder-value',
+ * // Optional. The number of results to return in each response.
+ * pageSize: 'placeholder-value',
+ * // Optional. The page token, returned by a previous call, to request the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * dataproc.projects.regions.jobs.list(request, handlePage);
- * }
- * };
+ * // Example response
+ * // {
+ * // "jobs": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
*
- * dataproc.projects.regions.jobs.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.jobs.list
* @memberOf! ()
*
@@ -6993,62 +7559,95 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.jobs.patch
* @desc Updates a job in a project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required. The ID of the Google Cloud Platform project that the job belongs to.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Required. The Cloud Dataproc region in which to handle the request.
- * region: 'my-region', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.patch({
* // Required. The job ID.
- * jobId: 'my-job-id', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * jobId: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ * // Required. Specifies the path, relative to Job
, of the field to update. For example, to update the labels of a Job the update_mask
parameter would be specified as labels
, and the PATCH request body would specify the new value. Note: Currently, labels
is the only field that can be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "done": false,
+ * // "driverControlFilesUri": "my_driverControlFilesUri",
+ * // "driverOutputResourceUri": "my_driverOutputResourceUri",
+ * // "hadoopJob": {},
+ * // "hiveJob": {},
+ * // "jobUuid": "my_jobUuid",
+ * // "labels": {},
+ * // "pigJob": {},
+ * // "placement": {},
+ * // "prestoJob": {},
+ * // "pysparkJob": {},
+ * // "reference": {},
+ * // "scheduling": {},
+ * // "sparkJob": {},
+ * // "sparkRJob": {},
+ * // "sparkSqlJob": {},
+ * // "status": {},
+ * // "statusHistory": [],
+ * // "yarnApplications": []
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.jobs.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "driverControlFilesUri": "my_driverControlFilesUri",
+ * // "driverOutputResourceUri": "my_driverOutputResourceUri",
+ * // "hadoopJob": {},
+ * // "hiveJob": {},
+ * // "jobUuid": "my_jobUuid",
+ * // "labels": {},
+ * // "pigJob": {},
+ * // "placement": {},
+ * // "prestoJob": {},
+ * // "pysparkJob": {},
+ * // "reference": {},
+ * // "scheduling": {},
+ * // "sparkJob": {},
+ * // "sparkRJob": {},
+ * // "sparkSqlJob": {},
+ * // "status": {},
+ * // "statusHistory": [],
+ * // "yarnApplications": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.jobs.patch
* @memberOf! ()
*
@@ -7125,56 +7724,55 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.jobs.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for
- * // the appropriate value for this field.
- * resource_: 'projects/my-project/regions/my-region/jobs/my-job', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/jobs/my-job',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.jobs.setIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.jobs.setIamPolicy
* @memberOf! ()
*
@@ -7249,58 +7847,74 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.jobs.submit
* @desc Submits a job to a cluster.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required. The ID of the Google Cloud Platform project that the job belongs to.
- * projectId: 'my-project-id', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * // Required. The Cloud Dataproc region in which to handle the request.
- * region: 'my-region', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.submit({
+ * // Required. The ID of the Google Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "job": {},
+ * // "requestId": "my_requestId"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.jobs.submit(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "driverControlFilesUri": "my_driverControlFilesUri",
+ * // "driverOutputResourceUri": "my_driverOutputResourceUri",
+ * // "hadoopJob": {},
+ * // "hiveJob": {},
+ * // "jobUuid": "my_jobUuid",
+ * // "labels": {},
+ * // "pigJob": {},
+ * // "placement": {},
+ * // "prestoJob": {},
+ * // "pysparkJob": {},
+ * // "reference": {},
+ * // "scheduling": {},
+ * // "sparkJob": {},
+ * // "sparkRJob": {},
+ * // "sparkSqlJob": {},
+ * // "status": {},
+ * // "statusHistory": [],
+ * // "yarnApplications": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.jobs.submit
* @memberOf! ()
*
@@ -7374,6 +7988,61 @@ export namespace dataproc_v1 {
/**
* dataproc.projects.regions.jobs.submitAsOperation
* @desc Submits job to a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.submitAsOperation({
+ * // Required. The ID of the Google Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "job": {},
+ * // "requestId": "my_requestId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.jobs.submitAsOperation
* @memberOf! ()
*
@@ -7451,56 +8120,53 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.jobs.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy detail is being requested. See the operation
- * // documentation for the appropriate value for this field.
- * resource_: 'projects/my-project/regions/my-region/jobs/my-job', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/jobs/my-job',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.jobs.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.jobs.testIamPermissions
* @memberOf! ()
*
@@ -7815,48 +8481,43 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.operations.cancel
* @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The name of the operation resource to be cancelled.
- * name: 'projects/my-project/regions/my-region/operations/my-operation', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * dataproc.projects.regions.operations.cancel(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await dataproc.projects.regions.operations.cancel({
+ * // The name of the operation resource to be cancelled.
+ * name: 'projects/my-project/regions/my-region/operations/my-operation',
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {}
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.operations.cancel
* @memberOf! ()
*
@@ -7927,48 +8588,43 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.operations.delete
* @desc Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The name of the operation resource to be deleted.
- * name: 'projects/my-project/regions/my-region/operations/my-operation', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * auth: authClient,
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * dataproc.projects.regions.operations.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Do the magic
+ * const res = await dataproc.projects.regions.operations.delete({
+ * // The name of the operation resource to be deleted.
+ * name: 'projects/my-project/regions/my-region/operations/my-operation',
* });
- * });
+ * console.log(res.data);
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
+ * // Example response
+ * // {}
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.operations.delete
* @memberOf! ()
*
@@ -8039,51 +8695,49 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The name of the operation resource.
- * name: 'projects/my-project/regions/my-region/operations/my-operation', // TODO: Update placeholder value.
+ * const dataproc = google.dataproc('v1');
*
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * dataproc.projects.regions.operations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await dataproc.projects.regions.operations.get({
+ * // The name of the operation resource.
+ * name: 'projects/my-project/regions/my-region/operations/my-operation',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.operations.get
* @memberOf! ()
*
@@ -8156,56 +8810,55 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.operations.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for
- * // the appropriate value for this field.
- * resource_: 'projects/my-project/regions/my-region/operations/my-operation', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.operations.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/operations/my-operation',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.operations.getIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.operations.getIamPolicy
* @memberOf! ()
*
@@ -8280,64 +8933,52 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.operations.list
* @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/x/operations. To override the binding, API services can add a binding such as "/v1/{name=users/x}/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // The name of the operation's parent resource.
- * name: 'projects/my-project/regions/my-region/operations', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * var operationsPage = response['operations'];
- * if (!operationsPage) {
- * return;
- * }
- * for (var i = 0; i < operationsPage.length; i++) {
- * // TODO: Change code below to process each resource in `operationsPage`:
- * console.log(JSON.stringify(operationsPage[i], null, 2));
- * }
+ * // Do the magic
+ * const res = await dataproc.projects.regions.operations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The name of the operation's parent resource.
+ * name: 'projects/my-project/regions/my-region/operations',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
*
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * dataproc.projects.regions.operations.list(request, handlePage);
- * }
- * };
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
*
- * dataproc.projects.regions.operations.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.operations.list
* @memberOf! ()
*
@@ -8415,56 +9056,55 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.operations.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for
- * // the appropriate value for this field.
- * resource_: 'projects/my-project/regions/my-region/operations/my-operation', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.operations.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/operations/my-operation',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.operations.setIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.operations.setIamPolicy
* @memberOf! ()
*
@@ -8539,56 +9179,53 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.operations.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy detail is being requested. See the operation
- * // documentation for the appropriate value for this field.
- * resource_: 'projects/my-project/regions/my-region/operations/my-operation', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.operations.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/operations/my-operation',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.operations.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.operations.testIamPermissions
* @memberOf! ()
*
@@ -8791,57 +9428,71 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.workflowTemplates.create
* @desc Creates new workflow template.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required. The "resource name" of the region, as described in
- * // https://cloud.google.com/apis/design/resource_names of the form
- * // projects/{project_id}/regions/{region}
- * parent: 'projects/my-project/regions/my-region', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.create({
+ * // Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates,create, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.workflowTemplates.create, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/regions/my-region',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.workflowTemplates.create(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.workflowTemplates.create
* @memberOf! ()
*
@@ -8918,50 +9569,48 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.workflowTemplates.delete
* @desc Deletes a workflow template. It does not cancel in-progress workflows.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required. The "resource name" of the workflow template, as described in
- * // https://cloud.google.com/apis/design/resource_names of the form
- * // projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
- * name: 'projects/my-project/regions/my-region/workflowTemplates/my-workflow-template', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.workflowTemplates.delete(request, function(err) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * const dataproc = google.dataproc('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
- * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.delete({
+ * // Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates.delete, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
+ * // For projects.locations.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
+ * name:
+ * 'projects/my-project/regions/my-region/workflowTemplates/my-workflowTemplate',
+ * // Optional. The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version.
+ * version: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.workflowTemplates.delete
* @memberOf! ()
*
@@ -9033,53 +9682,58 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.workflowTemplates.get
* @desc Retrieves the latest workflow template.Can retrieve previously instantiated template by specifying optional version parameter.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required. The "resource name" of the workflow template, as described in
- * // https://cloud.google.com/apis/design/resource_names of the form
- * // projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
- * name: 'projects/my-project/regions/my-region/workflowTemplates/my-workflow-template', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.workflowTemplates.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * const dataproc = google.dataproc('v1');
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
- * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.get({
+ * // Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates.get, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
+ * // For projects.locations.workflowTemplates.get, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
+ * name:
+ * 'projects/my-project/regions/my-region/workflowTemplates/my-workflowTemplate',
+ * // Optional. The version of workflow template to retrieve. Only previously instantiated versions can be retrieved.If unspecified, retrieves the current version.
+ * version: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.workflowTemplates.get
* @memberOf! ()
*
@@ -9153,56 +9807,56 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.workflowTemplates.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for
- * // the appropriate value for this field.
- * resource_: 'projects/my-project/regions/my-region/workflowTemplates/my-workflow-template', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.getIamPolicy({
+ * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/regions/my-region/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "options": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.workflowTemplates.getIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.workflowTemplates.getIamPolicy
* @memberOf! ()
*
@@ -9277,57 +9931,62 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.workflowTemplates.instantiate
* @desc Instantiates a template and begins execution.The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.The Operation.metadata will be WorkflowMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). Also see Using WorkflowMetadata (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On successful completion, Operation.response will be Empty.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // Required. The "resource name" of the workflow template, as described in
- * // https://cloud.google.com/apis/design/resource_names of the form
- * // projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
- * name: 'projects/my-project/regions/my-region/workflowTemplates/my-workflow-template', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.instantiate({
+ * // Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
+ * // For projects.locations.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
+ * name:
+ * 'projects/my-project/regions/my-region/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "parameters": {},
+ * // "requestId": "my_requestId",
+ * // "version": 0
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.workflowTemplates.instantiate(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.workflowTemplates.instantiate
* @memberOf! ()
*
@@ -9404,57 +10063,71 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.workflowTemplates.instantiateInline
* @desc Instantiates a template and begins execution.This method is equivalent to executing the sequence CreateWorkflowTemplate, InstantiateWorkflowTemplate, DeleteWorkflowTemplate.The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.The Operation.metadata will be WorkflowMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). Also see Using WorkflowMetadata (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On successful completion, Operation.response will be Empty.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required. The "resource name" of the workflow template region, as described in
- * // https://cloud.google.com/apis/design/resource_names of the form
- * // projects/{project_id}/regions/{region}
- * parent: 'projects/my-project/regions/my-region', // TODO: Update placeholder value.
+ * const dataproc = google.dataproc('v1');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * dataproc.projects.regions.workflowTemplates.instantiateInline(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.instantiateInline(
+ * {
+ * // Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates,instantiateinline, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.workflowTemplates.instantiateinline, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/regions/my-region',
+ * // Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * },
* }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.workflowTemplates.instantiateInline
* @memberOf! ()
*
@@ -9531,66 +10204,52 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.workflowTemplates.list
* @desc Lists workflows that match the specified filter in the request.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Required. The "resource name" of the region, as described in
- * // https://cloud.google.com/apis/design/resource_names of the form
- * // projects/{project_id}/regions/{region}
- * parent: 'projects/my-project/regions/my-region', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * const dataproc = google.dataproc('v1');
*
- * var templatesPage = response['templates'];
- * if (!templatesPage) {
- * return;
- * }
- * for (var i = 0; i < templatesPage.length; i++) {
- * // TODO: Change code below to process each resource in `templatesPage`:
- * console.log(JSON.stringify(templatesPage[i], null, 2));
- * }
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * dataproc.projects.regions.workflowTemplates.list(request, handlePage);
- * }
- * };
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.list({
+ * // Optional. The maximum number of results to return in each response.
+ * pageSize: 'placeholder-value',
+ * // Optional. The page token, returned by a previous call, to request the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates,list, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.workflowTemplates.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/regions/my-region',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "templates": []
+ * // }
+ * }
*
- * dataproc.projects.regions.workflowTemplates.list(request, handlePage);
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.workflowTemplates.list
* @memberOf! ()
*
@@ -9677,56 +10336,56 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.workflowTemplates.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
+ * const dataproc = google.dataproc('v1');
*
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for
- * // the appropriate value for this field.
- * resource_: 'projects/my-project/regions/my-region/workflowTemplates/my-workflow-template', // TODO: Update placeholder value.
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/regions/my-region/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.workflowTemplates.setIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.workflowTemplates.setIamPolicy
* @memberOf! ()
*
@@ -9801,56 +10460,56 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.workflowTemplates.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // REQUIRED: The resource for which the policy detail is being requested. See the operation
- * // documentation for the appropriate value for this field.
- * resource_: 'projects/my-project/regions/my-region/workflowTemplates/my-workflow-template', // TODO: Update placeholder value.
+ * const dataproc = google.dataproc('v1');
*
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
*
- * dataproc.projects.regions.workflowTemplates.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/regions/my-region/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
* }
+ * );
+ * console.log(res.data);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
- * });
- * }
* @alias dataproc.projects.regions.workflowTemplates.testIamPermissions
* @memberOf! ()
*
@@ -9934,58 +10593,72 @@ export namespace dataproc_v1 {
* dataproc.projects.regions.workflowTemplates.update
* @desc Updates (replaces) workflow template. The updated template must contain version that matches the current server version.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Cloud Dataproc API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/dataproc
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
*
* const {google} = require('googleapis');
- * var dataproc = google.dataproc('v1');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Output only. The "resource name" of the template, as described in
- * // https://cloud.google.com/apis/design/resource_names of the form
- * // projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
- * name: 'projects/my-project/regions/my-region/workflowTemplates/my-workflow-template', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
- * },
- *
- * auth: authClient,
- * };
- *
- * dataproc.projects.regions.workflowTemplates.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * const dataproc = google.dataproc('v1');
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
- * });
*
- * function authorize(callback) {
- * google.auth.getClient({
- * scopes: ['https://www.googleapis.com/auth/cloud-platform']
- * }).then(client => {
- * callback(client);
- * }).catch(err => {
- * console.error('authentication failed: ', err);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.update({
+ * // Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
+ * // For projects.locations.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
+ * name:
+ * 'projects/my-project/regions/my-region/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.workflowTemplates.update
* @memberOf! ()
*
diff --git a/src/apis/dataproc/v1beta2.ts b/src/apis/dataproc/v1beta2.ts
index 5337c0d681d..3e23a491a39 100644
--- a/src/apis/dataproc/v1beta2.ts
+++ b/src/apis/dataproc/v1beta2.ts
@@ -1778,6 +1778,64 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.autoscalingPolicies.create
* @desc Creates new autoscaling policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.autoscalingPolicies.create({
+ * // Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies.create, the resource name has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.autoscalingPolicies.create, the resource name has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.autoscalingPolicies.create
* @memberOf! ()
*
@@ -1853,6 +1911,47 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.autoscalingPolicies.delete
* @desc Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.autoscalingPolicies.delete({
+ * // Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
+ * // For projects.locations.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
+ * name:
+ * 'projects/my-project/locations/my-location/autoscalingPolicies/my-autoscalingPolicie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.autoscalingPolicies.delete
* @memberOf! ()
*
@@ -1922,6 +2021,53 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.autoscalingPolicies.get
* @desc Retrieves autoscaling policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.autoscalingPolicies.get({
+ * // Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
+ * // For projects.locations.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
+ * name:
+ * 'projects/my-project/locations/my-location/autoscalingPolicies/my-autoscalingPolicie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.autoscalingPolicies.get
* @memberOf! ()
*
@@ -1993,6 +2139,53 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.autoscalingPolicies.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.autoscalingPolicies.getIamPolicy(
+ * {
+ * // Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.
+ * 'options.requestedPolicyVersion': 'placeholder-value',
+ * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/autoscalingPolicies/my-autoscalingPolicie',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.autoscalingPolicies.getIamPolicy
* @memberOf! ()
*
@@ -2066,6 +2259,53 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.autoscalingPolicies.list
* @desc Lists autoscaling policies in the project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.autoscalingPolicies.list({
+ * // Optional. The maximum number of results to return in each response. Must be less than or equal to 1000. Defaults to 100.
+ * pageSize: 'placeholder-value',
+ * // Optional. The page token, returned by a previous call, to request the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies.list, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.autoscalingPolicies.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "policies": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.autoscalingPolicies.list
* @memberOf! ()
*
@@ -2151,6 +2391,59 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.autoscalingPolicies.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.autoscalingPolicies.setIamPolicy(
+ * {
+ * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/autoscalingPolicies/my-autoscalingPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.autoscalingPolicies.setIamPolicy
* @memberOf! ()
*
@@ -2224,6 +2517,57 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.autoscalingPolicies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.autoscalingPolicies.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/autoscalingPolicies/my-autoscalingPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.autoscalingPolicies.testIamPermissions
* @memberOf! ()
*
@@ -2306,6 +2650,65 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.autoscalingPolicies.update
* @desc Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.autoscalingPolicies.update({
+ * // Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
+ * // For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
+ * name:
+ * 'projects/my-project/locations/my-location/autoscalingPolicies/my-autoscalingPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.autoscalingPolicies.update
* @memberOf! ()
*
@@ -2514,6 +2917,72 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.workflowTemplates.create
* @desc Creates new workflow template.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.create({
+ * // Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates,create, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.workflowTemplates.create, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/locations/my-location',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.workflowTemplates.create
* @memberOf! ()
*
@@ -2589,6 +3058,49 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.workflowTemplates.delete
* @desc Deletes a workflow template. It does not cancel in-progress workflows.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.delete({
+ * // Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates.delete, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
+ * // For projects.locations.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
+ * name:
+ * 'projects/my-project/locations/my-location/workflowTemplates/my-workflowTemplate',
+ * // Optional. The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version.
+ * version: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.workflowTemplates.delete
* @memberOf! ()
*
@@ -2659,6 +3171,59 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.workflowTemplates.get
* @desc Retrieves the latest workflow template.Can retrieve previously instantiated template by specifying optional version parameter.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.get({
+ * // Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates.get, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
+ * // For projects.locations.workflowTemplates.get, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
+ * name:
+ * 'projects/my-project/locations/my-location/workflowTemplates/my-workflowTemplate',
+ * // Optional. The version of workflow template to retrieve. Only previously instantiated versions can be retrieved.If unspecified, retrieves the current version.
+ * version: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.workflowTemplates.get
* @memberOf! ()
*
@@ -2731,6 +3296,51 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.workflowTemplates.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.getIamPolicy({
+ * // Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.
+ * 'options.requestedPolicyVersion': 'placeholder-value',
+ * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/workflowTemplates/my-workflowTemplate',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.workflowTemplates.getIamPolicy
* @memberOf! ()
*
@@ -2804,6 +3414,64 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.workflowTemplates.instantiate
* @desc Instantiates a template and begins execution.The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.The Operation.metadata will be WorkflowMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#workflowmetadata). Also see Using WorkflowMetadata (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On successful completion, Operation.response will be Empty.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.instantiate({
+ * // Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
+ * // For projects.locations.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
+ * name:
+ * 'projects/my-project/locations/my-location/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instanceId": "my_instanceId",
+ * // "parameters": {},
+ * // "requestId": "my_requestId",
+ * // "version": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.workflowTemplates.instantiate
* @memberOf! ()
*
@@ -2879,6 +3547,74 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.workflowTemplates.instantiateInline
* @desc Instantiates a template and begins execution.This method is equivalent to executing the sequence CreateWorkflowTemplate, InstantiateWorkflowTemplate, DeleteWorkflowTemplate.The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.The Operation.metadata will be WorkflowMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). Also see Using WorkflowMetadata (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On successful completion, Operation.response will be Empty.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.instantiateInline(
+ * {
+ * // Deprecated. Please use request_id field instead.
+ * instanceId: 'placeholder-value',
+ * // Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates,instantiateinline, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.workflowTemplates.instantiateinline, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/locations/my-location',
+ * // Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.workflowTemplates.instantiateInline
* @memberOf! ()
*
@@ -2955,6 +3691,53 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.workflowTemplates.list
* @desc Lists workflows that match the specified filter in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.list({
+ * // Optional. The maximum number of results to return in each response.
+ * pageSize: 'placeholder-value',
+ * // Optional. The page token, returned by a previous call, to request the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates,list, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.workflowTemplates.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/locations/my-location',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "templates": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.workflowTemplates.list
* @memberOf! ()
*
@@ -3040,6 +3823,57 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.workflowTemplates.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.workflowTemplates.setIamPolicy
* @memberOf! ()
*
@@ -3113,6 +3947,57 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.workflowTemplates.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/locations/my-location/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.workflowTemplates.testIamPermissions
* @memberOf! ()
*
@@ -3195,6 +4080,73 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.locations.workflowTemplates.update
* @desc Updates (replaces) workflow template. The updated template must contain version that matches the current server version.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.locations.workflowTemplates.update({
+ * // Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
+ * // For projects.locations.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
+ * name:
+ * 'projects/my-project/locations/my-location/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.locations.workflowTemplates.update
* @memberOf! ()
*
@@ -3474,6 +4426,64 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.autoscalingPolicies.create
* @desc Creates new autoscaling policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.autoscalingPolicies.create({
+ * // Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies.create, the resource name has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.autoscalingPolicies.create, the resource name has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/regions/my-region',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.autoscalingPolicies.create
* @memberOf! ()
*
@@ -3549,6 +4559,47 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.autoscalingPolicies.delete
* @desc Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.autoscalingPolicies.delete({
+ * // Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
+ * // For projects.locations.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
+ * name:
+ * 'projects/my-project/regions/my-region/autoscalingPolicies/my-autoscalingPolicie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.autoscalingPolicies.delete
* @memberOf! ()
*
@@ -3618,6 +4669,53 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.autoscalingPolicies.get
* @desc Retrieves autoscaling policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.autoscalingPolicies.get({
+ * // Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
+ * // For projects.locations.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
+ * name:
+ * 'projects/my-project/regions/my-region/autoscalingPolicies/my-autoscalingPolicie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.autoscalingPolicies.get
* @memberOf! ()
*
@@ -3689,6 +4787,51 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.autoscalingPolicies.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.autoscalingPolicies.getIamPolicy({
+ * // Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.
+ * 'options.requestedPolicyVersion': 'placeholder-value',
+ * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/regions/my-region/autoscalingPolicies/my-autoscalingPolicie',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.autoscalingPolicies.getIamPolicy
* @memberOf! ()
*
@@ -3762,6 +4905,53 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.autoscalingPolicies.list
* @desc Lists autoscaling policies in the project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.autoscalingPolicies.list({
+ * // Optional. The maximum number of results to return in each response. Must be less than or equal to 1000. Defaults to 100.
+ * pageSize: 'placeholder-value',
+ * // Optional. The page token, returned by a previous call, to request the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies.list, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.autoscalingPolicies.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/regions/my-region',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "policies": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.autoscalingPolicies.list
* @memberOf! ()
*
@@ -3847,6 +5037,57 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.autoscalingPolicies.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.autoscalingPolicies.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/regions/my-region/autoscalingPolicies/my-autoscalingPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.autoscalingPolicies.setIamPolicy
* @memberOf! ()
*
@@ -3920,6 +5161,57 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.autoscalingPolicies.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.autoscalingPolicies.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/regions/my-region/autoscalingPolicies/my-autoscalingPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.autoscalingPolicies.testIamPermissions
* @memberOf! ()
*
@@ -4002,6 +5294,65 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.autoscalingPolicies.update
* @desc Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.autoscalingPolicies.update({
+ * // Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
+ * // For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
+ * name:
+ * 'projects/my-project/regions/my-region/autoscalingPolicies/my-autoscalingPolicie',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "basicAlgorithm": {},
+ * // "id": "my_id",
+ * // "name": "my_name",
+ * // "secondaryWorkerConfig": {},
+ * // "workerConfig": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.autoscalingPolicies.update
* @memberOf! ()
*
@@ -4210,6 +5561,69 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.clusters.create
* @desc Creates a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.create({
+ * // Required. The ID of the Google Cloud Platform project that the cluster belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ * // Optional. A unique id used to identify the request. If the server receives two CreateClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterName": "my_clusterName",
+ * // "clusterUuid": "my_clusterUuid",
+ * // "config": {},
+ * // "labels": {},
+ * // "metrics": {},
+ * // "projectId": "my_projectId",
+ * // "status": {},
+ * // "statusHistory": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.clusters.create
* @memberOf! ()
*
@@ -4287,6 +5701,58 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.clusters.delete
* @desc Deletes a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.delete({
+ * // Required. The cluster name.
+ * clusterName: 'placeholder-value',
+ * // Optional. Specifying the cluster_uuid means the RPC should fail (with error NOT_FOUND) if cluster with specified UUID does not exist.
+ * clusterUuid: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the cluster belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ * // Optional. A unique id used to identify the request. If the server receives two DeleteClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
+ * requestId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.clusters.delete
* @memberOf! ()
*
@@ -4365,6 +5831,60 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.clusters.diagnose
* @desc Gets cluster diagnostic information. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata). After the operation completes, Operation.response contains Empty.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.diagnose({
+ * // Required. The cluster name.
+ * clusterName: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the cluster belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.clusters.diagnose
* @memberOf! ()
*
@@ -4442,6 +5962,57 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.clusters.get
* @desc Gets the resource representation for a cluster in a project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.get({
+ * // Required. The cluster name.
+ * clusterName: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the cluster belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusterName": "my_clusterName",
+ * // "clusterUuid": "my_clusterUuid",
+ * // "config": {},
+ * // "labels": {},
+ * // "metrics": {},
+ * // "projectId": "my_projectId",
+ * // "status": {},
+ * // "statusHistory": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.clusters.get
* @memberOf! ()
*
@@ -4516,6 +6087,50 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.clusters.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.getIamPolicy({
+ * // Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.
+ * 'options.requestedPolicyVersion': 'placeholder-value',
+ * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/clusters/my-cluster',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.clusters.getIamPolicy
* @memberOf! ()
*
@@ -4589,6 +6204,55 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.clusters.list
* @desc Lists all regions/{region}/clusters in a project alphabetically.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.list({
+ * // Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = *
+ * filter: 'placeholder-value',
+ * // Optional. The standard List page size.
+ * pageSize: 'placeholder-value',
+ * // Optional. The standard List page token.
+ * pageToken: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the cluster belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clusters": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.clusters.list
* @memberOf! ()
*
@@ -4669,6 +6333,123 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.clusters.patch
* @desc Updates a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.patch({
+ * // Required. The cluster name.
+ * clusterName: 'placeholder-value',
+ * // Optional. Timeout for graceful YARN decomissioning. Graceful decommissioning allows removing nodes from the cluster without interrupting jobs in progress. Timeout specifies how long to wait for jobs in progress to finish before forcefully removing nodes (and potentially interrupting jobs). Default timeout is 0 (for forceful decommission), and the maximum allowed timeout is 1 day (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)).Only supported on Dataproc image versions 1.2 and higher.
+ * gracefulDecommissionTimeout: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project the cluster belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ * // Optional. A unique id used to identify the request. If the server receives two UpdateClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
+ * requestId: 'placeholder-value',
+ * // Required. Specifies the path, relative to Cluster, of the field to update. For example, to change the number of workers in a cluster to 5, the update_mask parameter would be specified as config.worker_config.num_instances, and the PATCH request body would specify the new value, as follows:
+ * // {
+ * // "config":{
+ * // "workerConfig":{
+ * // "numInstances":"5"
+ * // }
+ * // }
+ * // }
+ * // Similarly, to change the number of preemptible workers in a cluster to 5, the update_mask parameter would be config.secondary_worker_config.num_instances, and the PATCH request body would be set as follows:
+ * // {
+ * // "config":{
+ * // "secondaryWorkerConfig":{
+ * // "numInstances":"5"
+ * // }
+ * // }
+ * // }
+ * // Note: currently only the following fields can be updated:
+ * //
+ * //
+ * // Mask | Purpose |
+ * //
+ * //
+ * // labels | Updates labels |
+ * //
+ * //
+ * // config.worker_config.num_instances | Resize primary worker
+ * // group |
+ * //
+ * //
+ * // config.secondary_worker_config.num_instances | Resize secondary
+ * // worker group |
+ * //
+ * //
+ * // config.lifecycle_config.auto_delete_ttl | Reset MAX TTL
+ * // duration |
+ * //
+ * //
+ * // config.lifecycle_config.auto_delete_time | Update MAX TTL
+ * // deletion timestamp |
+ * //
+ * //
+ * // config.lifecycle_config.idle_delete_ttl | Update Idle TTL
+ * // duration |
+ * //
+ * //
+ * // config.autoscaling_config.policy_uri | Use, stop using, or change
+ * // autoscaling policies |
+ * //
+ * //
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterName": "my_clusterName",
+ * // "clusterUuid": "my_clusterUuid",
+ * // "config": {},
+ * // "labels": {},
+ * // "metrics": {},
+ * // "projectId": "my_projectId",
+ * // "status": {},
+ * // "statusHistory": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.clusters.patch
* @memberOf! ()
*
@@ -4749,6 +6530,56 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.clusters.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.clusters.setIamPolicy
* @memberOf! ()
*
@@ -4822,6 +6653,63 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.clusters.start
* @desc Starts a cluster in a project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.start({
+ * // Required. The cluster name.
+ * clusterName: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project the cluster belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterUuid": "my_clusterUuid",
+ * // "requestId": "my_requestId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.clusters.start
* @memberOf! ()
*
@@ -4899,6 +6787,63 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.clusters.stop
* @desc Stops a cluster in a project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.stop({
+ * // Required. The cluster name.
+ * clusterName: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project the cluster belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "clusterUuid": "my_clusterUuid",
+ * // "requestId": "my_requestId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.clusters.stop
* @memberOf! ()
*
@@ -4976,6 +6921,54 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.clusters.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.clusters.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/clusters/my-cluster',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.clusters.testIamPermissions
* @memberOf! ()
*
@@ -5329,6 +7322,75 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.jobs.cancel
* @desc Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list (https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/list) or regions/{region}/jobs.get (https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.cancel({
+ * // Required. The job ID.
+ * jobId: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "driverControlFilesUri": "my_driverControlFilesUri",
+ * // "driverOutputResourceUri": "my_driverOutputResourceUri",
+ * // "hadoopJob": {},
+ * // "hiveJob": {},
+ * // "jobUuid": "my_jobUuid",
+ * // "labels": {},
+ * // "pigJob": {},
+ * // "placement": {},
+ * // "prestoJob": {},
+ * // "pysparkJob": {},
+ * // "reference": {},
+ * // "scheduling": {},
+ * // "sparkJob": {},
+ * // "sparkRJob": {},
+ * // "sparkSqlJob": {},
+ * // "status": {},
+ * // "statusHistory": [],
+ * // "submittedBy": "my_submittedBy",
+ * // "yarnApplications": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.jobs.cancel
* @memberOf! ()
*
@@ -5404,6 +7466,48 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.jobs.delete
* @desc Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.delete({
+ * // Required. The job ID.
+ * jobId: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.jobs.delete
* @memberOf! ()
*
@@ -5478,6 +7582,69 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.jobs.get
* @desc Gets the resource representation for a job in a project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.get({
+ * // Required. The job ID.
+ * jobId: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "driverControlFilesUri": "my_driverControlFilesUri",
+ * // "driverOutputResourceUri": "my_driverOutputResourceUri",
+ * // "hadoopJob": {},
+ * // "hiveJob": {},
+ * // "jobUuid": "my_jobUuid",
+ * // "labels": {},
+ * // "pigJob": {},
+ * // "placement": {},
+ * // "prestoJob": {},
+ * // "pysparkJob": {},
+ * // "reference": {},
+ * // "scheduling": {},
+ * // "sparkJob": {},
+ * // "sparkRJob": {},
+ * // "sparkSqlJob": {},
+ * // "status": {},
+ * // "statusHistory": [],
+ * // "submittedBy": "my_submittedBy",
+ * // "yarnApplications": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.jobs.get
* @memberOf! ()
*
@@ -5552,6 +7719,50 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.jobs.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.getIamPolicy({
+ * // Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.
+ * 'options.requestedPolicyVersion': 'placeholder-value',
+ * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/jobs/my-job',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.jobs.getIamPolicy
* @memberOf! ()
*
@@ -5625,6 +7836,59 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.jobs.list
* @desc Lists regions/{region}/jobs in a project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.list({
+ * // Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.
+ * clusterName: 'placeholder-value',
+ * // Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or NON_ACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = *
+ * filter: 'placeholder-value',
+ * // Optional. Specifies enumerated categories of jobs to list. (default = match ALL jobs).If filter is provided, jobStateMatcher will be ignored.
+ * jobStateMatcher: 'placeholder-value',
+ * // Optional. The number of results to return in each response.
+ * pageSize: 'placeholder-value',
+ * // Optional. The page token, returned by a previous call, to request the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "jobs": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.jobs.list
* @memberOf! ()
*
@@ -5704,6 +7968,98 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.jobs.patch
* @desc Updates a job in a project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.patch({
+ * // Required. The job ID.
+ * jobId: 'placeholder-value',
+ * // Required. The ID of the Google Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ * // Required. Specifies the path, relative to Job
, of the field to update. For example, to update the labels of a Job the update_mask
parameter would be specified as labels
, and the PATCH request body would specify the new value. Note: Currently, labels
is the only field that can be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "done": false,
+ * // "driverControlFilesUri": "my_driverControlFilesUri",
+ * // "driverOutputResourceUri": "my_driverOutputResourceUri",
+ * // "hadoopJob": {},
+ * // "hiveJob": {},
+ * // "jobUuid": "my_jobUuid",
+ * // "labels": {},
+ * // "pigJob": {},
+ * // "placement": {},
+ * // "prestoJob": {},
+ * // "pysparkJob": {},
+ * // "reference": {},
+ * // "scheduling": {},
+ * // "sparkJob": {},
+ * // "sparkRJob": {},
+ * // "sparkSqlJob": {},
+ * // "status": {},
+ * // "statusHistory": [],
+ * // "submittedBy": "my_submittedBy",
+ * // "yarnApplications": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "driverControlFilesUri": "my_driverControlFilesUri",
+ * // "driverOutputResourceUri": "my_driverOutputResourceUri",
+ * // "hadoopJob": {},
+ * // "hiveJob": {},
+ * // "jobUuid": "my_jobUuid",
+ * // "labels": {},
+ * // "pigJob": {},
+ * // "placement": {},
+ * // "prestoJob": {},
+ * // "pysparkJob": {},
+ * // "reference": {},
+ * // "scheduling": {},
+ * // "sparkJob": {},
+ * // "sparkRJob": {},
+ * // "sparkSqlJob": {},
+ * // "status": {},
+ * // "statusHistory": [],
+ * // "submittedBy": "my_submittedBy",
+ * // "yarnApplications": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.jobs.patch
* @memberOf! ()
*
@@ -5780,6 +8136,56 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.jobs.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/jobs/my-job',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.jobs.setIamPolicy
* @memberOf! ()
*
@@ -5853,6 +8259,76 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.jobs.submit
* @desc Submits a job to a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.submit({
+ * // Required. The ID of the Google Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "job": {},
+ * // "requestId": "my_requestId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "driverControlFilesUri": "my_driverControlFilesUri",
+ * // "driverOutputResourceUri": "my_driverOutputResourceUri",
+ * // "hadoopJob": {},
+ * // "hiveJob": {},
+ * // "jobUuid": "my_jobUuid",
+ * // "labels": {},
+ * // "pigJob": {},
+ * // "placement": {},
+ * // "prestoJob": {},
+ * // "pysparkJob": {},
+ * // "reference": {},
+ * // "scheduling": {},
+ * // "sparkJob": {},
+ * // "sparkRJob": {},
+ * // "sparkSqlJob": {},
+ * // "status": {},
+ * // "statusHistory": [],
+ * // "submittedBy": "my_submittedBy",
+ * // "yarnApplications": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.jobs.submit
* @memberOf! ()
*
@@ -5927,6 +8403,61 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.jobs.submitAsOperation
* @desc Submits job to a cluster.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.submitAsOperation({
+ * // Required. The ID of the Google Cloud Platform project that the job belongs to.
+ * projectId: 'placeholder-value',
+ * // Required. The Dataproc region in which to handle the request.
+ * region: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "job": {},
+ * // "requestId": "my_requestId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.jobs.submitAsOperation
* @memberOf! ()
*
@@ -6003,6 +8534,54 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.jobs.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.jobs.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/jobs/my-job',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.jobs.testIamPermissions
* @memberOf! ()
*
@@ -6315,6 +8894,44 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.operations.cancel
* @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.operations.cancel({
+ * // The name of the operation resource to be cancelled.
+ * name: 'projects/my-project/regions/my-region/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.operations.cancel
* @memberOf! ()
*
@@ -6387,6 +9004,44 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.operations.delete
* @desc Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.operations.delete({
+ * // The name of the operation resource to be deleted.
+ * name: 'projects/my-project/regions/my-region/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.operations.delete
* @memberOf! ()
*
@@ -6456,6 +9111,50 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.operations.get({
+ * // The name of the operation resource.
+ * name: 'projects/my-project/regions/my-region/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.operations.get
* @memberOf! ()
*
@@ -6527,6 +9226,50 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.operations.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.operations.getIamPolicy({
+ * // Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.
+ * 'options.requestedPolicyVersion': 'placeholder-value',
+ * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.operations.getIamPolicy
* @memberOf! ()
*
@@ -6600,6 +9343,53 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.operations.list
* @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/x/operations. To override the binding, API services can add a binding such as "/v1/{name=users/x}/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.operations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The name of the operation's parent resource.
+ * name: 'projects/my-project/regions/my-region/operations',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.operations.list
* @memberOf! ()
*
@@ -6676,6 +9466,56 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.operations.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.operations.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/operations/my-operation',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.operations.setIamPolicy
* @memberOf! ()
*
@@ -6749,6 +9589,54 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.operations.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.operations.testIamPermissions({
+ * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
+ * resource: 'projects/my-project/regions/my-region/operations/my-operation',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.operations.testIamPermissions
* @memberOf! ()
*
@@ -6949,6 +9837,72 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.workflowTemplates.create
* @desc Creates new workflow template.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.create({
+ * // Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates,create, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.workflowTemplates.create, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/regions/my-region',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.workflowTemplates.create
* @memberOf! ()
*
@@ -7024,6 +9978,49 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.workflowTemplates.delete
* @desc Deletes a workflow template. It does not cancel in-progress workflows.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.delete({
+ * // Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates.delete, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
+ * // For projects.locations.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
+ * name:
+ * 'projects/my-project/regions/my-region/workflowTemplates/my-workflowTemplate',
+ * // Optional. The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version.
+ * version: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.workflowTemplates.delete
* @memberOf! ()
*
@@ -7094,6 +10091,59 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.workflowTemplates.get
* @desc Retrieves the latest workflow template.Can retrieve previously instantiated template by specifying optional version parameter.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.get({
+ * // Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates.get, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
+ * // For projects.locations.workflowTemplates.get, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
+ * name:
+ * 'projects/my-project/regions/my-region/workflowTemplates/my-workflowTemplate',
+ * // Optional. The version of workflow template to retrieve. Only previously instantiated versions can be retrieved.If unspecified, retrieves the current version.
+ * version: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.workflowTemplates.get
* @memberOf! ()
*
@@ -7166,6 +10216,51 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.workflowTemplates.getIamPolicy
* @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.getIamPolicy({
+ * // Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.
+ * 'options.requestedPolicyVersion': 'placeholder-value',
+ * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/regions/my-region/workflowTemplates/my-workflowTemplate',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.workflowTemplates.getIamPolicy
* @memberOf! ()
*
@@ -7239,6 +10334,64 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.workflowTemplates.instantiate
* @desc Instantiates a template and begins execution.The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.The Operation.metadata will be WorkflowMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#workflowmetadata). Also see Using WorkflowMetadata (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On successful completion, Operation.response will be Empty.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.instantiate({
+ * // Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
+ * // For projects.locations.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
+ * name:
+ * 'projects/my-project/regions/my-region/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "instanceId": "my_instanceId",
+ * // "parameters": {},
+ * // "requestId": "my_requestId",
+ * // "version": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.workflowTemplates.instantiate
* @memberOf! ()
*
@@ -7314,6 +10467,74 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.workflowTemplates.instantiateInline
* @desc Instantiates a template and begins execution.This method is equivalent to executing the sequence CreateWorkflowTemplate, InstantiateWorkflowTemplate, DeleteWorkflowTemplate.The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.The Operation.metadata will be WorkflowMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). Also see Using WorkflowMetadata (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On successful completion, Operation.response will be Empty.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.instantiateInline(
+ * {
+ * // Deprecated. Please use request_id field instead.
+ * instanceId: 'placeholder-value',
+ * // Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates,instantiateinline, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.workflowTemplates.instantiateinline, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/regions/my-region',
+ * // Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
+ * requestId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.workflowTemplates.instantiateInline
* @memberOf! ()
*
@@ -7390,6 +10611,53 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.workflowTemplates.list
* @desc Lists workflows that match the specified filter in the request.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.list({
+ * // Optional. The maximum number of results to return in each response.
+ * pageSize: 'placeholder-value',
+ * // Optional. The page token, returned by a previous call, to request the next page of results.
+ * pageToken: 'placeholder-value',
+ * // Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates,list, the resource name of the region has the following format: projects/{project_id}/regions/{region}
+ * // For projects.locations.workflowTemplates.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}
+ * parent: 'projects/my-project/regions/my-region',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "templates": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.workflowTemplates.list
* @memberOf! ()
*
@@ -7475,6 +10743,57 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.workflowTemplates.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.setIamPolicy({
+ * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/regions/my-region/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.workflowTemplates.setIamPolicy
* @memberOf! ()
*
@@ -7548,6 +10867,57 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.workflowTemplates.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.testIamPermissions(
+ * {
+ * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
+ * resource:
+ * 'projects/my-project/regions/my-region/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.workflowTemplates.testIamPermissions
* @memberOf! ()
*
@@ -7630,6 +11000,73 @@ export namespace dataproc_v1beta2 {
/**
* dataproc.projects.regions.workflowTemplates.update
* @desc Updates (replaces) workflow template. The updated template must contain version that matches the current server version.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dataproc.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dataproc = google.dataproc('v1beta2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dataproc.projects.regions.workflowTemplates.update({
+ * // Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
+ * // For projects.regions.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
+ * // For projects.locations.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}
+ * name:
+ * 'projects/my-project/regions/my-region/workflowTemplates/my-workflowTemplate',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "createTime": "my_createTime",
+ * // "id": "my_id",
+ * // "jobs": [],
+ * // "labels": {},
+ * // "name": "my_name",
+ * // "parameters": [],
+ * // "placement": {},
+ * // "updateTime": "my_updateTime",
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dataproc.projects.regions.workflowTemplates.update
* @memberOf! ()
*
diff --git a/src/apis/datastore/v1.ts b/src/apis/datastore/v1.ts
index 8cad928da4c..6a0e8ebfccb 100644
--- a/src/apis/datastore/v1.ts
+++ b/src/apis/datastore/v1.ts
@@ -1096,6 +1096,57 @@ export namespace datastore_v1 {
/**
* datastore.projects.allocateIds
* @desc Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.allocateIds({
+ * // Required. The ID of the project against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "keys": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "keys": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.allocateIds
* @memberOf! ()
*
@@ -1173,6 +1224,57 @@ export namespace datastore_v1 {
/**
* datastore.projects.beginTransaction
* @desc Begins a new transaction.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.beginTransaction({
+ * // Required. The ID of the project against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "transactionOptions": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "transaction": "my_transaction"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.beginTransaction
* @memberOf! ()
*
@@ -1251,6 +1353,60 @@ export namespace datastore_v1 {
/**
* datastore.projects.commit
* @desc Commits a transaction, optionally creating, deleting or modifying some entities.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.commit({
+ * // Required. The ID of the project against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "mode": "my_mode",
+ * // "mutations": [],
+ * // "transaction": "my_transaction"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "indexUpdates": 0,
+ * // "mutationResults": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.commit
* @memberOf! ()
*
@@ -1325,6 +1481,63 @@ export namespace datastore_v1 {
/**
* datastore.projects.export
* @desc Exports a copy of all or a subset of entities from Google Cloud Datastore to another storage system, such as Google Cloud Storage. Recent updates to entities may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.export({
+ * // Required. Project ID against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entityFilter": {},
+ * // "labels": {},
+ * // "outputUrlPrefix": "my_outputUrlPrefix"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.export
* @memberOf! ()
*
@@ -1406,6 +1619,63 @@ export namespace datastore_v1 {
/**
* datastore.projects.import
* @desc Imports entities into Google Cloud Datastore. Existing entities with the same key are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportEntities operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.import({
+ * // Required. Project ID against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entityFilter": {},
+ * // "inputUrl": "my_inputUrl",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.import
* @memberOf! ()
*
@@ -1487,6 +1757,60 @@ export namespace datastore_v1 {
/**
* datastore.projects.lookup
* @desc Looks up entities by key.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.lookup({
+ * // Required. The ID of the project against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "keys": [],
+ * // "readOptions": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deferred": [],
+ * // "found": [],
+ * // "missing": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.lookup
* @memberOf! ()
*
@@ -1561,6 +1885,56 @@ export namespace datastore_v1 {
/**
* datastore.projects.reserveIds
* @desc Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.reserveIds({
+ * // Required. The ID of the project against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "databaseId": "my_databaseId",
+ * // "keys": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.reserveIds
* @memberOf! ()
*
@@ -1636,6 +2010,55 @@ export namespace datastore_v1 {
/**
* datastore.projects.rollback
* @desc Rolls back a transaction.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.rollback({
+ * // Required. The ID of the project against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "transaction": "my_transaction"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.rollback
* @memberOf! ()
*
@@ -1711,6 +2134,61 @@ export namespace datastore_v1 {
/**
* datastore.projects.runQuery
* @desc Queries for entities.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.runQuery({
+ * // Required. The ID of the project against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "gqlQuery": {},
+ * // "partitionId": {},
+ * // "query": {},
+ * // "readOptions": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "batch": {},
+ * // "query": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.runQuery
* @memberOf! ()
*
@@ -1943,6 +2421,66 @@ export namespace datastore_v1 {
/**
* datastore.projects.indexes.create
* @desc Creates the specified index. A newly created index's initial state is `CREATING`. On completion of the returned google.longrunning.Operation, the state will be `READY`. If the index already exists, the call will return an `ALREADY_EXISTS` status. During index creation, the process could result in an error, in which case the index will move to the `ERROR` state. The process can be recovered by fixing the data that caused the error, removing the index with delete, then re-creating the index with create. Indexes with a single property cannot be created.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.indexes.create({
+ * // Project ID against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "ancestor": "my_ancestor",
+ * // "indexId": "my_indexId",
+ * // "kind": "my_kind",
+ * // "projectId": "my_projectId",
+ * // "properties": [],
+ * // "state": "my_state"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.indexes.create
* @memberOf! ()
*
@@ -2025,6 +2563,55 @@ export namespace datastore_v1 {
/**
* datastore.projects.indexes.delete
* @desc Deletes an existing index. An index can only be deleted if it is in a `READY` or `ERROR` state. On successful execution of the request, the index will be in a `DELETING` state. And on completion of the returned google.longrunning.Operation, the index will be removed. During index deletion, the process could result in an error, in which case the index will move to the `ERROR` state. The process can be recovered by fixing the data that caused the error, followed by calling delete again.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.indexes.delete({
+ * // The resource ID of the index to delete.
+ * indexId: 'placeholder-value',
+ * // Project ID against which to make the request.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.indexes.delete
* @memberOf! ()
*
@@ -2106,6 +2693,56 @@ export namespace datastore_v1 {
/**
* datastore.projects.indexes.get
* @desc Gets an index.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.indexes.get({
+ * // The resource ID of the index to get.
+ * indexId: 'placeholder-value',
+ * // Project ID against which to make the request.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "ancestor": "my_ancestor",
+ * // "indexId": "my_indexId",
+ * // "kind": "my_kind",
+ * // "projectId": "my_projectId",
+ * // "properties": [],
+ * // "state": "my_state"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.indexes.get
* @memberOf! ()
*
@@ -2187,6 +2824,56 @@ export namespace datastore_v1 {
/**
* datastore.projects.indexes.list
* @desc Lists the indexes that match the specified filters. Datastore uses an eventually consistent query to fetch the list of indexes and may occasionally return stale results.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.indexes.list({
+ * filter: 'placeholder-value',
+ * // The maximum number of items to return. If zero, then all results will be
+ * // returned.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous List request, if any.
+ * pageToken: 'placeholder-value',
+ * // Project ID against which to make the request.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "indexes": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.indexes.list
* @memberOf! ()
*
@@ -2368,6 +3055,47 @@ export namespace datastore_v1 {
/**
* datastore.projects.operations.cancel
* @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.operations.cancel({
+ * // The name of the operation resource to be cancelled.
+ * name: 'projects/my-project/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.operations.cancel
* @memberOf! ()
*
@@ -2437,6 +3165,47 @@ export namespace datastore_v1 {
/**
* datastore.projects.operations.delete
* @desc Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.operations.delete({
+ * // The name of the operation resource to be deleted.
+ * name: 'projects/my-project/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.operations.delete
* @memberOf! ()
*
@@ -2506,6 +3275,53 @@ export namespace datastore_v1 {
/**
* datastore.projects.operations.get
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.operations.get({
+ * // The name of the operation resource.
+ * name: 'projects/my-project/operations/my-operation',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.operations.get
* @memberOf! ()
*
@@ -2584,6 +3400,56 @@ export namespace datastore_v1 {
/**
* datastore.projects.operations.list
* @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.operations.list({
+ * // The standard list filter.
+ * filter: 'placeholder-value',
+ * // The name of the operation's parent resource.
+ * name: 'projects/my-project',
+ * // The standard list page size.
+ * pageSize: 'placeholder-value',
+ * // The standard list page token.
+ * pageToken: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.operations.list
* @memberOf! ()
*
diff --git a/src/apis/datastore/v1beta1.ts b/src/apis/datastore/v1beta1.ts
index 42a95851683..2f24b1a29ac 100644
--- a/src/apis/datastore/v1beta1.ts
+++ b/src/apis/datastore/v1beta1.ts
@@ -436,6 +436,63 @@ export namespace datastore_v1beta1 {
/**
* datastore.projects.export
* @desc Exports a copy of all or a subset of entities from Google Cloud Datastore to another storage system, such as Google Cloud Storage. Recent updates to entities may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.export({
+ * // Project ID against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entityFilter": {},
+ * // "labels": {},
+ * // "outputUrlPrefix": "my_outputUrlPrefix"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.export
* @memberOf! ()
*
@@ -517,6 +574,63 @@ export namespace datastore_v1beta1 {
/**
* datastore.projects.import
* @desc Imports entities into Google Cloud Datastore. Existing entities with the same key are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportEntities operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1beta1');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.import({
+ * // Project ID against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entityFilter": {},
+ * // "inputUrl": "my_inputUrl",
+ * // "labels": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.import
* @memberOf! ()
*
diff --git a/src/apis/datastore/v1beta3.ts b/src/apis/datastore/v1beta3.ts
index ca88a323972..e3440484224 100644
--- a/src/apis/datastore/v1beta3.ts
+++ b/src/apis/datastore/v1beta3.ts
@@ -944,6 +944,57 @@ export namespace datastore_v1beta3 {
/**
* datastore.projects.allocateIds
* @desc Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1beta3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.allocateIds({
+ * // Required. The ID of the project against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "keys": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "keys": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.allocateIds
* @memberOf! ()
*
@@ -1020,6 +1071,57 @@ export namespace datastore_v1beta3 {
/**
* datastore.projects.beginTransaction
* @desc Begins a new transaction.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1beta3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.beginTransaction({
+ * // Required. The ID of the project against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "transactionOptions": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "transaction": "my_transaction"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.beginTransaction
* @memberOf! ()
*
@@ -1098,6 +1200,60 @@ export namespace datastore_v1beta3 {
/**
* datastore.projects.commit
* @desc Commits a transaction, optionally creating, deleting or modifying some entities.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1beta3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.commit({
+ * // Required. The ID of the project against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "mode": "my_mode",
+ * // "mutations": [],
+ * // "transaction": "my_transaction"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "indexUpdates": 0,
+ * // "mutationResults": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.commit
* @memberOf! ()
*
@@ -1172,6 +1328,60 @@ export namespace datastore_v1beta3 {
/**
* datastore.projects.lookup
* @desc Looks up entities by key.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1beta3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.lookup({
+ * // Required. The ID of the project against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "keys": [],
+ * // "readOptions": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deferred": [],
+ * // "found": [],
+ * // "missing": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.lookup
* @memberOf! ()
*
@@ -1246,6 +1456,56 @@ export namespace datastore_v1beta3 {
/**
* datastore.projects.reserveIds
* @desc Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1beta3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.reserveIds({
+ * // Required. The ID of the project against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "databaseId": "my_databaseId",
+ * // "keys": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.reserveIds
* @memberOf! ()
*
@@ -1321,6 +1581,55 @@ export namespace datastore_v1beta3 {
/**
* datastore.projects.rollback
* @desc Rolls back a transaction.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1beta3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.rollback({
+ * // Required. The ID of the project against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "transaction": "my_transaction"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.rollback
* @memberOf! ()
*
@@ -1396,6 +1705,61 @@ export namespace datastore_v1beta3 {
/**
* datastore.projects.runQuery
* @desc Queries for entities.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/datastore.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const datastore = google.datastore('v1beta3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/datastore',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await datastore.projects.runQuery({
+ * // Required. The ID of the project against which to make the request.
+ * projectId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "gqlQuery": {},
+ * // "partitionId": {},
+ * // "query": {},
+ * // "readOptions": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "batch": {},
+ * // "query": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias datastore.projects.runQuery
* @memberOf! ()
*
diff --git a/src/apis/deploymentmanager/alpha.ts b/src/apis/deploymentmanager/alpha.ts
index 7c998285907..b42971bcf98 100644
--- a/src/apis/deploymentmanager/alpha.ts
+++ b/src/apis/deploymentmanager/alpha.ts
@@ -1227,6 +1227,74 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.compositeTypes.delete
* @desc Deletes a composite type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.compositeTypes.delete({
+ * // The name of the type for this request.
+ * compositeType: '[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.compositeTypes.delete
* @memberOf! ()
*
@@ -1302,6 +1370,62 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.compositeTypes.get
* @desc Gets information about a specific composite type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.compositeTypes.get({
+ * // The name of the composite type for this request.
+ * compositeType: '[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "templateContents": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.compositeTypes.get
* @memberOf! ()
*
@@ -1377,6 +1501,88 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.compositeTypes.insert
* @desc Creates a composite type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.compositeTypes.insert({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "templateContents": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.compositeTypes.insert
* @memberOf! ()
*
@@ -1452,6 +1658,71 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.compositeTypes.list
* @desc Lists all composite types for Deployment Manager.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.compositeTypes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "compositeTypes": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.compositeTypes.list
* @memberOf! ()
*
@@ -1537,6 +1808,90 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.compositeTypes.patch
* @desc Updates a composite type. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.compositeTypes.patch({
+ * // The name of the composite type for this request.
+ * compositeType: '[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "templateContents": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.compositeTypes.patch
* @memberOf! ()
*
@@ -1613,6 +1968,90 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.compositeTypes.update
* @desc Updates a composite type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.compositeTypes.update({
+ * // The name of the composite type for this request.
+ * compositeType: '[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "templateContents": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.compositeTypes.update
* @memberOf! ()
*
@@ -1816,6 +2255,82 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.deployments.cancelPreview
* @desc Cancels and removes the preview currently associated with the deployment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.cancelPreview({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.cancelPreview
* @memberOf! ()
*
@@ -1892,6 +2407,76 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.deployments.delete
* @desc Deletes a deployment and all of the resources in the deployment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.delete({
+ * // Sets the policy to use for deleting resources.
+ * deletePolicy: 'placeholder-value',
+ * // The name of the deployment for this request.
+ * deployment: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.delete
* @memberOf! ()
*
@@ -1968,6 +2553,67 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.deployments.get
* @desc Gets information about a specific deployment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.get({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "credential": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "manifest": "my_manifest",
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "outputs": [],
+ * // "selfLink": "my_selfLink",
+ * // "target": {},
+ * // "update": {},
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.get
* @memberOf! ()
*
@@ -2042,6 +2688,57 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.deployments.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.getIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.getIamPolicy
* @memberOf! ()
*
@@ -2115,6 +2812,97 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.deployments.insert
* @desc Creates a deployment and all of the resources described by the deployment manifest.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.insert({
+ * // Sets the policy to use for creating new resources.
+ * createPolicy: 'placeholder-value',
+ * // If set to true, creates a deployment and creates "shell" resources but does not actually instantiate these resources. This allows you to preview what your deployment looks like. After previewing a deployment, you can deploy your resources by making a request with the update() method or you can use the cancelPreview() method to cancel the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.
+ * preview: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "credential": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "manifest": "my_manifest",
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "outputs": [],
+ * // "selfLink": "my_selfLink",
+ * // "target": {},
+ * // "update": {},
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.insert
* @memberOf! ()
*
@@ -2192,6 +2980,71 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.deployments.list
* @desc Lists all deployments for a given project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deployments": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.list
* @memberOf! ()
*
@@ -2271,6 +3124,101 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.deployments.patch
* @desc Updates a deployment and all of the resources described by the deployment manifest. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.patch({
+ * // Sets the policy to use for creating new resources.
+ * createPolicy: 'placeholder-value',
+ * // Sets the policy to use for deleting resources.
+ * deletePolicy: 'placeholder-value',
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // If set to true, updates the deployment and creates and updates the "shell" resources but does not actually alter or instantiate these resources. This allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a target.config with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request with the update() or you can cancelPreview() to remove the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.
+ * preview: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "credential": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "manifest": "my_manifest",
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "outputs": [],
+ * // "selfLink": "my_selfLink",
+ * // "target": {},
+ * // "update": {},
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.patch
* @memberOf! ()
*
@@ -2350,6 +3298,67 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.deployments.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.setIamPolicy
* @memberOf! ()
*
@@ -2424,6 +3433,82 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.deployments.stop
* @desc Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.stop({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.stop
* @memberOf! ()
*
@@ -2499,6 +3584,60 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.deployments.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.testIamPermissions
* @memberOf! ()
*
@@ -2579,6 +3718,101 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.deployments.update
* @desc Updates a deployment and all of the resources described by the deployment manifest.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.update({
+ * // Sets the policy to use for creating new resources.
+ * createPolicy: 'placeholder-value',
+ * // Sets the policy to use for deleting resources.
+ * deletePolicy: 'placeholder-value',
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // If set to true, updates the deployment and creates and updates the "shell" resources but does not actually alter or instantiate these resources. This allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a target.config with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request with the update() or you can cancelPreview() to remove the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.
+ * preview: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "credential": {},
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "manifest": "my_manifest",
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "outputs": [],
+ * // "selfLink": "my_selfLink",
+ * // "target": {},
+ * // "update": {},
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.update
* @memberOf! ()
*
@@ -2918,6 +4152,63 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.manifests.get
* @desc Gets information about a specific manifest.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.manifests.get({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The name of the manifest for this request.
+ * manifest: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "config": {},
+ * // "expandedConfig": "my_expandedConfig",
+ * // "id": "my_id",
+ * // "imports": [],
+ * // "insertTime": "my_insertTime",
+ * // "layout": "my_layout",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.manifests.get
* @memberOf! ()
*
@@ -2991,6 +4282,73 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.manifests.list
* @desc Lists all manifests for a given deployment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.manifests.list({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "manifests": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.manifests.list
* @memberOf! ()
*
@@ -3129,6 +4487,76 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.operations.get
* @desc Gets information about a specific operation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.operations.get({
+ * // The name of the operation for this request.
+ * operation: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.operations.get
* @memberOf! ()
*
@@ -3203,6 +4631,71 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.operations.list
* @desc Lists all operations for a project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.operations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.operations.list
* @memberOf! ()
*
@@ -3332,6 +4825,69 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.resources.get
* @desc Gets information about a single resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.resources.get({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the resource for this request.
+ * resource: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accessControl": {},
+ * // "finalProperties": "my_finalProperties",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "lastUsedCredential": {},
+ * // "manifest": "my_manifest",
+ * // "name": "my_name",
+ * // "properties": "my_properties",
+ * // "runtimePolicies": [],
+ * // "type": "my_type",
+ * // "update": {},
+ * // "updateTime": "my_updateTime",
+ * // "url": "my_url",
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.resources.get
* @memberOf! ()
*
@@ -3405,6 +4961,73 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.resources.list
* @desc Lists all resources in a given deployment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.resources.list({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.resources.list
* @memberOf! ()
*
@@ -3543,6 +5166,74 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.typeProviders.delete
* @desc Deletes a type provider.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.typeProviders.delete({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the type provider for this request.
+ * typeProvider: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.typeProviders.delete
* @memberOf! ()
*
@@ -3618,6 +5309,64 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.typeProviders.get
* @desc Gets information about a specific type provider.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.typeProviders.get({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the type provider for this request.
+ * typeProvider: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "collectionOverrides": [],
+ * // "credential": {},
+ * // "description": "my_description",
+ * // "descriptorUrl": "my_descriptorUrl",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "options": {},
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.typeProviders.get
* @memberOf! ()
*
@@ -3693,6 +5442,62 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.typeProviders.getType
* @desc Gets a type info for a type provided by a TypeProvider.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.typeProviders.getType({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the type provider type for this request.
+ * type: 'placeholder-value',
+ * // The name of the type provider for this request.
+ * typeProvider: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "description": "my_description",
+ * // "documentationLink": "my_documentationLink",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "schema": {},
+ * // "selfLink": "my_selfLink",
+ * // "title": "my_title"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.typeProviders.getType
* @memberOf! ()
*
@@ -3767,6 +5572,90 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.typeProviders.insert
* @desc Creates a type provider.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.typeProviders.insert({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "collectionOverrides": [],
+ * // "credential": {},
+ * // "description": "my_description",
+ * // "descriptorUrl": "my_descriptorUrl",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "options": {},
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.typeProviders.insert
* @memberOf! ()
*
@@ -3842,6 +5731,71 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.typeProviders.list
* @desc Lists all resource type providers for Deployment Manager.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.typeProviders.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "typeProviders": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.typeProviders.list
* @memberOf! ()
*
@@ -3927,6 +5881,73 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.typeProviders.listTypes
* @desc Lists all the type info for a TypeProvider.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.typeProviders.listTypes({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the type provider for this request.
+ * typeProvider: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "types": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.typeProviders.listTypes
* @memberOf! ()
*
@@ -4015,6 +6036,92 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.typeProviders.patch
* @desc Updates a type provider. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.typeProviders.patch({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the type provider for this request.
+ * typeProvider: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "collectionOverrides": [],
+ * // "credential": {},
+ * // "description": "my_description",
+ * // "descriptorUrl": "my_descriptorUrl",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "options": {},
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.typeProviders.patch
* @memberOf! ()
*
@@ -4091,6 +6198,92 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.typeProviders.update
* @desc Updates a type provider.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.typeProviders.update({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the type provider for this request.
+ * typeProvider: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "collectionOverrides": [],
+ * // "credential": {},
+ * // "description": "my_description",
+ * // "descriptorUrl": "my_descriptorUrl",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "options": {},
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.typeProviders.update
* @memberOf! ()
*
@@ -4346,6 +6539,74 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.types.delete
* @desc Deletes a type and all of the resources in the type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.types.delete({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the type for this request.
+ * type: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.types.delete
* @memberOf! ()
*
@@ -4420,6 +6681,61 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.types.get
* @desc Gets information about a specific type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.types.get({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the type for this request.
+ * type: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "configurableService": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.types.get
* @memberOf! ()
*
@@ -4492,6 +6808,87 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.types.insert
* @desc Creates a type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.types.insert({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "configurableService": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.types.insert
* @memberOf! ()
*
@@ -4566,6 +6963,71 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.types.list
* @desc Lists all resource types for Deployment Manager.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.types.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "types": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.types.list
* @memberOf! ()
*
@@ -4643,6 +7105,89 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.types.patch
* @desc Updates a type. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.types.patch({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the type for this request.
+ * type: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "configurableService": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.types.patch
* @memberOf! ()
*
@@ -4718,6 +7263,89 @@ export namespace deploymentmanager_alpha {
/**
* deploymentmanager.types.update
* @desc Updates a type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('alpha');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.types.update({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the type for this request.
+ * type: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "configurableService": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.types.update
* @memberOf! ()
*
diff --git a/src/apis/deploymentmanager/v2.ts b/src/apis/deploymentmanager/v2.ts
index f5161cfa203..4ef3de0e41b 100644
--- a/src/apis/deploymentmanager/v2.ts
+++ b/src/apis/deploymentmanager/v2.ts
@@ -784,62 +784,81 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.deployments.cancelPreview
* @desc Cancels and removes the preview currently associated with the deployment.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
*
- * // The name of the deployment for this request.
- * deployment: 'my-deployment', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.cancelPreview({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * deploymentManager.deployments.cancelPreview(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias deploymentmanager.deployments.cancelPreview
* @memberOf! ()
*
@@ -917,58 +936,75 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.deployments.delete
* @desc Deletes a deployment and all of the resources in the deployment.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // The name of the deployment for this request.
- * deployment: 'my-deployment', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
*
- * deploymentManager.deployments.delete(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.delete({
+ * // Sets the policy to use for deleting resources.
+ * deletePolicy: 'placeholder-value',
+ * // The name of the deployment for this request.
+ * deployment: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias deploymentmanager.deployments.delete
* @memberOf! ()
*
@@ -1046,58 +1082,64 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.deployments.get
* @desc Gets information about a specific deployment.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // The name of the deployment for this request.
- * deployment: 'my-deployment', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
*
- * deploymentManager.deployments.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.get({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "manifest": "my_manifest",
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink",
+ * // "target": {},
+ * // "update": {},
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias deploymentmanager.deployments.get
* @memberOf! ()
*
@@ -1173,58 +1215,56 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.deployments.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
*
- * deploymentManager.deployments.getIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.getIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias deploymentmanager.deployments.getIamPolicy
* @memberOf! ()
*
@@ -1299,59 +1339,94 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.deployments.insert
* @desc Creates a deployment and all of the resources described by the deployment manifest.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * resource: {
- * // TODO: Add desired properties to the request body.
- * },
- *
- * auth: authClient,
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
*
- * deploymentManager.deployments.insert(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.insert({
+ * // Sets the policy to use for creating new resources.
+ * createPolicy: 'placeholder-value',
+ * // If set to true, creates a deployment and creates "shell" resources but does not actually instantiate these resources. This allows you to preview what your deployment looks like. After previewing a deployment, you can deploy your resources by making a request with the update() method or you can use the cancelPreview() method to cancel the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.
+ * preview: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "manifest": "my_manifest",
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink",
+ * // "target": {},
+ * // "update": {},
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias deploymentmanager.deployments.insert
* @memberOf! ()
*
@@ -1430,68 +1505,70 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.deployments.list
* @desc Lists all deployments for a given project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var deploymentsPage = response['deployments'];
- * if (!deploymentsPage) {
- * return;
- * }
- * for (var i = 0; i < deploymentsPage.length; i++) {
- * // TODO: Change code below to process each resource in `deploymentsPage`:
- * console.log(JSON.stringify(deploymentsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * deploymentManager.deployments.list(request, handlePage);
- * }
- * };
- *
- * deploymentManager.deployments.list(request, handlePage);
- * });
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deployments": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.list
* @memberOf! ()
*
@@ -1572,63 +1649,98 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.deployments.patch
* @desc Updates a deployment and all of the resources described by the deployment manifest. This method supports patch semantics.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
*
- * // The name of the deployment for this request.
- * deployment: 'my-deployment', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body. Only these properties
- * // will be changed.
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.patch({
+ * // Sets the policy to use for creating new resources.
+ * createPolicy: 'placeholder-value',
+ * // Sets the policy to use for deleting resources.
+ * deletePolicy: 'placeholder-value',
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // If set to true, updates the deployment and creates and updates the "shell" resources but does not actually alter or instantiate these resources. This allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a target.config with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request with the update() or you can cancelPreview() to remove the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.
+ * preview: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "manifest": "my_manifest",
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink",
+ * // "target": {},
+ * // "update": {},
+ * // "updateTime": "my_updateTime"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * deploymentManager.deployments.patch(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias deploymentmanager.deployments.patch
* @memberOf! ()
*
@@ -1709,62 +1821,66 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.deployments.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
*
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * deploymentManager.deployments.setIamPolicy(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias deploymentmanager.deployments.setIamPolicy
* @memberOf! ()
*
@@ -1840,62 +1956,81 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.deployments.stop
* @desc Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
*
- * // The name of the deployment for this request.
- * deployment: 'my-deployment', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.stop({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * deploymentManager.deployments.stop(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias deploymentmanager.deployments.stop
* @memberOf! ()
*
@@ -1972,62 +2107,59 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.deployments.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // Project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
*
- * // Name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body.
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
* },
+ * });
+ * console.log(res.data);
*
- * auth: authClient,
- * };
- *
- * deploymentManager.deployments.testIamPermissions(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
- * });
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias deploymentmanager.deployments.testIamPermissions
* @memberOf! ()
*
@@ -2109,63 +2241,98 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.deployments.update
* @desc Updates a deployment and all of the resources described by the deployment manifest.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
*
- * // The name of the deployment for this request.
- * deployment: 'my-deployment', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * resource: {
- * // TODO: Add desired properties to the request body. All existing properties
- * // will be replaced.
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.update({
+ * // Sets the policy to use for creating new resources.
+ * createPolicy: 'placeholder-value',
+ * // Sets the policy to use for deleting resources.
+ * deletePolicy: 'placeholder-value',
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // If set to true, updates the deployment and creates and updates the "shell" resources but does not actually alter or instantiate these resources. This allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a target.config with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request with the update() or you can cancelPreview() to remove the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.
+ * preview: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "manifest": "my_manifest",
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink",
+ * // "target": {},
+ * // "update": {},
+ * // "updateTime": "my_updateTime"
+ * // }
* },
- *
- * auth: authClient,
- * };
- *
- * deploymentManager.deployments.update(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias deploymentmanager.deployments.update
* @memberOf! ()
*
@@ -2506,61 +2673,62 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.manifests.get
* @desc Gets information about a specific manifest.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
*
- * // The name of the deployment for this request.
- * deployment: 'my-deployment', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await deploymentmanager.manifests.get({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
* // The name of the manifest for this request.
- * manifest: 'my-manifest', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * deploymentManager.manifests.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * manifest: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "config": {},
+ * // "expandedConfig": "my_expandedConfig",
+ * // "id": "my_id",
+ * // "imports": [],
+ * // "insertTime": "my_insertTime",
+ * // "layout": "my_layout",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias deploymentmanager.manifests.get
* @memberOf! ()
*
@@ -2635,71 +2803,72 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.manifests.list
* @desc Lists all manifests for a given deployment.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
*
- * // The name of the deployment for this request.
- * deployment: 'my-deployment', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var manifestsPage = response['manifests'];
- * if (!manifestsPage) {
- * return;
- * }
- * for (var i = 0; i < manifestsPage.length; i++) {
- * // TODO: Change code below to process each resource in `manifestsPage`:
- * console.log(JSON.stringify(manifestsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * deploymentManager.manifests.list(request, handlePage);
- * }
- * };
- *
- * deploymentManager.manifests.list(request, handlePage);
- * });
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
+ * // Do the magic
+ * const res = await deploymentmanager.manifests.list({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "manifests": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.manifests.list
* @memberOf! ()
*
@@ -2839,58 +3008,75 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.operations.get
* @desc Gets information about a specific operation.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * // The name of the operation for this request.
- * operation: 'my-operation', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
*
- * deploymentManager.operations.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * // Do the magic
+ * const res = await deploymentmanager.operations.get({
+ * // The name of the operation for this request.
+ * operation: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias deploymentmanager.operations.get
* @memberOf! ()
*
@@ -2966,68 +3152,70 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.operations.list
* @desc Lists all operations for a project.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var operationsPage = response['operations'];
- * if (!operationsPage) {
- * return;
- * }
- * for (var i = 0; i < operationsPage.length; i++) {
- * // TODO: Change code below to process each resource in `operationsPage`:
- * console.log(JSON.stringify(operationsPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * deploymentManager.operations.list(request, handlePage);
- * }
- * };
- *
- * deploymentManager.operations.list(request, handlePage);
- * });
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.operations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.operations.list
* @memberOf! ()
*
@@ -3158,61 +3346,66 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.resources.get
* @desc Gets information about a single resource.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
*
- * // The name of the deployment for this request.
- * deployment: 'my-deployment', // TODO: Update placeholder value.
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
+ * // Do the magic
+ * const res = await deploymentmanager.resources.get({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* // The name of the resource for this request.
- * resource_: 'my-resource', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * deploymentManager.resources.get(request, function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * // TODO: Change code below to process the `response` object:
- * console.log(JSON.stringify(response, null, 2));
+ * resource: 'placeholder-value',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accessControl": {},
+ * // "finalProperties": "my_finalProperties",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "manifest": "my_manifest",
+ * // "name": "my_name",
+ * // "properties": "my_properties",
+ * // "type": "my_type",
+ * // "update": {},
+ * // "updateTime": "my_updateTime",
+ * // "url": "my_url",
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
* });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
- * });
- * }
* @alias deploymentmanager.resources.get
* @memberOf! ()
*
@@ -3287,71 +3480,72 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.resources.list
* @desc Lists all resources in a given deployment.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
*
- * // The name of the deployment for this request.
- * deployment: 'my-deployment', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var resourcesPage = response['resources'];
- * if (!resourcesPage) {
- * return;
- * }
- * for (var i = 0; i < resourcesPage.length; i++) {
- * // TODO: Change code below to process each resource in `resourcesPage`:
- * console.log(JSON.stringify(resourcesPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * deploymentManager.resources.list(request, handlePage);
- * }
- * };
- *
- * deploymentManager.resources.list(request, handlePage);
- * });
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
+ * // Do the magic
+ * const res = await deploymentmanager.resources.list({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.resources.list
* @memberOf! ()
*
@@ -3491,68 +3685,70 @@ export namespace deploymentmanager_v2 {
* deploymentmanager.types.list
* @desc Lists all resource types for Deployment Manager.
* @example
- * * // BEFORE RUNNING:
- * // ---------------
- * // 1. If not already done, enable the Google Cloud Deployment Manager API
- * // and check the quota for your project at
- * // https://console.developers.google.com/apis/api/deploymentmanager
- * // 2. This sample uses Application Default Credentials for authentication.
- * // If not already done, install the gcloud CLI from
- * // https://cloud.google.com/sdk and run
- * // `gcloud beta auth application-default login`.
- * // For more information, see
- * // https://developers.google.com/identity/protocols/application-default-credentials
- * // 3. Install the Node.js client library by running
- * // `npm install googleapis --save`
- *
- * var google = require('googleapis');
- * var deploymentManager = google.deploymentmanager('v2');
- *
- * authorize(function(authClient) {
- * var request = {
- * // The project ID for this request.
- * project: 'my-project', // TODO: Update placeholder value.
- *
- * auth: authClient,
- * };
- *
- * var handlePage = function(err, response) {
- * if (err) {
- * console.error(err);
- * return;
- * }
- *
- * var typesPage = response['types'];
- * if (!typesPage) {
- * return;
- * }
- * for (var i = 0; i < typesPage.length; i++) {
- * // TODO: Change code below to process each resource in `typesPage`:
- * console.log(JSON.stringify(typesPage[i], null, 2));
- * }
- *
- * if (response.nextPageToken) {
- * request.pageToken = response.nextPageToken;
- * deploymentManager.types.list(request, handlePage);
- * }
- * };
- *
- * deploymentManager.types.list(request, handlePage);
- * });
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
*
- * function authorize(callback) {
- * google.auth.getApplicationDefault(function(err, authClient) {
- * if (err) {
- * console.error('authentication failed: ', err);
- * return;
- * }
- * if (authClient.createScopedRequired && authClient.createScopedRequired()) {
- * var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
- * authClient = authClient.createScoped(scopes);
- * }
- * callback(authClient);
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.types.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
* });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "types": []
+ * // }
* }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.types.list
* @memberOf! ()
*
diff --git a/src/apis/deploymentmanager/v2beta.ts b/src/apis/deploymentmanager/v2beta.ts
index 58dc9dcb1e4..786ea54d5f3 100644
--- a/src/apis/deploymentmanager/v2beta.ts
+++ b/src/apis/deploymentmanager/v2beta.ts
@@ -1166,6 +1166,74 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.compositeTypes.delete
* @desc Deletes a composite type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.compositeTypes.delete({
+ * // The name of the type for this request.
+ * compositeType: '[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.compositeTypes.delete
* @memberOf! ()
*
@@ -1241,6 +1309,62 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.compositeTypes.get
* @desc Gets information about a specific composite type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.compositeTypes.get({
+ * // The name of the composite type for this request.
+ * compositeType: '[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "templateContents": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.compositeTypes.get
* @memberOf! ()
*
@@ -1316,6 +1440,88 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.compositeTypes.insert
* @desc Creates a composite type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.compositeTypes.insert({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "templateContents": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.compositeTypes.insert
* @memberOf! ()
*
@@ -1391,6 +1597,71 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.compositeTypes.list
* @desc Lists all composite types for Deployment Manager.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.compositeTypes.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "compositeTypes": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.compositeTypes.list
* @memberOf! ()
*
@@ -1476,6 +1747,90 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.compositeTypes.patch
* @desc Updates a composite type. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.compositeTypes.patch({
+ * // The name of the composite type for this request.
+ * compositeType: '[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "templateContents": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.compositeTypes.patch
* @memberOf! ()
*
@@ -1552,6 +1907,90 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.compositeTypes.update
* @desc Updates a composite type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.compositeTypes.update({
+ * // The name of the composite type for this request.
+ * compositeType: '[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink",
+ * // "status": "my_status",
+ * // "templateContents": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.compositeTypes.update
* @memberOf! ()
*
@@ -1755,6 +2194,82 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.deployments.cancelPreview
* @desc Cancels and removes the preview currently associated with the deployment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.cancelPreview({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.cancelPreview
* @memberOf! ()
*
@@ -1831,6 +2346,76 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.deployments.delete
* @desc Deletes a deployment and all of the resources in the deployment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.delete({
+ * // Sets the policy to use for deleting resources.
+ * deletePolicy: 'placeholder-value',
+ * // The name of the deployment for this request.
+ * deployment: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.delete
* @memberOf! ()
*
@@ -1907,6 +2492,65 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.deployments.get
* @desc Gets information about a specific deployment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.get({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "manifest": "my_manifest",
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink",
+ * // "target": {},
+ * // "update": {},
+ * // "updateTime": "my_updateTime"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.get
* @memberOf! ()
*
@@ -1981,6 +2625,57 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.deployments.getIamPolicy
* @desc Gets the access control policy for a resource. May be empty if no such policy or resource exists.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.getIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.getIamPolicy
* @memberOf! ()
*
@@ -2054,6 +2749,95 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.deployments.insert
* @desc Creates a deployment and all of the resources described by the deployment manifest.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.insert({
+ * // Sets the policy to use for creating new resources.
+ * createPolicy: 'placeholder-value',
+ * // If set to true, creates a deployment and creates "shell" resources but does not actually instantiate these resources. This allows you to preview what your deployment looks like. After previewing a deployment, you can deploy your resources by making a request with the update() method or you can use the cancelPreview() method to cancel the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.
+ * preview: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "manifest": "my_manifest",
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink",
+ * // "target": {},
+ * // "update": {},
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.insert
* @memberOf! ()
*
@@ -2131,6 +2915,71 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.deployments.list
* @desc Lists all deployments for a given project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "deployments": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.list
* @memberOf! ()
*
@@ -2210,6 +3059,99 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.deployments.patch
* @desc Updates a deployment and all of the resources described by the deployment manifest. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.patch({
+ * // Sets the policy to use for creating new resources.
+ * createPolicy: 'placeholder-value',
+ * // Sets the policy to use for deleting resources.
+ * deletePolicy: 'placeholder-value',
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // If set to true, updates the deployment and creates and updates the "shell" resources but does not actually alter or instantiate these resources. This allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a target.config with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request with the update() or you can cancelPreview() to remove the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.
+ * preview: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "manifest": "my_manifest",
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink",
+ * // "target": {},
+ * // "update": {},
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.patch
* @memberOf! ()
*
@@ -2289,6 +3231,67 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.deployments.setIamPolicy
* @desc Sets the access control policy on the specified resource. Replaces any existing policy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.setIamPolicy({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "policy": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "auditConfigs": [],
+ * // "bindings": [],
+ * // "etag": "my_etag",
+ * // "iamOwned": false,
+ * // "rules": [],
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.setIamPolicy
* @memberOf! ()
*
@@ -2363,6 +3366,82 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.deployments.stop
* @desc Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.stop({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "fingerprint": "my_fingerprint"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.stop
* @memberOf! ()
*
@@ -2438,6 +3517,60 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.deployments.testIamPermissions
* @desc Returns permissions that a caller has on the specified resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.testIamPermissions({
+ * // Project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // Name or id of the resource for this request.
+ * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "permissions": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "permissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.testIamPermissions
* @memberOf! ()
*
@@ -2518,6 +3651,99 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.deployments.update
* @desc Updates a deployment and all of the resources described by the deployment manifest.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.deployments.update({
+ * // Sets the policy to use for creating new resources.
+ * createPolicy: 'placeholder-value',
+ * // Sets the policy to use for deleting resources.
+ * deletePolicy: 'placeholder-value',
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // If set to true, updates the deployment and creates and updates the "shell" resources but does not actually alter or instantiate these resources. This allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a target.config with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request with the update() or you can cancelPreview() to remove the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.
+ * preview: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "description": "my_description",
+ * // "fingerprint": "my_fingerprint",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "manifest": "my_manifest",
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "selfLink": "my_selfLink",
+ * // "target": {},
+ * // "update": {},
+ * // "updateTime": "my_updateTime"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.deployments.update
* @memberOf! ()
*
@@ -2857,6 +4083,63 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.manifests.get
* @desc Gets information about a specific manifest.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.manifests.get({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The name of the manifest for this request.
+ * manifest: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "config": {},
+ * // "expandedConfig": "my_expandedConfig",
+ * // "id": "my_id",
+ * // "imports": [],
+ * // "insertTime": "my_insertTime",
+ * // "layout": "my_layout",
+ * // "name": "my_name",
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.manifests.get
* @memberOf! ()
*
@@ -2930,6 +4213,73 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.manifests.list
* @desc Lists all manifests for a given deployment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.manifests.list({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "manifests": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.manifests.list
* @memberOf! ()
*
@@ -3068,6 +4418,76 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.operations.get
* @desc Gets information about a specific operation.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.operations.get({
+ * // The name of the operation for this request.
+ * operation: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.operations.get
* @memberOf! ()
*
@@ -3142,6 +4562,71 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.operations.list
* @desc Lists all operations for a project.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.operations.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "operations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.operations.list
* @memberOf! ()
*
@@ -3271,6 +4756,67 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.resources.get
* @desc Gets information about a single resource.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.resources.get({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the resource for this request.
+ * resource: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accessControl": {},
+ * // "finalProperties": "my_finalProperties",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "manifest": "my_manifest",
+ * // "name": "my_name",
+ * // "properties": "my_properties",
+ * // "type": "my_type",
+ * // "update": {},
+ * // "updateTime": "my_updateTime",
+ * // "url": "my_url",
+ * // "warnings": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.resources.get
* @memberOf! ()
*
@@ -3344,6 +4890,73 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.resources.list
* @desc Lists all resources in a given deployment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.resources.list({
+ * // The name of the deployment for this request.
+ * deployment: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "resources": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.resources.list
* @memberOf! ()
*
@@ -3482,6 +5095,74 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.typeProviders.delete
* @desc Deletes a type provider.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.typeProviders.delete({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the type provider for this request.
+ * typeProvider: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.typeProviders.delete
* @memberOf! ()
*
@@ -3557,6 +5238,64 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.typeProviders.get
* @desc Gets information about a specific type provider.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.typeProviders.get({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the type provider for this request.
+ * typeProvider: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "collectionOverrides": [],
+ * // "credential": {},
+ * // "description": "my_description",
+ * // "descriptorUrl": "my_descriptorUrl",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "options": {},
+ * // "selfLink": "my_selfLink"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.typeProviders.get
* @memberOf! ()
*
@@ -3632,6 +5371,62 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.typeProviders.getType
* @desc Gets a type info for a type provided by a TypeProvider.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.typeProviders.getType({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the type provider type for this request.
+ * type: 'placeholder-value',
+ * // The name of the type provider for this request.
+ * typeProvider: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "description": "my_description",
+ * // "documentationLink": "my_documentationLink",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "schema": {},
+ * // "selfLink": "my_selfLink",
+ * // "title": "my_title"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.typeProviders.getType
* @memberOf! ()
*
@@ -3706,6 +5501,90 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.typeProviders.insert
* @desc Creates a type provider.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.typeProviders.insert({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "collectionOverrides": [],
+ * // "credential": {},
+ * // "description": "my_description",
+ * // "descriptorUrl": "my_descriptorUrl",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "options": {},
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.typeProviders.insert
* @memberOf! ()
*
@@ -3781,6 +5660,71 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.typeProviders.list
* @desc Lists all resource type providers for Deployment Manager.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.typeProviders.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "typeProviders": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.typeProviders.list
* @memberOf! ()
*
@@ -3866,6 +5810,73 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.typeProviders.listTypes
* @desc Lists all the type info for a TypeProvider.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.typeProviders.listTypes({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the type provider for this request.
+ * typeProvider: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "types": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.typeProviders.listTypes
* @memberOf! ()
*
@@ -3954,6 +5965,92 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.typeProviders.patch
* @desc Updates a type provider. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.typeProviders.patch({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the type provider for this request.
+ * typeProvider: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "collectionOverrides": [],
+ * // "credential": {},
+ * // "description": "my_description",
+ * // "descriptorUrl": "my_descriptorUrl",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "options": {},
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.typeProviders.patch
* @memberOf! ()
*
@@ -4030,6 +6127,92 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.typeProviders.update
* @desc Updates a type provider.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.typeProviders.update({
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * // The name of the type provider for this request.
+ * typeProvider: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "collectionOverrides": [],
+ * // "credential": {},
+ * // "description": "my_description",
+ * // "descriptorUrl": "my_descriptorUrl",
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "labels": [],
+ * // "name": "my_name",
+ * // "operation": {},
+ * // "options": {},
+ * // "selfLink": "my_selfLink"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "clientOperationId": "my_clientOperationId",
+ * // "creationTimestamp": "my_creationTimestamp",
+ * // "description": "my_description",
+ * // "endTime": "my_endTime",
+ * // "error": {},
+ * // "httpErrorMessage": "my_httpErrorMessage",
+ * // "httpErrorStatusCode": 0,
+ * // "id": "my_id",
+ * // "insertTime": "my_insertTime",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "operationType": "my_operationType",
+ * // "progress": 0,
+ * // "region": "my_region",
+ * // "selfLink": "my_selfLink",
+ * // "startTime": "my_startTime",
+ * // "status": "my_status",
+ * // "statusMessage": "my_statusMessage",
+ * // "targetId": "my_targetId",
+ * // "targetLink": "my_targetLink",
+ * // "user": "my_user",
+ * // "warnings": [],
+ * // "zone": "my_zone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.typeProviders.update
* @memberOf! ()
*
@@ -4285,6 +6468,71 @@ export namespace deploymentmanager_v2beta {
/**
* deploymentmanager.types.list
* @desc Lists all resource types for Deployment Manager.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/deploymentmanager.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const deploymentmanager = google.deploymentmanager('v2beta');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
+ * 'https://www.googleapis.com/auth/ndev.cloudman',
+ * 'https://www.googleapis.com/auth/ndev.cloudman.readonly',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await deploymentmanager.types.list({
+ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+ * //
+ * // For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+ * //
+ * // You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+ * //
+ * // To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+ * filter: 'placeholder-value',
+ * // The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
+ * maxResults: 'placeholder-value',
+ * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
+ * //
+ * // You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+ * //
+ * // Currently, only sorting by name or creationTimestamp desc is supported.
+ * orderBy: 'placeholder-value',
+ * // Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
+ * pageToken: 'placeholder-value',
+ * // The project ID for this request.
+ * project:
+ * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "types": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias deploymentmanager.types.list
* @memberOf! ()
*
diff --git a/src/apis/dfareporting/v3.3.ts b/src/apis/dfareporting/v3.3.ts
index 9af75afece6..a4bc0f3ac5c 100644
--- a/src/apis/dfareporting/v3.3.ts
+++ b/src/apis/dfareporting/v3.3.ts
@@ -6477,6 +6477,52 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.accountActiveAdSummaries.get
* @desc Gets the account's active ad summary by account ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountActiveAdSummaries.get({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Account ID.
+ * summaryAccountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "activeAds": "my_activeAds",
+ * // "activeAdsLimitTier": "my_activeAdsLimitTier",
+ * // "availableAds": "my_availableAds",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountActiveAdSummaries.get
* @memberOf! ()
*
@@ -6578,6 +6624,50 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.accountPermissionGroups.get
* @desc Gets one account permission group by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountPermissionGroups.get({
+ * // Account permission group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountPermissionGroups.get
* @memberOf! ()
*
@@ -6655,6 +6745,47 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.accountPermissionGroups.list
* @desc Retrieves the list of account permission groups.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountPermissionGroups.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountPermissionGroups": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountPermissionGroups.list
* @memberOf! ()
*
@@ -6776,6 +6907,53 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.accountPermissions.get
* @desc Gets one account permission by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountPermissions.get({
+ * // Account permission ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountProfiles": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "level": "my_level",
+ * // "name": "my_name",
+ * // "permissionGroupId": "my_permissionGroupId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountPermissions.get
* @memberOf! ()
*
@@ -6851,6 +7029,47 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.accountPermissions.list
* @desc Retrieves the list of account permissions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountPermissions.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountPermissions": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountPermissions.list
* @memberOf! ()
*
@@ -6970,6 +7189,66 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.accounts.get
* @desc Gets one account by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accounts.get({
+ * // Account ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountPermissionIds": [],
+ * // "accountProfile": "my_accountProfile",
+ * // "active": false,
+ * // "activeAdsLimitTier": "my_activeAdsLimitTier",
+ * // "activeViewOptOut": false,
+ * // "availablePermissionIds": [],
+ * // "countryId": "my_countryId",
+ * // "currencyId": "my_currencyId",
+ * // "defaultCreativeSizeId": "my_defaultCreativeSizeId",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "maximumImageSize": "my_maximumImageSize",
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "reportsConfiguration": {},
+ * // "shareReportsWithTwitter": false,
+ * // "teaserSizeLimit": "my_teaserSizeLimit"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accounts.get
* @memberOf! ()
*
@@ -7042,6 +7321,62 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.accounts.list
* @desc Retrieves the list of accounts, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accounts.list({
+ * // Select only active accounts. Don't set this field to select both active and non-active accounts.
+ * active: 'placeholder-value',
+ * // Select only accounts with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "account*2015" will return objects with names like "account June 2015", "account April 2015", or simply "account 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "account" will match objects with name "my account", "account 2015", or simply "account".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accounts": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accounts.list
* @memberOf! ()
*
@@ -7123,6 +7458,92 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.accounts.patch
* @desc Updates an existing account. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accounts.patch({
+ * // Account ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountPermissionIds": [],
+ * // "accountProfile": "my_accountProfile",
+ * // "active": false,
+ * // "activeAdsLimitTier": "my_activeAdsLimitTier",
+ * // "activeViewOptOut": false,
+ * // "availablePermissionIds": [],
+ * // "countryId": "my_countryId",
+ * // "currencyId": "my_currencyId",
+ * // "defaultCreativeSizeId": "my_defaultCreativeSizeId",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "maximumImageSize": "my_maximumImageSize",
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "reportsConfiguration": {},
+ * // "shareReportsWithTwitter": false,
+ * // "teaserSizeLimit": "my_teaserSizeLimit"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountPermissionIds": [],
+ * // "accountProfile": "my_accountProfile",
+ * // "active": false,
+ * // "activeAdsLimitTier": "my_activeAdsLimitTier",
+ * // "activeViewOptOut": false,
+ * // "availablePermissionIds": [],
+ * // "countryId": "my_countryId",
+ * // "currencyId": "my_currencyId",
+ * // "defaultCreativeSizeId": "my_defaultCreativeSizeId",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "maximumImageSize": "my_maximumImageSize",
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "reportsConfiguration": {},
+ * // "shareReportsWithTwitter": false,
+ * // "teaserSizeLimit": "my_teaserSizeLimit"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accounts.patch
* @memberOf! ()
*
@@ -7195,6 +7616,90 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.accounts.update
* @desc Updates an existing account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accounts.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountPermissionIds": [],
+ * // "accountProfile": "my_accountProfile",
+ * // "active": false,
+ * // "activeAdsLimitTier": "my_activeAdsLimitTier",
+ * // "activeViewOptOut": false,
+ * // "availablePermissionIds": [],
+ * // "countryId": "my_countryId",
+ * // "currencyId": "my_currencyId",
+ * // "defaultCreativeSizeId": "my_defaultCreativeSizeId",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "maximumImageSize": "my_maximumImageSize",
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "reportsConfiguration": {},
+ * // "shareReportsWithTwitter": false,
+ * // "teaserSizeLimit": "my_teaserSizeLimit"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountPermissionIds": [],
+ * // "accountProfile": "my_accountProfile",
+ * // "active": false,
+ * // "activeAdsLimitTier": "my_activeAdsLimitTier",
+ * // "activeViewOptOut": false,
+ * // "availablePermissionIds": [],
+ * // "countryId": "my_countryId",
+ * // "currencyId": "my_currencyId",
+ * // "defaultCreativeSizeId": "my_defaultCreativeSizeId",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "maximumImageSize": "my_maximumImageSize",
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "reportsConfiguration": {},
+ * // "shareReportsWithTwitter": false,
+ * // "teaserSizeLimit": "my_teaserSizeLimit"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accounts.update
* @memberOf! ()
*
@@ -7364,6 +7869,63 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.accountUserProfiles.get
* @desc Gets one account user profile by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountUserProfiles.get({
+ * // User profile ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserFilter": {},
+ * // "campaignFilter": {},
+ * // "comments": "my_comments",
+ * // "email": "my_email",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "name": "my_name",
+ * // "siteFilter": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerType": "my_traffickerType",
+ * // "userAccessType": "my_userAccessType",
+ * // "userRoleFilter": {},
+ * // "userRoleId": "my_userRoleId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountUserProfiles.get
* @memberOf! ()
*
@@ -7439,6 +8001,84 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.accountUserProfiles.insert
* @desc Inserts a new account user profile.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountUserProfiles.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserFilter": {},
+ * // "campaignFilter": {},
+ * // "comments": "my_comments",
+ * // "email": "my_email",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "name": "my_name",
+ * // "siteFilter": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerType": "my_traffickerType",
+ * // "userAccessType": "my_userAccessType",
+ * // "userRoleFilter": {},
+ * // "userRoleId": "my_userRoleId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserFilter": {},
+ * // "campaignFilter": {},
+ * // "comments": "my_comments",
+ * // "email": "my_email",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "name": "my_name",
+ * // "siteFilter": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerType": "my_traffickerType",
+ * // "userAccessType": "my_userAccessType",
+ * // "userRoleFilter": {},
+ * // "userRoleId": "my_userRoleId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountUserProfiles.insert
* @memberOf! ()
*
@@ -7514,6 +8154,66 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.accountUserProfiles.list
* @desc Retrieves a list of account user profiles, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountUserProfiles.list({
+ * // Select only active user profiles.
+ * active: 'placeholder-value',
+ * // Select only user profiles with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name, ID or email. Wildcards (*) are allowed. For example, "user profile*2015" will return objects with names like "user profile June 2015", "user profile April 2015", or simply "user profile 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "user profile" will match objects with name "my user profile", "user profile 2015", or simply "user profile".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only user profiles with the specified subaccount ID.
+ * subaccountId: 'placeholder-value',
+ * // Select only user profiles with the specified user role ID.
+ * userRoleId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountUserProfiles": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountUserProfiles.list
* @memberOf! ()
*
@@ -7606,6 +8306,86 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.accountUserProfiles.patch
* @desc Updates an existing account user profile. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountUserProfiles.patch({
+ * // User profile ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserFilter": {},
+ * // "campaignFilter": {},
+ * // "comments": "my_comments",
+ * // "email": "my_email",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "name": "my_name",
+ * // "siteFilter": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerType": "my_traffickerType",
+ * // "userAccessType": "my_userAccessType",
+ * // "userRoleFilter": {},
+ * // "userRoleId": "my_userRoleId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserFilter": {},
+ * // "campaignFilter": {},
+ * // "comments": "my_comments",
+ * // "email": "my_email",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "name": "my_name",
+ * // "siteFilter": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerType": "my_traffickerType",
+ * // "userAccessType": "my_userAccessType",
+ * // "userRoleFilter": {},
+ * // "userRoleId": "my_userRoleId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountUserProfiles.patch
* @memberOf! ()
*
@@ -7682,6 +8462,84 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.accountUserProfiles.update
* @desc Updates an existing account user profile.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountUserProfiles.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserFilter": {},
+ * // "campaignFilter": {},
+ * // "comments": "my_comments",
+ * // "email": "my_email",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "name": "my_name",
+ * // "siteFilter": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerType": "my_traffickerType",
+ * // "userAccessType": "my_userAccessType",
+ * // "userRoleFilter": {},
+ * // "userRoleId": "my_userRoleId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserFilter": {},
+ * // "campaignFilter": {},
+ * // "comments": "my_comments",
+ * // "email": "my_email",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "name": "my_name",
+ * // "siteFilter": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerType": "my_traffickerType",
+ * // "userAccessType": "my_userAccessType",
+ * // "userRoleFilter": {},
+ * // "userRoleId": "my_userRoleId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountUserProfiles.update
* @memberOf! ()
*
@@ -7884,6 +8742,86 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.ads.get
* @desc Gets one ad by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.ads.get({
+ * // Ad ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentId": "my_audienceSegmentId",
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "clickThroughUrl": {},
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comments": "my_comments",
+ * // "compatibility": "my_compatibility",
+ * // "createInfo": {},
+ * // "creativeGroupAssignments": [],
+ * // "creativeRotation": {},
+ * // "dayPartTargeting": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "deliverySchedule": {},
+ * // "dynamicClickTracker": false,
+ * // "endTime": "my_endTime",
+ * // "eventTagOverrides": [],
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementAssignments": [],
+ * // "remarketingListExpression": {},
+ * // "size": {},
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "startTime": "my_startTime",
+ * // "subaccountId": "my_subaccountId",
+ * // "targetingTemplateId": "my_targetingTemplateId",
+ * // "technologyTargeting": {},
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.ads.get
* @memberOf! ()
*
@@ -7955,6 +8893,130 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.ads.insert
* @desc Inserts a new ad.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.ads.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentId": "my_audienceSegmentId",
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "clickThroughUrl": {},
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comments": "my_comments",
+ * // "compatibility": "my_compatibility",
+ * // "createInfo": {},
+ * // "creativeGroupAssignments": [],
+ * // "creativeRotation": {},
+ * // "dayPartTargeting": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "deliverySchedule": {},
+ * // "dynamicClickTracker": false,
+ * // "endTime": "my_endTime",
+ * // "eventTagOverrides": [],
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementAssignments": [],
+ * // "remarketingListExpression": {},
+ * // "size": {},
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "startTime": "my_startTime",
+ * // "subaccountId": "my_subaccountId",
+ * // "targetingTemplateId": "my_targetingTemplateId",
+ * // "technologyTargeting": {},
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentId": "my_audienceSegmentId",
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "clickThroughUrl": {},
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comments": "my_comments",
+ * // "compatibility": "my_compatibility",
+ * // "createInfo": {},
+ * // "creativeGroupAssignments": [],
+ * // "creativeRotation": {},
+ * // "dayPartTargeting": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "deliverySchedule": {},
+ * // "dynamicClickTracker": false,
+ * // "endTime": "my_endTime",
+ * // "eventTagOverrides": [],
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementAssignments": [],
+ * // "remarketingListExpression": {},
+ * // "size": {},
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "startTime": "my_startTime",
+ * // "subaccountId": "my_subaccountId",
+ * // "targetingTemplateId": "my_targetingTemplateId",
+ * // "technologyTargeting": {},
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.ads.insert
* @memberOf! ()
*
@@ -8026,6 +9088,94 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.ads.list
* @desc Retrieves a list of ads, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.ads.list({
+ * // Select only active ads.
+ * active: 'placeholder-value',
+ * // Select only ads with this advertiser ID.
+ * advertiserId: 'placeholder-value',
+ * // Select only archived ads.
+ * archived: 'placeholder-value',
+ * // Select only ads with these audience segment IDs.
+ * audienceSegmentIds: 'placeholder-value',
+ * // Select only ads with these campaign IDs.
+ * campaignIds: 'placeholder-value',
+ * // Select default ads with the specified compatibility. Applicable when type is AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering an in-stream video ads developed with the VAST standard.
+ * compatibility: 'placeholder-value',
+ * // Select only ads with these creative IDs assigned.
+ * creativeIds: 'placeholder-value',
+ * // Select only ads with these creative optimization configuration IDs.
+ * creativeOptimizationConfigurationIds: 'placeholder-value',
+ * // Select only dynamic click trackers. Applicable when type is AD_SERVING_CLICK_TRACKER. If true, select dynamic click trackers. If false, select static click trackers. Leave unset to select both.
+ * dynamicClickTracker: 'placeholder-value',
+ * // Select only ads with these IDs.
+ * ids: 'placeholder-value',
+ * // Select only ads with these landing page IDs.
+ * landingPageIds: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Select only ads with this event tag override ID.
+ * overriddenEventTagId: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // Select only ads with these placement IDs assigned.
+ * placementIds: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Select only ads whose list targeting expression use these remarketing list IDs.
+ * remarketingListIds: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "ad*2015" will return objects with names like "ad June 2015", "ad April 2015", or simply "ad 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "ad" will match objects with name "my ad", "ad 2015", or simply "ad".
+ * searchString: 'placeholder-value',
+ * // Select only ads with these size IDs.
+ * sizeIds: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only ads that are SSL-compliant.
+ * sslCompliant: 'placeholder-value',
+ * // Select only ads that require SSL.
+ * sslRequired: 'placeholder-value',
+ * // Select only ads with these types.
+ * type: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "ads": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.ads.list
* @memberOf! ()
*
@@ -8121,6 +9271,132 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.ads.patch
* @desc Updates an existing ad. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.ads.patch({
+ * // Ad ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentId": "my_audienceSegmentId",
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "clickThroughUrl": {},
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comments": "my_comments",
+ * // "compatibility": "my_compatibility",
+ * // "createInfo": {},
+ * // "creativeGroupAssignments": [],
+ * // "creativeRotation": {},
+ * // "dayPartTargeting": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "deliverySchedule": {},
+ * // "dynamicClickTracker": false,
+ * // "endTime": "my_endTime",
+ * // "eventTagOverrides": [],
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementAssignments": [],
+ * // "remarketingListExpression": {},
+ * // "size": {},
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "startTime": "my_startTime",
+ * // "subaccountId": "my_subaccountId",
+ * // "targetingTemplateId": "my_targetingTemplateId",
+ * // "technologyTargeting": {},
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentId": "my_audienceSegmentId",
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "clickThroughUrl": {},
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comments": "my_comments",
+ * // "compatibility": "my_compatibility",
+ * // "createInfo": {},
+ * // "creativeGroupAssignments": [],
+ * // "creativeRotation": {},
+ * // "dayPartTargeting": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "deliverySchedule": {},
+ * // "dynamicClickTracker": false,
+ * // "endTime": "my_endTime",
+ * // "eventTagOverrides": [],
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementAssignments": [],
+ * // "remarketingListExpression": {},
+ * // "size": {},
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "startTime": "my_startTime",
+ * // "subaccountId": "my_subaccountId",
+ * // "targetingTemplateId": "my_targetingTemplateId",
+ * // "technologyTargeting": {},
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.ads.patch
* @memberOf! ()
*
@@ -8193,6 +9469,130 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.ads.update
* @desc Updates an existing ad.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.ads.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentId": "my_audienceSegmentId",
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "clickThroughUrl": {},
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comments": "my_comments",
+ * // "compatibility": "my_compatibility",
+ * // "createInfo": {},
+ * // "creativeGroupAssignments": [],
+ * // "creativeRotation": {},
+ * // "dayPartTargeting": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "deliverySchedule": {},
+ * // "dynamicClickTracker": false,
+ * // "endTime": "my_endTime",
+ * // "eventTagOverrides": [],
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementAssignments": [],
+ * // "remarketingListExpression": {},
+ * // "size": {},
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "startTime": "my_startTime",
+ * // "subaccountId": "my_subaccountId",
+ * // "targetingTemplateId": "my_targetingTemplateId",
+ * // "technologyTargeting": {},
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentId": "my_audienceSegmentId",
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "clickThroughUrl": {},
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comments": "my_comments",
+ * // "compatibility": "my_compatibility",
+ * // "createInfo": {},
+ * // "creativeGroupAssignments": [],
+ * // "creativeRotation": {},
+ * // "dayPartTargeting": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "deliverySchedule": {},
+ * // "dynamicClickTracker": false,
+ * // "endTime": "my_endTime",
+ * // "eventTagOverrides": [],
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementAssignments": [],
+ * // "remarketingListExpression": {},
+ * // "size": {},
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "startTime": "my_startTime",
+ * // "subaccountId": "my_subaccountId",
+ * // "targetingTemplateId": "my_targetingTemplateId",
+ * // "technologyTargeting": {},
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.ads.update
* @memberOf! ()
*
@@ -8442,6 +9842,43 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.advertiserGroups.delete
* @desc Deletes an existing advertiser group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserGroups.delete({
+ * // Advertiser group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserGroups.delete
* @memberOf! ()
*
@@ -8515,6 +9952,51 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.advertiserGroups.get
* @desc Gets one advertiser group by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserGroups.get({
+ * // Advertiser group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserGroups.get
* @memberOf! ()
*
@@ -8590,6 +10072,60 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.advertiserGroups.insert
* @desc Inserts a new advertiser group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserGroups.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserGroups.insert
* @memberOf! ()
*
@@ -8665,6 +10201,60 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.advertiserGroups.list
* @desc Retrieves a list of advertiser groups, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserGroups.list({
+ * // Select only advertiser groups with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "advertiser*2015" will return objects with names like "advertiser group June 2015", "advertiser group April 2015", or simply "advertiser group 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "advertisergroup" will match objects with name "my advertisergroup", "advertisergroup 2015", or simply "advertisergroup".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "advertiserGroups": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserGroups.list
* @memberOf! ()
*
@@ -8754,6 +10344,62 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.advertiserGroups.patch
* @desc Updates an existing advertiser group. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserGroups.patch({
+ * // Advertiser group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserGroups.patch
* @memberOf! ()
*
@@ -8830,6 +10476,60 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.advertiserGroups.update
* @desc Updates an existing advertiser group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserGroups.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserGroups.update
* @memberOf! ()
*
@@ -9036,6 +10736,54 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.advertiserLandingPages.get
* @desc Gets one landing page by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserLandingPages.get({
+ * // Landing page ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "advertiserId": "my_advertiserId",
+ * // "archived": false,
+ * // "deepLinks": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserLandingPages.get
* @memberOf! ()
*
@@ -9111,6 +10859,66 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.advertiserLandingPages.insert
* @desc Inserts a new landing page.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserLandingPages.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "advertiserId": "my_advertiserId",
+ * // "archived": false,
+ * // "deepLinks": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "url": "my_url"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "advertiserId": "my_advertiserId",
+ * // "archived": false,
+ * // "deepLinks": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserLandingPages.insert
* @memberOf! ()
*
@@ -9186,6 +10994,68 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.advertiserLandingPages.list
* @desc Retrieves a list of landing pages.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserLandingPages.list({
+ * // Select only landing pages that belong to these advertisers.
+ * advertiserIds: 'placeholder-value',
+ * // Select only archived landing pages. Don't set this field to select both archived and non-archived landing pages.
+ * archived: 'placeholder-value',
+ * // Select only landing pages that are associated with these campaigns.
+ * campaignIds: 'placeholder-value',
+ * // Select only landing pages with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for landing pages by name or ID. Wildcards (*) are allowed. For example, "landingpage*2017" will return landing pages with names like "landingpage July 2017", "landingpage March 2017", or simply "landingpage 2017". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "landingpage" will match campaigns with name "my landingpage", "landingpage 2015", or simply "landingpage".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only landing pages that belong to this subaccount.
+ * subaccountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "landingPages": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserLandingPages.list
* @memberOf! ()
*
@@ -9279,6 +11149,68 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.advertiserLandingPages.patch
* @desc Updates an existing landing page. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserLandingPages.patch({
+ * // Landing page ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "advertiserId": "my_advertiserId",
+ * // "archived": false,
+ * // "deepLinks": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "url": "my_url"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "advertiserId": "my_advertiserId",
+ * // "archived": false,
+ * // "deepLinks": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserLandingPages.patch
* @memberOf! ()
*
@@ -9355,6 +11287,66 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.advertiserLandingPages.update
* @desc Updates an existing landing page.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserLandingPages.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "advertiserId": "my_advertiserId",
+ * // "archived": false,
+ * // "deepLinks": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "url": "my_url"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "advertiserId": "my_advertiserId",
+ * // "archived": false,
+ * // "deepLinks": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserLandingPages.update
* @memberOf! ()
*
@@ -9561,6 +11553,62 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.advertisers.get
* @desc Gets one advertiser by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertisers.get({
+ * // Advertiser ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "clickThroughUrlSuffix": "my_clickThroughUrlSuffix",
+ * // "defaultClickThroughEventTagId": "my_defaultClickThroughEventTagId",
+ * // "defaultEmail": "my_defaultEmail",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "originalFloodlightConfigurationId": "my_originalFloodlightConfigurationId",
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "suspended": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertisers.get
* @memberOf! ()
*
@@ -9635,6 +11683,82 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.advertisers.insert
* @desc Inserts a new advertiser.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertisers.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "clickThroughUrlSuffix": "my_clickThroughUrlSuffix",
+ * // "defaultClickThroughEventTagId": "my_defaultClickThroughEventTagId",
+ * // "defaultEmail": "my_defaultEmail",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "originalFloodlightConfigurationId": "my_originalFloodlightConfigurationId",
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "suspended": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "clickThroughUrlSuffix": "my_clickThroughUrlSuffix",
+ * // "defaultClickThroughEventTagId": "my_defaultClickThroughEventTagId",
+ * // "defaultEmail": "my_defaultEmail",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "originalFloodlightConfigurationId": "my_originalFloodlightConfigurationId",
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "suspended": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertisers.insert
* @memberOf! ()
*
@@ -9710,6 +11834,72 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.advertisers.list
* @desc Retrieves a list of advertisers, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertisers.list({
+ * // Select only advertisers with these advertiser group IDs.
+ * advertiserGroupIds: 'placeholder-value',
+ * // Select only advertisers with these floodlight configuration IDs.
+ * floodlightConfigurationIds: 'placeholder-value',
+ * // Select only advertisers with these IDs.
+ * ids: 'placeholder-value',
+ * // Select only advertisers which do not belong to any advertiser group.
+ * includeAdvertisersWithoutGroupsOnly: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Select only advertisers which use another advertiser's floodlight configuration.
+ * onlyParent: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "advertiser*2015" will return objects with names like "advertiser June 2015", "advertiser April 2015", or simply "advertiser 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "advertiser" will match objects with name "my advertiser", "advertiser 2015", or simply "advertiser".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only advertisers with the specified status.
+ * status: 'placeholder-value',
+ * // Select only advertisers with these subaccount IDs.
+ * subaccountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "advertisers": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertisers.list
* @memberOf! ()
*
@@ -9797,6 +11987,84 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.advertisers.patch
* @desc Updates an existing advertiser. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertisers.patch({
+ * // Advertiser ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "clickThroughUrlSuffix": "my_clickThroughUrlSuffix",
+ * // "defaultClickThroughEventTagId": "my_defaultClickThroughEventTagId",
+ * // "defaultEmail": "my_defaultEmail",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "originalFloodlightConfigurationId": "my_originalFloodlightConfigurationId",
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "suspended": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "clickThroughUrlSuffix": "my_clickThroughUrlSuffix",
+ * // "defaultClickThroughEventTagId": "my_defaultClickThroughEventTagId",
+ * // "defaultEmail": "my_defaultEmail",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "originalFloodlightConfigurationId": "my_originalFloodlightConfigurationId",
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "suspended": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertisers.patch
* @memberOf! ()
*
@@ -9873,6 +12141,82 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.advertisers.update
* @desc Updates an existing advertiser.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertisers.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "clickThroughUrlSuffix": "my_clickThroughUrlSuffix",
+ * // "defaultClickThroughEventTagId": "my_defaultClickThroughEventTagId",
+ * // "defaultEmail": "my_defaultEmail",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "originalFloodlightConfigurationId": "my_originalFloodlightConfigurationId",
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "suspended": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "clickThroughUrlSuffix": "my_clickThroughUrlSuffix",
+ * // "defaultClickThroughEventTagId": "my_defaultClickThroughEventTagId",
+ * // "defaultEmail": "my_defaultEmail",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "originalFloodlightConfigurationId": "my_originalFloodlightConfigurationId",
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "suspended": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertisers.update
* @memberOf! ()
*
@@ -10085,6 +12429,47 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.browsers.list
* @desc Retrieves a list of browsers.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.browsers.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "browsers": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.browsers.list
* @memberOf! ()
*
@@ -10178,6 +12563,58 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.campaignCreativeAssociations.insert
* @desc Associates a creative with the specified campaign. This method creates a default ad with dimensions matching the creative in the campaign if such a default ad does not exist already.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.campaignCreativeAssociations.insert({
+ * // Campaign ID in this association.
+ * campaignId: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creativeId": "my_creativeId",
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creativeId": "my_creativeId",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.campaignCreativeAssociations.insert
* @memberOf! ()
*
@@ -10261,6 +12698,56 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.campaignCreativeAssociations.list
* @desc Retrieves the list of creative IDs associated with the specified campaign. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.campaignCreativeAssociations.list({
+ * // Campaign ID in this association.
+ * campaignId: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "campaignCreativeAssociations": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.campaignCreativeAssociations.list
* @memberOf! ()
*
@@ -10413,6 +12900,75 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.campaigns.get
* @desc Gets one campaign by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.campaigns.get({
+ * // Campaign ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingConfiguration": {},
+ * // "additionalCreativeOptimizationConfigurations": [],
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentGroups": [],
+ * // "billingInvoiceCode": "my_billingInvoiceCode",
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comment": "my_comment",
+ * // "createInfo": {},
+ * // "creativeGroupIds": [],
+ * // "creativeOptimizationConfiguration": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "defaultLandingPageId": "my_defaultLandingPageId",
+ * // "endDate": "my_endDate",
+ * // "eventTagOverrides": [],
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "startDate": "my_startDate",
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.campaigns.get
* @memberOf! ()
*
@@ -10485,6 +13041,108 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.campaigns.insert
* @desc Inserts a new campaign.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.campaigns.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingConfiguration": {},
+ * // "additionalCreativeOptimizationConfigurations": [],
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentGroups": [],
+ * // "billingInvoiceCode": "my_billingInvoiceCode",
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comment": "my_comment",
+ * // "createInfo": {},
+ * // "creativeGroupIds": [],
+ * // "creativeOptimizationConfiguration": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "defaultLandingPageId": "my_defaultLandingPageId",
+ * // "endDate": "my_endDate",
+ * // "eventTagOverrides": [],
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "startDate": "my_startDate",
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerEmails": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingConfiguration": {},
+ * // "additionalCreativeOptimizationConfigurations": [],
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentGroups": [],
+ * // "billingInvoiceCode": "my_billingInvoiceCode",
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comment": "my_comment",
+ * // "createInfo": {},
+ * // "creativeGroupIds": [],
+ * // "creativeOptimizationConfiguration": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "defaultLandingPageId": "my_defaultLandingPageId",
+ * // "endDate": "my_endDate",
+ * // "eventTagOverrides": [],
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "startDate": "my_startDate",
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.campaigns.insert
* @memberOf! ()
*
@@ -10556,6 +13214,74 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.campaigns.list
* @desc Retrieves a list of campaigns, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.campaigns.list({
+ * // Select only campaigns whose advertisers belong to these advertiser groups.
+ * advertiserGroupIds: 'placeholder-value',
+ * // Select only campaigns that belong to these advertisers.
+ * advertiserIds: 'placeholder-value',
+ * // Select only archived campaigns. Don't set this field to select both archived and non-archived campaigns.
+ * archived: 'placeholder-value',
+ * // Select only campaigns that have at least one optimization activity.
+ * atLeastOneOptimizationActivity: 'placeholder-value',
+ * // Exclude campaigns with these IDs.
+ * excludedIds: 'placeholder-value',
+ * // Select only campaigns with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Select only campaigns that have overridden this event tag ID.
+ * overriddenEventTagId: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for campaigns by name or ID. Wildcards (*) are allowed. For example, "campaign*2015" will return campaigns with names like "campaign June 2015", "campaign April 2015", or simply "campaign 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "campaign" will match campaigns with name "my campaign", "campaign 2015", or simply "campaign".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only campaigns that belong to this subaccount.
+ * subaccountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "campaigns": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.campaigns.list
* @memberOf! ()
*
@@ -10643,6 +13369,110 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.campaigns.patch
* @desc Updates an existing campaign. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.campaigns.patch({
+ * // Campaign ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingConfiguration": {},
+ * // "additionalCreativeOptimizationConfigurations": [],
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentGroups": [],
+ * // "billingInvoiceCode": "my_billingInvoiceCode",
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comment": "my_comment",
+ * // "createInfo": {},
+ * // "creativeGroupIds": [],
+ * // "creativeOptimizationConfiguration": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "defaultLandingPageId": "my_defaultLandingPageId",
+ * // "endDate": "my_endDate",
+ * // "eventTagOverrides": [],
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "startDate": "my_startDate",
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerEmails": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingConfiguration": {},
+ * // "additionalCreativeOptimizationConfigurations": [],
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentGroups": [],
+ * // "billingInvoiceCode": "my_billingInvoiceCode",
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comment": "my_comment",
+ * // "createInfo": {},
+ * // "creativeGroupIds": [],
+ * // "creativeOptimizationConfiguration": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "defaultLandingPageId": "my_defaultLandingPageId",
+ * // "endDate": "my_endDate",
+ * // "eventTagOverrides": [],
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "startDate": "my_startDate",
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.campaigns.patch
* @memberOf! ()
*
@@ -10715,6 +13545,108 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.campaigns.update
* @desc Updates an existing campaign.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.campaigns.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingConfiguration": {},
+ * // "additionalCreativeOptimizationConfigurations": [],
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentGroups": [],
+ * // "billingInvoiceCode": "my_billingInvoiceCode",
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comment": "my_comment",
+ * // "createInfo": {},
+ * // "creativeGroupIds": [],
+ * // "creativeOptimizationConfiguration": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "defaultLandingPageId": "my_defaultLandingPageId",
+ * // "endDate": "my_endDate",
+ * // "eventTagOverrides": [],
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "startDate": "my_startDate",
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerEmails": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingConfiguration": {},
+ * // "additionalCreativeOptimizationConfigurations": [],
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentGroups": [],
+ * // "billingInvoiceCode": "my_billingInvoiceCode",
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comment": "my_comment",
+ * // "createInfo": {},
+ * // "creativeGroupIds": [],
+ * // "creativeOptimizationConfiguration": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "defaultLandingPageId": "my_defaultLandingPageId",
+ * // "endDate": "my_endDate",
+ * // "eventTagOverrides": [],
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "startDate": "my_startDate",
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.campaigns.update
* @memberOf! ()
*
@@ -10924,6 +13856,61 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.changeLogs.get
* @desc Gets one change log by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.changeLogs.get({
+ * // Change log ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "action": "my_action",
+ * // "changeTime": "my_changeTime",
+ * // "fieldName": "my_fieldName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "newValue": "my_newValue",
+ * // "objectId": "my_objectId",
+ * // "objectType": "my_objectType",
+ * // "oldValue": "my_oldValue",
+ * // "subaccountId": "my_subaccountId",
+ * // "transactionId": "my_transactionId",
+ * // "userProfileId": "my_userProfileId",
+ * // "userProfileName": "my_userProfileName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.changeLogs.get
* @memberOf! ()
*
@@ -10998,6 +13985,68 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.changeLogs.list
* @desc Retrieves a list of change logs. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.changeLogs.list({
+ * // Select only change logs with the specified action.
+ * action: 'placeholder-value',
+ * // Select only change logs with these IDs.
+ * ids: 'placeholder-value',
+ * // Select only change logs whose change time is before the specified maxChangeTime.The time should be formatted as an RFC3339 date/time string. For example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, the format is "2015-07-18T22:54:00-04:00". In other words, the year, month, day, the letter T, the hour (24-hour clock system), minute, second, and then the time zone offset.
+ * maxChangeTime: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Select only change logs whose change time is after the specified minChangeTime.The time should be formatted as an RFC3339 date/time string. For example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, the format is "2015-07-18T22:54:00-04:00". In other words, the year, month, day, the letter T, the hour (24-hour clock system), minute, second, and then the time zone offset.
+ * minChangeTime: 'placeholder-value',
+ * // Select only change logs with these object IDs.
+ * objectIds: 'placeholder-value',
+ * // Select only change logs with the specified object type.
+ * objectType: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Select only change logs whose object ID, user name, old or new values match the search string.
+ * searchString: 'placeholder-value',
+ * // Select only change logs with these user profile IDs.
+ * userProfileIds: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "changeLogs": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.changeLogs.list
* @memberOf! ()
*
@@ -11156,6 +14205,55 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.cities.list
* @desc Retrieves a list of cities, possibly filtered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.cities.list({
+ * // Select only cities from these countries.
+ * countryDartIds: 'placeholder-value',
+ * // Select only cities with these DART IDs.
+ * dartIds: 'placeholder-value',
+ * // Select only cities with names starting with this prefix.
+ * namePrefix: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Select only cities from these regions.
+ * regionDartIds: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cities": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.cities.list
* @memberOf! ()
*
@@ -11267,6 +14365,50 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.connectionTypes.get
* @desc Gets one connection type by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.connectionTypes.get({
+ * // Connection type ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.connectionTypes.get
* @memberOf! ()
*
@@ -11342,6 +14484,47 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.connectionTypes.list
* @desc Retrieves a list of connection types.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.connectionTypes.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "connectionTypes": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.connectionTypes.list
* @memberOf! ()
*
@@ -11459,6 +14642,43 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.contentCategories.delete
* @desc Deletes an existing content category.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.contentCategories.delete({
+ * // Content category ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.contentCategories.delete
* @memberOf! ()
*
@@ -11532,6 +14752,51 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.contentCategories.get
* @desc Gets one content category by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.contentCategories.get({
+ * // Content category ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.contentCategories.get
* @memberOf! ()
*
@@ -11607,6 +14872,60 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.contentCategories.insert
* @desc Inserts a new content category.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.contentCategories.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.contentCategories.insert
* @memberOf! ()
*
@@ -11682,6 +15001,60 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.contentCategories.list
* @desc Retrieves a list of content categories, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.contentCategories.list({
+ * // Select only content categories with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "contentcategory*2015" will return objects with names like "contentcategory June 2015", "contentcategory April 2015", or simply "contentcategory 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "contentcategory" will match objects with name "my contentcategory", "contentcategory 2015", or simply "contentcategory".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "contentCategories": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.contentCategories.list
* @memberOf! ()
*
@@ -11771,6 +15144,62 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.contentCategories.patch
* @desc Updates an existing content category. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.contentCategories.patch({
+ * // Content category ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.contentCategories.patch
* @memberOf! ()
*
@@ -11847,6 +15276,60 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.contentCategories.update
* @desc Updates an existing content category.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.contentCategories.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.contentCategories.update
* @memberOf! ()
*
@@ -12053,6 +15536,58 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.conversions.batchinsert
* @desc Inserts conversions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/ddmconversions'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.conversions.batchinsert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "conversions": [],
+ * // "encryptionInfo": {},
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "hasFailures": false,
+ * // "kind": "my_kind",
+ * // "status": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.conversions.batchinsert
* @memberOf! ()
*
@@ -12137,6 +15672,58 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.conversions.batchupdate
* @desc Updates existing conversions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/ddmconversions'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.conversions.batchupdate({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "conversions": [],
+ * // "encryptionInfo": {},
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "hasFailures": false,
+ * // "kind": "my_kind",
+ * // "status": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.conversions.batchupdate
* @memberOf! ()
*
@@ -12263,6 +15850,52 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.countries.get
* @desc Gets one country by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.countries.get({
+ * // Country DART ID.
+ * dartId: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "countryCode": "my_countryCode",
+ * // "dartId": "my_dartId",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "sslEnabled": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.countries.get
* @memberOf! ()
*
@@ -12335,6 +15968,47 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.countries.list
* @desc Retrieves a list of countries.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.countries.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "countries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.countries.list
* @memberOf! ()
*
@@ -12443,6 +16117,72 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeAssets.insert
* @desc Inserts a new creative asset.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeAssets.insert({
+ * // Advertiser ID of this creative. This is a required field.
+ * advertiserId: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "assetIdentifier": {},
+ * // "clickTags": [],
+ * // "detectedFeatures": [],
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "warnedValidationRules": []
+ * // }
+ * },
+ * media: {
+ * mimeType: 'placeholder-value',
+ * body: 'placeholder-value',
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assetIdentifier": {},
+ * // "clickTags": [],
+ * // "detectedFeatures": [],
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "warnedValidationRules": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeAssets.insert
* @memberOf! ()
*
@@ -12572,6 +16312,43 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeFields.delete
* @desc Deletes an existing creative field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFields.delete({
+ * // Creative Field ID
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFields.delete
* @memberOf! ()
*
@@ -12645,6 +16422,54 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeFields.get
* @desc Gets one creative field by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFields.get({
+ * // Creative Field ID
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFields.get
* @memberOf! ()
*
@@ -12720,6 +16545,66 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeFields.insert
* @desc Inserts a new creative field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFields.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFields.insert
* @memberOf! ()
*
@@ -12795,6 +16680,62 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeFields.list
* @desc Retrieves a list of creative fields, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFields.list({
+ * // Select only creative fields that belong to these advertisers.
+ * advertiserIds: 'placeholder-value',
+ * // Select only creative fields with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for creative fields by name or ID. Wildcards (*) are allowed. For example, "creativefield*2015" will return creative fields with names like "creativefield June 2015", "creativefield April 2015", or simply "creativefield 2015". Most of the searches also add wild-cards implicitly at the start and the end of the search string. For example, a search string of "creativefield" will match creative fields with the name "my creativefield", "creativefield 2015", or simply "creativefield".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creativeFields": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFields.list
* @memberOf! ()
*
@@ -12883,6 +16824,68 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeFields.patch
* @desc Updates an existing creative field. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFields.patch({
+ * // Creative Field ID
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFields.patch
* @memberOf! ()
*
@@ -12959,6 +16962,66 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeFields.update
* @desc Updates an existing creative field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFields.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFields.update
* @memberOf! ()
*
@@ -13169,6 +17232,45 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeFieldValues.delete
* @desc Deletes an existing creative field value.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFieldValues.delete({
+ * // Creative field ID for this creative field value.
+ * creativeFieldId: 'placeholder-value',
+ * // Creative Field Value ID
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFieldValues.delete
* @memberOf! ()
*
@@ -13243,6 +17345,52 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeFieldValues.get
* @desc Gets one creative field value by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFieldValues.get({
+ * // Creative field ID for this creative field value.
+ * creativeFieldId: 'placeholder-value',
+ * // Creative Field Value ID
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "value": "my_value"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFieldValues.get
* @memberOf! ()
*
@@ -13319,6 +17467,60 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeFieldValues.insert
* @desc Inserts a new creative field value.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFieldValues.insert({
+ * // Creative field ID for this creative field value.
+ * creativeFieldId: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "value": "my_value"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "value": "my_value"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFieldValues.insert
* @memberOf! ()
*
@@ -13395,6 +17597,62 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeFieldValues.list
* @desc Retrieves a list of creative field values, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFieldValues.list({
+ * // Creative field ID for this creative field value.
+ * creativeFieldId: 'placeholder-value',
+ * // Select only creative field values with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for creative field values by their values. Wildcards (e.g. *) are not allowed.
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creativeFieldValues": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFieldValues.list
* @memberOf! ()
*
@@ -13485,6 +17743,62 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeFieldValues.patch
* @desc Updates an existing creative field value. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFieldValues.patch({
+ * // Creative field ID for this creative field value.
+ * creativeFieldId: 'placeholder-value',
+ * // Creative Field Value ID
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "value": "my_value"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "value": "my_value"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFieldValues.patch
* @memberOf! ()
*
@@ -13562,6 +17876,60 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeFieldValues.update
* @desc Updates an existing creative field value.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFieldValues.update({
+ * // Creative field ID for this creative field value.
+ * creativeFieldId: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "value": "my_value"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "value": "my_value"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFieldValues.update
* @memberOf! ()
*
@@ -13793,6 +18161,55 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeGroups.get
* @desc Gets one creative group by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeGroups.get({
+ * // Creative group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "groupNumber": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeGroups.get
* @memberOf! ()
*
@@ -13868,6 +18285,68 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeGroups.insert
* @desc Inserts a new creative group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeGroups.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "groupNumber": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "groupNumber": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeGroups.insert
* @memberOf! ()
*
@@ -13943,6 +18422,64 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeGroups.list
* @desc Retrieves a list of creative groups, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeGroups.list({
+ * // Select only creative groups that belong to these advertisers.
+ * advertiserIds: 'placeholder-value',
+ * // Select only creative groups that belong to this subgroup.
+ * groupNumber: 'placeholder-value',
+ * // Select only creative groups with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for creative groups by name or ID. Wildcards (*) are allowed. For example, "creativegroup*2015" will return creative groups with names like "creativegroup June 2015", "creativegroup April 2015", or simply "creativegroup 2015". Most of the searches also add wild-cards implicitly at the start and the end of the search string. For example, a search string of "creativegroup" will match creative groups with the name "my creativegroup", "creativegroup 2015", or simply "creativegroup".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creativeGroups": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeGroups.list
* @memberOf! ()
*
@@ -14032,6 +18569,70 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeGroups.patch
* @desc Updates an existing creative group. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeGroups.patch({
+ * // Creative group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "groupNumber": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "groupNumber": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeGroups.patch
* @memberOf! ()
*
@@ -14108,6 +18709,68 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creativeGroups.update
* @desc Updates an existing creative group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeGroups.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "groupNumber": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "groupNumber": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeGroups.update
* @memberOf! ()
*
@@ -14306,6 +18969,111 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creatives.get
* @desc Gets one creative by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creatives.get({
+ * // Creative ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "adParameters": "my_adParameters",
+ * // "adTagKeys": [],
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "allowScriptAccess": false,
+ * // "archived": false,
+ * // "artworkType": "my_artworkType",
+ * // "authoringSource": "my_authoringSource",
+ * // "authoringTool": "my_authoringTool",
+ * // "autoAdvanceImages": false,
+ * // "backgroundColor": "my_backgroundColor",
+ * // "backupImageClickThroughUrl": {},
+ * // "backupImageFeatures": [],
+ * // "backupImageReportingLabel": "my_backupImageReportingLabel",
+ * // "backupImageTargetWindow": {},
+ * // "clickTags": [],
+ * // "commercialId": "my_commercialId",
+ * // "companionCreatives": [],
+ * // "compatibility": [],
+ * // "convertFlashToHtml5": false,
+ * // "counterCustomEvents": [],
+ * // "creativeAssetSelection": {},
+ * // "creativeAssets": [],
+ * // "creativeFieldAssignments": [],
+ * // "customKeyValues": [],
+ * // "dynamicAssetSelection": false,
+ * // "exitCustomEvents": [],
+ * // "fsCommand": {},
+ * // "htmlCode": "my_htmlCode",
+ * // "htmlCodeLocked": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "latestTraffickedCreativeId": "my_latestTraffickedCreativeId",
+ * // "mediaDescription": "my_mediaDescription",
+ * // "mediaDuration": {},
+ * // "name": "my_name",
+ * // "overrideCss": "my_overrideCss",
+ * // "progressOffset": {},
+ * // "redirectUrl": "my_redirectUrl",
+ * // "renderingId": "my_renderingId",
+ * // "renderingIdDimensionValue": {},
+ * // "requiredFlashPluginVersion": "my_requiredFlashPluginVersion",
+ * // "requiredFlashVersion": 0,
+ * // "size": {},
+ * // "skipOffset": {},
+ * // "skippable": false,
+ * // "sslCompliant": false,
+ * // "sslOverride": false,
+ * // "studioAdvertiserId": "my_studioAdvertiserId",
+ * // "studioCreativeId": "my_studioCreativeId",
+ * // "studioTraffickedCreativeId": "my_studioTraffickedCreativeId",
+ * // "subaccountId": "my_subaccountId",
+ * // "thirdPartyBackupImageImpressionsUrl": "my_thirdPartyBackupImageImpressionsUrl",
+ * // "thirdPartyRichMediaImpressionsUrl": "my_thirdPartyRichMediaImpressionsUrl",
+ * // "thirdPartyUrls": [],
+ * // "timerCustomEvents": [],
+ * // "totalFileSize": "my_totalFileSize",
+ * // "type": "my_type",
+ * // "universalAdId": {},
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creatives.get
* @memberOf! ()
*
@@ -14378,6 +19146,180 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creatives.insert
* @desc Inserts a new creative.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creatives.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "adParameters": "my_adParameters",
+ * // "adTagKeys": [],
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "allowScriptAccess": false,
+ * // "archived": false,
+ * // "artworkType": "my_artworkType",
+ * // "authoringSource": "my_authoringSource",
+ * // "authoringTool": "my_authoringTool",
+ * // "autoAdvanceImages": false,
+ * // "backgroundColor": "my_backgroundColor",
+ * // "backupImageClickThroughUrl": {},
+ * // "backupImageFeatures": [],
+ * // "backupImageReportingLabel": "my_backupImageReportingLabel",
+ * // "backupImageTargetWindow": {},
+ * // "clickTags": [],
+ * // "commercialId": "my_commercialId",
+ * // "companionCreatives": [],
+ * // "compatibility": [],
+ * // "convertFlashToHtml5": false,
+ * // "counterCustomEvents": [],
+ * // "creativeAssetSelection": {},
+ * // "creativeAssets": [],
+ * // "creativeFieldAssignments": [],
+ * // "customKeyValues": [],
+ * // "dynamicAssetSelection": false,
+ * // "exitCustomEvents": [],
+ * // "fsCommand": {},
+ * // "htmlCode": "my_htmlCode",
+ * // "htmlCodeLocked": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "latestTraffickedCreativeId": "my_latestTraffickedCreativeId",
+ * // "mediaDescription": "my_mediaDescription",
+ * // "mediaDuration": {},
+ * // "name": "my_name",
+ * // "overrideCss": "my_overrideCss",
+ * // "progressOffset": {},
+ * // "redirectUrl": "my_redirectUrl",
+ * // "renderingId": "my_renderingId",
+ * // "renderingIdDimensionValue": {},
+ * // "requiredFlashPluginVersion": "my_requiredFlashPluginVersion",
+ * // "requiredFlashVersion": 0,
+ * // "size": {},
+ * // "skipOffset": {},
+ * // "skippable": false,
+ * // "sslCompliant": false,
+ * // "sslOverride": false,
+ * // "studioAdvertiserId": "my_studioAdvertiserId",
+ * // "studioCreativeId": "my_studioCreativeId",
+ * // "studioTraffickedCreativeId": "my_studioTraffickedCreativeId",
+ * // "subaccountId": "my_subaccountId",
+ * // "thirdPartyBackupImageImpressionsUrl": "my_thirdPartyBackupImageImpressionsUrl",
+ * // "thirdPartyRichMediaImpressionsUrl": "my_thirdPartyRichMediaImpressionsUrl",
+ * // "thirdPartyUrls": [],
+ * // "timerCustomEvents": [],
+ * // "totalFileSize": "my_totalFileSize",
+ * // "type": "my_type",
+ * // "universalAdId": {},
+ * // "version": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "adParameters": "my_adParameters",
+ * // "adTagKeys": [],
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "allowScriptAccess": false,
+ * // "archived": false,
+ * // "artworkType": "my_artworkType",
+ * // "authoringSource": "my_authoringSource",
+ * // "authoringTool": "my_authoringTool",
+ * // "autoAdvanceImages": false,
+ * // "backgroundColor": "my_backgroundColor",
+ * // "backupImageClickThroughUrl": {},
+ * // "backupImageFeatures": [],
+ * // "backupImageReportingLabel": "my_backupImageReportingLabel",
+ * // "backupImageTargetWindow": {},
+ * // "clickTags": [],
+ * // "commercialId": "my_commercialId",
+ * // "companionCreatives": [],
+ * // "compatibility": [],
+ * // "convertFlashToHtml5": false,
+ * // "counterCustomEvents": [],
+ * // "creativeAssetSelection": {},
+ * // "creativeAssets": [],
+ * // "creativeFieldAssignments": [],
+ * // "customKeyValues": [],
+ * // "dynamicAssetSelection": false,
+ * // "exitCustomEvents": [],
+ * // "fsCommand": {},
+ * // "htmlCode": "my_htmlCode",
+ * // "htmlCodeLocked": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "latestTraffickedCreativeId": "my_latestTraffickedCreativeId",
+ * // "mediaDescription": "my_mediaDescription",
+ * // "mediaDuration": {},
+ * // "name": "my_name",
+ * // "overrideCss": "my_overrideCss",
+ * // "progressOffset": {},
+ * // "redirectUrl": "my_redirectUrl",
+ * // "renderingId": "my_renderingId",
+ * // "renderingIdDimensionValue": {},
+ * // "requiredFlashPluginVersion": "my_requiredFlashPluginVersion",
+ * // "requiredFlashVersion": 0,
+ * // "size": {},
+ * // "skipOffset": {},
+ * // "skippable": false,
+ * // "sslCompliant": false,
+ * // "sslOverride": false,
+ * // "studioAdvertiserId": "my_studioAdvertiserId",
+ * // "studioCreativeId": "my_studioCreativeId",
+ * // "studioTraffickedCreativeId": "my_studioTraffickedCreativeId",
+ * // "subaccountId": "my_subaccountId",
+ * // "thirdPartyBackupImageImpressionsUrl": "my_thirdPartyBackupImageImpressionsUrl",
+ * // "thirdPartyRichMediaImpressionsUrl": "my_thirdPartyRichMediaImpressionsUrl",
+ * // "thirdPartyUrls": [],
+ * // "timerCustomEvents": [],
+ * // "totalFileSize": "my_totalFileSize",
+ * // "type": "my_type",
+ * // "universalAdId": {},
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creatives.insert
* @memberOf! ()
*
@@ -14449,6 +19391,80 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creatives.list
* @desc Retrieves a list of creatives, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creatives.list({
+ * // Select only active creatives. Leave blank to select active and inactive creatives.
+ * active: 'placeholder-value',
+ * // Select only creatives with this advertiser ID.
+ * advertiserId: 'placeholder-value',
+ * // Select only archived creatives. Leave blank to select archived and unarchived creatives.
+ * archived: 'placeholder-value',
+ * // Select only creatives with this campaign ID.
+ * campaignId: 'placeholder-value',
+ * // Select only in-stream video creatives with these companion IDs.
+ * companionCreativeIds: 'placeholder-value',
+ * // Select only creatives with these creative field IDs.
+ * creativeFieldIds: 'placeholder-value',
+ * // Select only creatives with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Select only creatives with these rendering IDs.
+ * renderingIds: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "creative*2015" will return objects with names like "creative June 2015", "creative April 2015", or simply "creative 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "creative" will match objects with name "my creative", "creative 2015", or simply "creative".
+ * searchString: 'placeholder-value',
+ * // Select only creatives with these size IDs.
+ * sizeIds: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only creatives corresponding to this Studio creative ID.
+ * studioCreativeId: 'placeholder-value',
+ * // Select only creatives with these creative types.
+ * types: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creatives": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creatives.list
* @memberOf! ()
*
@@ -14539,6 +19555,182 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creatives.patch
* @desc Updates an existing creative. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creatives.patch({
+ * // Creative ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "adParameters": "my_adParameters",
+ * // "adTagKeys": [],
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "allowScriptAccess": false,
+ * // "archived": false,
+ * // "artworkType": "my_artworkType",
+ * // "authoringSource": "my_authoringSource",
+ * // "authoringTool": "my_authoringTool",
+ * // "autoAdvanceImages": false,
+ * // "backgroundColor": "my_backgroundColor",
+ * // "backupImageClickThroughUrl": {},
+ * // "backupImageFeatures": [],
+ * // "backupImageReportingLabel": "my_backupImageReportingLabel",
+ * // "backupImageTargetWindow": {},
+ * // "clickTags": [],
+ * // "commercialId": "my_commercialId",
+ * // "companionCreatives": [],
+ * // "compatibility": [],
+ * // "convertFlashToHtml5": false,
+ * // "counterCustomEvents": [],
+ * // "creativeAssetSelection": {},
+ * // "creativeAssets": [],
+ * // "creativeFieldAssignments": [],
+ * // "customKeyValues": [],
+ * // "dynamicAssetSelection": false,
+ * // "exitCustomEvents": [],
+ * // "fsCommand": {},
+ * // "htmlCode": "my_htmlCode",
+ * // "htmlCodeLocked": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "latestTraffickedCreativeId": "my_latestTraffickedCreativeId",
+ * // "mediaDescription": "my_mediaDescription",
+ * // "mediaDuration": {},
+ * // "name": "my_name",
+ * // "overrideCss": "my_overrideCss",
+ * // "progressOffset": {},
+ * // "redirectUrl": "my_redirectUrl",
+ * // "renderingId": "my_renderingId",
+ * // "renderingIdDimensionValue": {},
+ * // "requiredFlashPluginVersion": "my_requiredFlashPluginVersion",
+ * // "requiredFlashVersion": 0,
+ * // "size": {},
+ * // "skipOffset": {},
+ * // "skippable": false,
+ * // "sslCompliant": false,
+ * // "sslOverride": false,
+ * // "studioAdvertiserId": "my_studioAdvertiserId",
+ * // "studioCreativeId": "my_studioCreativeId",
+ * // "studioTraffickedCreativeId": "my_studioTraffickedCreativeId",
+ * // "subaccountId": "my_subaccountId",
+ * // "thirdPartyBackupImageImpressionsUrl": "my_thirdPartyBackupImageImpressionsUrl",
+ * // "thirdPartyRichMediaImpressionsUrl": "my_thirdPartyRichMediaImpressionsUrl",
+ * // "thirdPartyUrls": [],
+ * // "timerCustomEvents": [],
+ * // "totalFileSize": "my_totalFileSize",
+ * // "type": "my_type",
+ * // "universalAdId": {},
+ * // "version": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "adParameters": "my_adParameters",
+ * // "adTagKeys": [],
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "allowScriptAccess": false,
+ * // "archived": false,
+ * // "artworkType": "my_artworkType",
+ * // "authoringSource": "my_authoringSource",
+ * // "authoringTool": "my_authoringTool",
+ * // "autoAdvanceImages": false,
+ * // "backgroundColor": "my_backgroundColor",
+ * // "backupImageClickThroughUrl": {},
+ * // "backupImageFeatures": [],
+ * // "backupImageReportingLabel": "my_backupImageReportingLabel",
+ * // "backupImageTargetWindow": {},
+ * // "clickTags": [],
+ * // "commercialId": "my_commercialId",
+ * // "companionCreatives": [],
+ * // "compatibility": [],
+ * // "convertFlashToHtml5": false,
+ * // "counterCustomEvents": [],
+ * // "creativeAssetSelection": {},
+ * // "creativeAssets": [],
+ * // "creativeFieldAssignments": [],
+ * // "customKeyValues": [],
+ * // "dynamicAssetSelection": false,
+ * // "exitCustomEvents": [],
+ * // "fsCommand": {},
+ * // "htmlCode": "my_htmlCode",
+ * // "htmlCodeLocked": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "latestTraffickedCreativeId": "my_latestTraffickedCreativeId",
+ * // "mediaDescription": "my_mediaDescription",
+ * // "mediaDuration": {},
+ * // "name": "my_name",
+ * // "overrideCss": "my_overrideCss",
+ * // "progressOffset": {},
+ * // "redirectUrl": "my_redirectUrl",
+ * // "renderingId": "my_renderingId",
+ * // "renderingIdDimensionValue": {},
+ * // "requiredFlashPluginVersion": "my_requiredFlashPluginVersion",
+ * // "requiredFlashVersion": 0,
+ * // "size": {},
+ * // "skipOffset": {},
+ * // "skippable": false,
+ * // "sslCompliant": false,
+ * // "sslOverride": false,
+ * // "studioAdvertiserId": "my_studioAdvertiserId",
+ * // "studioCreativeId": "my_studioCreativeId",
+ * // "studioTraffickedCreativeId": "my_studioTraffickedCreativeId",
+ * // "subaccountId": "my_subaccountId",
+ * // "thirdPartyBackupImageImpressionsUrl": "my_thirdPartyBackupImageImpressionsUrl",
+ * // "thirdPartyRichMediaImpressionsUrl": "my_thirdPartyRichMediaImpressionsUrl",
+ * // "thirdPartyUrls": [],
+ * // "timerCustomEvents": [],
+ * // "totalFileSize": "my_totalFileSize",
+ * // "type": "my_type",
+ * // "universalAdId": {},
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creatives.patch
* @memberOf! ()
*
@@ -14611,6 +19803,180 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.creatives.update
* @desc Updates an existing creative.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creatives.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "adParameters": "my_adParameters",
+ * // "adTagKeys": [],
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "allowScriptAccess": false,
+ * // "archived": false,
+ * // "artworkType": "my_artworkType",
+ * // "authoringSource": "my_authoringSource",
+ * // "authoringTool": "my_authoringTool",
+ * // "autoAdvanceImages": false,
+ * // "backgroundColor": "my_backgroundColor",
+ * // "backupImageClickThroughUrl": {},
+ * // "backupImageFeatures": [],
+ * // "backupImageReportingLabel": "my_backupImageReportingLabel",
+ * // "backupImageTargetWindow": {},
+ * // "clickTags": [],
+ * // "commercialId": "my_commercialId",
+ * // "companionCreatives": [],
+ * // "compatibility": [],
+ * // "convertFlashToHtml5": false,
+ * // "counterCustomEvents": [],
+ * // "creativeAssetSelection": {},
+ * // "creativeAssets": [],
+ * // "creativeFieldAssignments": [],
+ * // "customKeyValues": [],
+ * // "dynamicAssetSelection": false,
+ * // "exitCustomEvents": [],
+ * // "fsCommand": {},
+ * // "htmlCode": "my_htmlCode",
+ * // "htmlCodeLocked": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "latestTraffickedCreativeId": "my_latestTraffickedCreativeId",
+ * // "mediaDescription": "my_mediaDescription",
+ * // "mediaDuration": {},
+ * // "name": "my_name",
+ * // "overrideCss": "my_overrideCss",
+ * // "progressOffset": {},
+ * // "redirectUrl": "my_redirectUrl",
+ * // "renderingId": "my_renderingId",
+ * // "renderingIdDimensionValue": {},
+ * // "requiredFlashPluginVersion": "my_requiredFlashPluginVersion",
+ * // "requiredFlashVersion": 0,
+ * // "size": {},
+ * // "skipOffset": {},
+ * // "skippable": false,
+ * // "sslCompliant": false,
+ * // "sslOverride": false,
+ * // "studioAdvertiserId": "my_studioAdvertiserId",
+ * // "studioCreativeId": "my_studioCreativeId",
+ * // "studioTraffickedCreativeId": "my_studioTraffickedCreativeId",
+ * // "subaccountId": "my_subaccountId",
+ * // "thirdPartyBackupImageImpressionsUrl": "my_thirdPartyBackupImageImpressionsUrl",
+ * // "thirdPartyRichMediaImpressionsUrl": "my_thirdPartyRichMediaImpressionsUrl",
+ * // "thirdPartyUrls": [],
+ * // "timerCustomEvents": [],
+ * // "totalFileSize": "my_totalFileSize",
+ * // "type": "my_type",
+ * // "universalAdId": {},
+ * // "version": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "adParameters": "my_adParameters",
+ * // "adTagKeys": [],
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "allowScriptAccess": false,
+ * // "archived": false,
+ * // "artworkType": "my_artworkType",
+ * // "authoringSource": "my_authoringSource",
+ * // "authoringTool": "my_authoringTool",
+ * // "autoAdvanceImages": false,
+ * // "backgroundColor": "my_backgroundColor",
+ * // "backupImageClickThroughUrl": {},
+ * // "backupImageFeatures": [],
+ * // "backupImageReportingLabel": "my_backupImageReportingLabel",
+ * // "backupImageTargetWindow": {},
+ * // "clickTags": [],
+ * // "commercialId": "my_commercialId",
+ * // "companionCreatives": [],
+ * // "compatibility": [],
+ * // "convertFlashToHtml5": false,
+ * // "counterCustomEvents": [],
+ * // "creativeAssetSelection": {},
+ * // "creativeAssets": [],
+ * // "creativeFieldAssignments": [],
+ * // "customKeyValues": [],
+ * // "dynamicAssetSelection": false,
+ * // "exitCustomEvents": [],
+ * // "fsCommand": {},
+ * // "htmlCode": "my_htmlCode",
+ * // "htmlCodeLocked": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "latestTraffickedCreativeId": "my_latestTraffickedCreativeId",
+ * // "mediaDescription": "my_mediaDescription",
+ * // "mediaDuration": {},
+ * // "name": "my_name",
+ * // "overrideCss": "my_overrideCss",
+ * // "progressOffset": {},
+ * // "redirectUrl": "my_redirectUrl",
+ * // "renderingId": "my_renderingId",
+ * // "renderingIdDimensionValue": {},
+ * // "requiredFlashPluginVersion": "my_requiredFlashPluginVersion",
+ * // "requiredFlashVersion": 0,
+ * // "size": {},
+ * // "skipOffset": {},
+ * // "skippable": false,
+ * // "sslCompliant": false,
+ * // "sslOverride": false,
+ * // "studioAdvertiserId": "my_studioAdvertiserId",
+ * // "studioCreativeId": "my_studioCreativeId",
+ * // "studioTraffickedCreativeId": "my_studioTraffickedCreativeId",
+ * // "subaccountId": "my_subaccountId",
+ * // "thirdPartyBackupImageImpressionsUrl": "my_thirdPartyBackupImageImpressionsUrl",
+ * // "thirdPartyRichMediaImpressionsUrl": "my_thirdPartyRichMediaImpressionsUrl",
+ * // "thirdPartyUrls": [],
+ * // "timerCustomEvents": [],
+ * // "totalFileSize": "my_totalFileSize",
+ * // "type": "my_type",
+ * // "universalAdId": {},
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creatives.update
* @memberOf! ()
*
@@ -14832,6 +20198,65 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.dimensionValues.query
* @desc Retrieves list of report dimension values for a list of filters.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.dimensionValues.query({
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // The value of the nextToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "dimensionName": "my_dimensionName",
+ * // "endDate": "my_endDate",
+ * // "filters": [],
+ * // "kind": "my_kind",
+ * // "startDate": "my_startDate"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.dimensionValues.query
* @memberOf! ()
*
@@ -14942,6 +20367,56 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.directorySites.get
* @desc Gets one directory site by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.directorySites.get({
+ * // Directory site ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "active": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "inpageTagFormats": [],
+ * // "interstitialTagFormats": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "settings": {},
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.directorySites.get
* @memberOf! ()
*
@@ -15017,6 +20492,70 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.directorySites.insert
* @desc Inserts a new directory site.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.directorySites.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "active": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "inpageTagFormats": [],
+ * // "interstitialTagFormats": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "settings": {},
+ * // "url": "my_url"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "active": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "inpageTagFormats": [],
+ * // "interstitialTagFormats": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "settings": {},
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.directorySites.insert
* @memberOf! ()
*
@@ -15092,6 +20631,70 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.directorySites.list
* @desc Retrieves a list of directory sites, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.directorySites.list({
+ * // This search filter is no longer supported and will have no effect on the results returned.
+ * acceptsInStreamVideoPlacements: 'placeholder-value',
+ * // This search filter is no longer supported and will have no effect on the results returned.
+ * acceptsInterstitialPlacements: 'placeholder-value',
+ * // Select only directory sites that accept publisher paid placements. This field can be left blank.
+ * acceptsPublisherPaidPlacements: 'placeholder-value',
+ * // Select only active directory sites. Leave blank to retrieve both active and inactive directory sites.
+ * active: 'placeholder-value',
+ * // Select only directory sites with this Ad Manager network code.
+ * dfpNetworkCode: 'placeholder-value',
+ * // Select only directory sites with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name, ID or URL. Wildcards (*) are allowed. For example, "directory site*2015" will return objects with names like "directory site June 2015", "directory site April 2015", or simply "directory site 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "directory site" will match objects with name "my directory site", "directory site 2015" or simply, "directory site".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "directorySites": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.directorySites.list
* @memberOf! ()
*
@@ -15281,6 +20884,47 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.dynamicTargetingKeys.delete
* @desc Deletes an existing dynamic targeting key.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.dynamicTargetingKeys.delete({
+ * // Name of this dynamic targeting key. This is a required field. Must be less than 256 characters long and cannot contain commas. All characters are converted to lowercase.
+ * name: 'placeholder-value',
+ * // ID of the object of this dynamic targeting key. This is a required field.
+ * objectId: 'placeholder-value',
+ * // Type of the object of this dynamic targeting key. This is a required field.
+ * objectType: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.dynamicTargetingKeys.delete
* @memberOf! ()
*
@@ -15356,6 +21000,60 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.dynamicTargetingKeys.insert
* @desc Inserts a new dynamic targeting key. Keys must be created at the advertiser level before being assigned to the advertiser's ads, creatives, or placements. There is a maximum of 1000 keys per advertiser, out of which a maximum of 20 keys can be assigned per ad, creative, or placement.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.dynamicTargetingKeys.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "objectId": "my_objectId",
+ * // "objectType": "my_objectType"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "objectId": "my_objectId",
+ * // "objectType": "my_objectType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.dynamicTargetingKeys.insert
* @memberOf! ()
*
@@ -15431,6 +21129,55 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.dynamicTargetingKeys.list
* @desc Retrieves a list of dynamic targeting keys.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.dynamicTargetingKeys.list({
+ * // Select only dynamic targeting keys whose object has this advertiser ID.
+ * advertiserId: 'placeholder-value',
+ * // Select only dynamic targeting keys exactly matching these names.
+ * names: 'placeholder-value',
+ * // Select only dynamic targeting keys with this object ID.
+ * objectId: 'placeholder-value',
+ * // Select only dynamic targeting keys with this object type.
+ * objectType: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dynamicTargetingKeys": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.dynamicTargetingKeys.list
* @memberOf! ()
*
@@ -15595,6 +21342,43 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.eventTags.delete
* @desc Deletes an existing event tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.eventTags.delete({
+ * // Event tag ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.eventTags.delete
* @memberOf! ()
*
@@ -15667,6 +21451,65 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.eventTags.get
* @desc Gets one event tag by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.eventTags.get({
+ * // Event tag ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "enabledByDefault": false,
+ * // "excludeFromAdxRequests": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteFilterType": "my_siteFilterType",
+ * // "siteIds": [],
+ * // "sslCompliant": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "type": "my_type",
+ * // "url": "my_url",
+ * // "urlEscapeLevels": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.eventTags.get
* @memberOf! ()
*
@@ -15739,6 +21582,88 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.eventTags.insert
* @desc Inserts a new event tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.eventTags.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "enabledByDefault": false,
+ * // "excludeFromAdxRequests": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteFilterType": "my_siteFilterType",
+ * // "siteIds": [],
+ * // "sslCompliant": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "type": "my_type",
+ * // "url": "my_url",
+ * // "urlEscapeLevels": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "enabledByDefault": false,
+ * // "excludeFromAdxRequests": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteFilterType": "my_siteFilterType",
+ * // "siteIds": [],
+ * // "sslCompliant": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "type": "my_type",
+ * // "url": "my_url",
+ * // "urlEscapeLevels": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.eventTags.insert
* @memberOf! ()
*
@@ -15810,6 +21735,67 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.eventTags.list
* @desc Retrieves a list of event tags, possibly filtered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.eventTags.list({
+ * // Select only event tags that belong to this ad.
+ * adId: 'placeholder-value',
+ * // Select only event tags that belong to this advertiser.
+ * advertiserId: 'placeholder-value',
+ * // Select only event tags that belong to this campaign.
+ * campaignId: 'placeholder-value',
+ * // Examine only the specified campaign or advertiser's event tags for matching selector criteria. When set to false, the parent advertiser and parent campaign of the specified ad or campaign is examined as well. In addition, when set to false, the status field is examined as well, along with the enabledByDefault field. This parameter can not be set to true when adId is specified as ads do not define their own even tags.
+ * definitionsOnly: 'placeholder-value',
+ * // Select only enabled event tags. What is considered enabled or disabled depends on the definitionsOnly parameter. When definitionsOnly is set to true, only the specified advertiser or campaign's event tags' enabledByDefault field is examined. When definitionsOnly is set to false, the specified ad or specified campaign's parent advertiser's or parent campaign's event tags' enabledByDefault and status fields are examined as well.
+ * enabled: 'placeholder-value',
+ * // Select only event tags with the specified event tag types. Event tag types can be used to specify whether to use a third-party pixel, a third-party JavaScript URL, or a third-party click-through URL for either impression or click tracking.
+ * eventTagTypes: 'placeholder-value',
+ * // Select only event tags with these IDs.
+ * ids: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "eventtag*2015" will return objects with names like "eventtag June 2015", "eventtag April 2015", or simply "eventtag 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "eventtag" will match objects with name "my eventtag", "eventtag 2015", or simply "eventtag".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "eventTags": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.eventTags.list
* @memberOf! ()
*
@@ -15894,6 +21880,90 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.eventTags.patch
* @desc Updates an existing event tag. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.eventTags.patch({
+ * // Event tag ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "enabledByDefault": false,
+ * // "excludeFromAdxRequests": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteFilterType": "my_siteFilterType",
+ * // "siteIds": [],
+ * // "sslCompliant": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "type": "my_type",
+ * // "url": "my_url",
+ * // "urlEscapeLevels": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "enabledByDefault": false,
+ * // "excludeFromAdxRequests": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteFilterType": "my_siteFilterType",
+ * // "siteIds": [],
+ * // "sslCompliant": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "type": "my_type",
+ * // "url": "my_url",
+ * // "urlEscapeLevels": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.eventTags.patch
* @memberOf! ()
*
@@ -15966,6 +22036,88 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.eventTags.update
* @desc Updates an existing event tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.eventTags.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "enabledByDefault": false,
+ * // "excludeFromAdxRequests": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteFilterType": "my_siteFilterType",
+ * // "siteIds": [],
+ * // "sslCompliant": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "type": "my_type",
+ * // "url": "my_url",
+ * // "urlEscapeLevels": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "enabledByDefault": false,
+ * // "excludeFromAdxRequests": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteFilterType": "my_siteFilterType",
+ * // "siteIds": [],
+ * // "sslCompliant": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "type": "my_type",
+ * // "url": "my_url",
+ * // "urlEscapeLevels": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.eventTags.update
* @memberOf! ()
*
@@ -16178,6 +22330,57 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.files.get
* @desc Retrieves a report file by its report ID and file ID. This method supports media download.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.files.get({
+ * // The ID of the report file.
+ * fileId: 'placeholder-value',
+ * // The ID of the report.
+ * reportId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dateRange": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "reportId": "my_reportId",
+ * // "status": "my_status",
+ * // "urls": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.files.get
* @memberOf! ()
*
@@ -16249,6 +22452,59 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.files.list
* @desc Lists files for a user profile.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.files.list({
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // The value of the nextToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // The DFA profile ID.
+ * profileId: 'placeholder-value',
+ * // The scope that defines which results are returned.
+ * scope: 'placeholder-value',
+ * // The field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.files.list
* @memberOf! ()
*
@@ -16378,6 +22634,43 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.floodlightActivities.delete
* @desc Deletes an existing floodlight activity.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivities.delete({
+ * // Floodlight activity ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivities.delete
* @memberOf! ()
*
@@ -16451,6 +22744,50 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.floodlightActivities.generatetag
* @desc Generates a tag for a floodlight activity.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivities.generatetag({
+ * // Floodlight activity ID for which we want to generate a tag.
+ * floodlightActivityId: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "floodlightActivityTag": "my_floodlightActivityTag",
+ * // "globalSiteTagGlobalSnippet": "my_globalSiteTagGlobalSnippet",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivities.generatetag
* @memberOf! ()
*
@@ -16543,6 +22880,75 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.floodlightActivities.get
* @desc Gets one floodlight activity by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivities.get({
+ * // Floodlight activity ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "cacheBustingType": "my_cacheBustingType",
+ * // "countingMethod": "my_countingMethod",
+ * // "defaultTags": [],
+ * // "expectedUrl": "my_expectedUrl",
+ * // "floodlightActivityGroupId": "my_floodlightActivityGroupId",
+ * // "floodlightActivityGroupName": "my_floodlightActivityGroupName",
+ * // "floodlightActivityGroupTagString": "my_floodlightActivityGroupTagString",
+ * // "floodlightActivityGroupType": "my_floodlightActivityGroupType",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "floodlightTagType": "my_floodlightTagType",
+ * // "hidden": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "notes": "my_notes",
+ * // "publisherTags": [],
+ * // "secure": false,
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormat": "my_tagFormat",
+ * // "tagString": "my_tagString",
+ * // "userDefinedVariableTypes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivities.get
* @memberOf! ()
*
@@ -16618,6 +23024,108 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.floodlightActivities.insert
* @desc Inserts a new floodlight activity.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivities.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "cacheBustingType": "my_cacheBustingType",
+ * // "countingMethod": "my_countingMethod",
+ * // "defaultTags": [],
+ * // "expectedUrl": "my_expectedUrl",
+ * // "floodlightActivityGroupId": "my_floodlightActivityGroupId",
+ * // "floodlightActivityGroupName": "my_floodlightActivityGroupName",
+ * // "floodlightActivityGroupTagString": "my_floodlightActivityGroupTagString",
+ * // "floodlightActivityGroupType": "my_floodlightActivityGroupType",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "floodlightTagType": "my_floodlightTagType",
+ * // "hidden": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "notes": "my_notes",
+ * // "publisherTags": [],
+ * // "secure": false,
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormat": "my_tagFormat",
+ * // "tagString": "my_tagString",
+ * // "userDefinedVariableTypes": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "cacheBustingType": "my_cacheBustingType",
+ * // "countingMethod": "my_countingMethod",
+ * // "defaultTags": [],
+ * // "expectedUrl": "my_expectedUrl",
+ * // "floodlightActivityGroupId": "my_floodlightActivityGroupId",
+ * // "floodlightActivityGroupName": "my_floodlightActivityGroupName",
+ * // "floodlightActivityGroupTagString": "my_floodlightActivityGroupTagString",
+ * // "floodlightActivityGroupType": "my_floodlightActivityGroupType",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "floodlightTagType": "my_floodlightTagType",
+ * // "hidden": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "notes": "my_notes",
+ * // "publisherTags": [],
+ * // "secure": false,
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormat": "my_tagFormat",
+ * // "tagString": "my_tagString",
+ * // "userDefinedVariableTypes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivities.insert
* @memberOf! ()
*
@@ -16693,6 +23201,74 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.floodlightActivities.list
* @desc Retrieves a list of floodlight activities, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivities.list({
+ * // Select only floodlight activities for the specified advertiser ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.
+ * advertiserId: 'placeholder-value',
+ * // Select only floodlight activities with the specified floodlight activity group IDs.
+ * floodlightActivityGroupIds: 'placeholder-value',
+ * // Select only floodlight activities with the specified floodlight activity group name.
+ * floodlightActivityGroupName: 'placeholder-value',
+ * // Select only floodlight activities with the specified floodlight activity group tag string.
+ * floodlightActivityGroupTagString: 'placeholder-value',
+ * // Select only floodlight activities with the specified floodlight activity group type.
+ * floodlightActivityGroupType: 'placeholder-value',
+ * // Select only floodlight activities for the specified floodlight configuration ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.
+ * floodlightConfigurationId: 'placeholder-value',
+ * // Select only floodlight activities with the specified IDs. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "floodlightactivity*2015" will return objects with names like "floodlightactivity June 2015", "floodlightactivity April 2015", or simply "floodlightactivity 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "floodlightactivity" will match objects with name "my floodlightactivity activity", "floodlightactivity 2015", or simply "floodlightactivity".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only floodlight activities with the specified tag string.
+ * tagString: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "floodlightActivities": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivities.list
* @memberOf! ()
*
@@ -16789,6 +23365,110 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.floodlightActivities.patch
* @desc Updates an existing floodlight activity. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivities.patch({
+ * // Floodlight activity ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "cacheBustingType": "my_cacheBustingType",
+ * // "countingMethod": "my_countingMethod",
+ * // "defaultTags": [],
+ * // "expectedUrl": "my_expectedUrl",
+ * // "floodlightActivityGroupId": "my_floodlightActivityGroupId",
+ * // "floodlightActivityGroupName": "my_floodlightActivityGroupName",
+ * // "floodlightActivityGroupTagString": "my_floodlightActivityGroupTagString",
+ * // "floodlightActivityGroupType": "my_floodlightActivityGroupType",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "floodlightTagType": "my_floodlightTagType",
+ * // "hidden": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "notes": "my_notes",
+ * // "publisherTags": [],
+ * // "secure": false,
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormat": "my_tagFormat",
+ * // "tagString": "my_tagString",
+ * // "userDefinedVariableTypes": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "cacheBustingType": "my_cacheBustingType",
+ * // "countingMethod": "my_countingMethod",
+ * // "defaultTags": [],
+ * // "expectedUrl": "my_expectedUrl",
+ * // "floodlightActivityGroupId": "my_floodlightActivityGroupId",
+ * // "floodlightActivityGroupName": "my_floodlightActivityGroupName",
+ * // "floodlightActivityGroupTagString": "my_floodlightActivityGroupTagString",
+ * // "floodlightActivityGroupType": "my_floodlightActivityGroupType",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "floodlightTagType": "my_floodlightTagType",
+ * // "hidden": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "notes": "my_notes",
+ * // "publisherTags": [],
+ * // "secure": false,
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormat": "my_tagFormat",
+ * // "tagString": "my_tagString",
+ * // "userDefinedVariableTypes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivities.patch
* @memberOf! ()
*
@@ -16865,6 +23545,108 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.floodlightActivities.update
* @desc Updates an existing floodlight activity.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivities.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "cacheBustingType": "my_cacheBustingType",
+ * // "countingMethod": "my_countingMethod",
+ * // "defaultTags": [],
+ * // "expectedUrl": "my_expectedUrl",
+ * // "floodlightActivityGroupId": "my_floodlightActivityGroupId",
+ * // "floodlightActivityGroupName": "my_floodlightActivityGroupName",
+ * // "floodlightActivityGroupTagString": "my_floodlightActivityGroupTagString",
+ * // "floodlightActivityGroupType": "my_floodlightActivityGroupType",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "floodlightTagType": "my_floodlightTagType",
+ * // "hidden": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "notes": "my_notes",
+ * // "publisherTags": [],
+ * // "secure": false,
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormat": "my_tagFormat",
+ * // "tagString": "my_tagString",
+ * // "userDefinedVariableTypes": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "cacheBustingType": "my_cacheBustingType",
+ * // "countingMethod": "my_countingMethod",
+ * // "defaultTags": [],
+ * // "expectedUrl": "my_expectedUrl",
+ * // "floodlightActivityGroupId": "my_floodlightActivityGroupId",
+ * // "floodlightActivityGroupName": "my_floodlightActivityGroupName",
+ * // "floodlightActivityGroupTagString": "my_floodlightActivityGroupTagString",
+ * // "floodlightActivityGroupType": "my_floodlightActivityGroupType",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "floodlightTagType": "my_floodlightTagType",
+ * // "hidden": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "notes": "my_notes",
+ * // "publisherTags": [],
+ * // "secure": false,
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormat": "my_tagFormat",
+ * // "tagString": "my_tagString",
+ * // "userDefinedVariableTypes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivities.update
* @memberOf! ()
*
@@ -17115,6 +23897,59 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.floodlightActivityGroups.get
* @desc Gets one floodlight activity group by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivityGroups.get({
+ * // Floodlight activity Group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagString": "my_tagString",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivityGroups.get
* @memberOf! ()
*
@@ -17192,6 +24027,76 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.floodlightActivityGroups.insert
* @desc Inserts a new floodlight activity group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivityGroups.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagString": "my_tagString",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagString": "my_tagString",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivityGroups.insert
* @memberOf! ()
*
@@ -17271,6 +24176,66 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.floodlightActivityGroups.list
* @desc Retrieves a list of floodlight activity groups, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivityGroups.list({
+ * // Select only floodlight activity groups with the specified advertiser ID. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.
+ * advertiserId: 'placeholder-value',
+ * // Select only floodlight activity groups with the specified floodlight configuration ID. Must specify either advertiserId, or floodlightConfigurationId for a non-empty result.
+ * floodlightConfigurationId: 'placeholder-value',
+ * // Select only floodlight activity groups with the specified IDs. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "floodlightactivitygroup*2015" will return objects with names like "floodlightactivitygroup June 2015", "floodlightactivitygroup April 2015", or simply "floodlightactivitygroup 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "floodlightactivitygroup" will match objects with name "my floodlightactivitygroup activity", "floodlightactivitygroup 2015", or simply "floodlightactivitygroup".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only floodlight activity groups with the specified floodlight activity group type.
+ * type: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "floodlightActivityGroups": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivityGroups.list
* @memberOf! ()
*
@@ -17371,6 +24336,78 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.floodlightActivityGroups.patch
* @desc Updates an existing floodlight activity group. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivityGroups.patch({
+ * // Floodlight activity Group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagString": "my_tagString",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagString": "my_tagString",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivityGroups.patch
* @memberOf! ()
*
@@ -17449,6 +24486,76 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.floodlightActivityGroups.update
* @desc Updates an existing floodlight activity group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivityGroups.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagString": "my_tagString",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagString": "my_tagString",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivityGroups.update
* @memberOf! ()
*
@@ -17655,6 +24762,65 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.floodlightConfigurations.get
* @desc Gets one floodlight configuration by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightConfigurations.get({
+ * // Floodlight configuration ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "analyticsDataSharingEnabled": false,
+ * // "customViewabilityMetric": {},
+ * // "exposureToConversionEnabled": false,
+ * // "firstDayOfWeek": "my_firstDayOfWeek",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "inAppAttributionTrackingEnabled": false,
+ * // "kind": "my_kind",
+ * // "lookbackConfiguration": {},
+ * // "naturalSearchConversionAttributionOption": "my_naturalSearchConversionAttributionOption",
+ * // "omnitureSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "tagSettings": {},
+ * // "thirdPartyAuthenticationTokens": [],
+ * // "userDefinedVariableConfigurations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightConfigurations.get
* @memberOf! ()
*
@@ -17732,6 +24898,49 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.floodlightConfigurations.list
* @desc Retrieves a list of floodlight configurations, possibly filtered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightConfigurations.list({
+ * // Set of IDs of floodlight configurations to retrieve. Required field; otherwise an empty list will be returned.
+ * ids: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "floodlightConfigurations": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightConfigurations.list
* @memberOf! ()
*
@@ -17824,6 +25033,90 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.floodlightConfigurations.patch
* @desc Updates an existing floodlight configuration. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightConfigurations.patch({
+ * // Floodlight configuration ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "analyticsDataSharingEnabled": false,
+ * // "customViewabilityMetric": {},
+ * // "exposureToConversionEnabled": false,
+ * // "firstDayOfWeek": "my_firstDayOfWeek",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "inAppAttributionTrackingEnabled": false,
+ * // "kind": "my_kind",
+ * // "lookbackConfiguration": {},
+ * // "naturalSearchConversionAttributionOption": "my_naturalSearchConversionAttributionOption",
+ * // "omnitureSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "tagSettings": {},
+ * // "thirdPartyAuthenticationTokens": [],
+ * // "userDefinedVariableConfigurations": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "analyticsDataSharingEnabled": false,
+ * // "customViewabilityMetric": {},
+ * // "exposureToConversionEnabled": false,
+ * // "firstDayOfWeek": "my_firstDayOfWeek",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "inAppAttributionTrackingEnabled": false,
+ * // "kind": "my_kind",
+ * // "lookbackConfiguration": {},
+ * // "naturalSearchConversionAttributionOption": "my_naturalSearchConversionAttributionOption",
+ * // "omnitureSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "tagSettings": {},
+ * // "thirdPartyAuthenticationTokens": [],
+ * // "userDefinedVariableConfigurations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightConfigurations.patch
* @memberOf! ()
*
@@ -17902,6 +25195,88 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.floodlightConfigurations.update
* @desc Updates an existing floodlight configuration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightConfigurations.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "analyticsDataSharingEnabled": false,
+ * // "customViewabilityMetric": {},
+ * // "exposureToConversionEnabled": false,
+ * // "firstDayOfWeek": "my_firstDayOfWeek",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "inAppAttributionTrackingEnabled": false,
+ * // "kind": "my_kind",
+ * // "lookbackConfiguration": {},
+ * // "naturalSearchConversionAttributionOption": "my_naturalSearchConversionAttributionOption",
+ * // "omnitureSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "tagSettings": {},
+ * // "thirdPartyAuthenticationTokens": [],
+ * // "userDefinedVariableConfigurations": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "analyticsDataSharingEnabled": false,
+ * // "customViewabilityMetric": {},
+ * // "exposureToConversionEnabled": false,
+ * // "firstDayOfWeek": "my_firstDayOfWeek",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "inAppAttributionTrackingEnabled": false,
+ * // "kind": "my_kind",
+ * // "lookbackConfiguration": {},
+ * // "naturalSearchConversionAttributionOption": "my_naturalSearchConversionAttributionOption",
+ * // "omnitureSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "tagSettings": {},
+ * // "thirdPartyAuthenticationTokens": [],
+ * // "userDefinedVariableConfigurations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightConfigurations.update
* @memberOf! ()
*
@@ -18059,6 +25434,69 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.inventoryItems.get
* @desc Gets one inventory item by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.inventoryItems.get({
+ * // Inventory item ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Project ID for order documents.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adSlots": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "estimatedClickThroughRate": "my_estimatedClickThroughRate",
+ * // "estimatedConversionRate": "my_estimatedConversionRate",
+ * // "id": "my_id",
+ * // "inPlan": false,
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "negotiationChannelId": "my_negotiationChannelId",
+ * // "orderId": "my_orderId",
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricing": {},
+ * // "projectId": "my_projectId",
+ * // "rfpId": "my_rfpId",
+ * // "siteId": "my_siteId",
+ * // "subaccountId": "my_subaccountId",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.inventoryItems.get
* @memberOf! ()
*
@@ -18135,6 +25573,68 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.inventoryItems.list
* @desc Retrieves a list of inventory items, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.inventoryItems.list({
+ * // Select only inventory items with these IDs.
+ * ids: 'placeholder-value',
+ * // Select only inventory items that are in plan.
+ * inPlan: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Select only inventory items that belong to specified orders.
+ * orderId: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Project ID for order documents.
+ * projectId: 'placeholder-value',
+ * // Select only inventory items that are associated with these sites.
+ * siteId: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only inventory items with this type.
+ * type: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "inventoryItems": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.inventoryItems.list
* @memberOf! ()
*
@@ -18306,6 +25806,47 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.languages.list
* @desc Retrieves a list of languages.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.languages.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "languages": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.languages.list
* @memberOf! ()
*
@@ -18399,6 +25940,47 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.metros.list
* @desc Retrieves a list of metros.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.metros.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "metros": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.metros.list
* @memberOf! ()
*
@@ -18490,6 +26072,52 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.mobileApps.get
* @desc Gets one mobile app by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.mobileApps.get({
+ * // Mobile app ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "directory": "my_directory",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "publisherName": "my_publisherName",
+ * // "title": "my_title"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.mobileApps.get
* @memberOf! ()
*
@@ -18564,6 +26192,58 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.mobileApps.list
* @desc Retrieves list of available mobile apps.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.mobileApps.list({
+ * // Select only apps from these directories.
+ * directories: 'placeholder-value',
+ * // Select only apps with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "app*2015" will return objects with names like "app Jan 2018", "app Jan 2018", or simply "app 2018". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "app" will match objects with name "my app", "app 2018", or simply "app".
+ * searchString: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "mobileApps": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.mobileApps.list
* @memberOf! ()
*
@@ -18697,6 +26377,52 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.mobileCarriers.get
* @desc Gets one mobile carrier by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.mobileCarriers.get({
+ * // Mobile carrier ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "countryCode": "my_countryCode",
+ * // "countryDartId": "my_countryDartId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.mobileCarriers.get
* @memberOf! ()
*
@@ -18772,6 +26498,47 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.mobileCarriers.list
* @desc Retrieves a list of mobile carriers.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.mobileCarriers.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "mobileCarriers": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.mobileCarriers.list
* @memberOf! ()
*
@@ -18889,6 +26656,52 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.operatingSystems.get
* @desc Gets one operating system by DART ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.operatingSystems.get({
+ * // Operating system DART ID.
+ * dartId: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dartId": "my_dartId",
+ * // "desktop": false,
+ * // "kind": "my_kind",
+ * // "mobile": false,
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.operatingSystems.get
* @memberOf! ()
*
@@ -18964,6 +26777,47 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.operatingSystems.list
* @desc Retrieves a list of operating systems.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.operatingSystems.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "operatingSystems": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.operatingSystems.list
* @memberOf! ()
*
@@ -19083,6 +26937,53 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.operatingSystemVersions.get
* @desc Gets one operating system version by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.operatingSystemVersions.get({
+ * // Operating system version ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "majorVersion": "my_majorVersion",
+ * // "minorVersion": "my_minorVersion",
+ * // "name": "my_name",
+ * // "operatingSystem": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.operatingSystemVersions.get
* @memberOf! ()
*
@@ -19160,6 +27061,47 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.operatingSystemVersions.list
* @desc Retrieves a list of operating system versions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.operatingSystemVersions.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "operatingSystemVersions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.operatingSystemVersions.list
* @memberOf! ()
*
@@ -19281,6 +27223,66 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.orderDocuments.get
* @desc Gets one order document by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.orderDocuments.get({
+ * // Order document ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Project ID for order documents.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "amendedOrderDocumentId": "my_amendedOrderDocumentId",
+ * // "approvedByUserProfileIds": [],
+ * // "cancelled": false,
+ * // "createdInfo": {},
+ * // "effectiveDate": "my_effectiveDate",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastSentRecipients": [],
+ * // "lastSentTime": "my_lastSentTime",
+ * // "orderId": "my_orderId",
+ * // "projectId": "my_projectId",
+ * // "signed": false,
+ * // "subaccountId": "my_subaccountId",
+ * // "title": "my_title",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.orderDocuments.get
* @memberOf! ()
*
@@ -19357,6 +27359,68 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.orderDocuments.list
* @desc Retrieves a list of order documents, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.orderDocuments.list({
+ * // Select only order documents that have been approved by at least one user.
+ * approved: 'placeholder-value',
+ * // Select only order documents with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Select only order documents for specified orders.
+ * orderId: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Project ID for order documents.
+ * projectId: 'placeholder-value',
+ * // Allows searching for order documents by name or ID. Wildcards (*) are allowed. For example, "orderdocument*2015" will return order documents with names like "orderdocument June 2015", "orderdocument April 2015", or simply "orderdocument 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "orderdocument" will match order documents with name "my orderdocument", "orderdocument 2015", or simply "orderdocument".
+ * searchString: 'placeholder-value',
+ * // Select only order documents that are associated with these sites.
+ * siteId: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "orderDocuments": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.orderDocuments.list
* @memberOf! ()
*
@@ -19528,6 +27592,69 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.orders.get
* @desc Gets one order by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.orders.get({
+ * // Order ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Project ID for orders.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "approverUserProfileIds": [],
+ * // "buyerInvoiceId": "my_buyerInvoiceId",
+ * // "buyerOrganizationName": "my_buyerOrganizationName",
+ * // "comments": "my_comments",
+ * // "contacts": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "notes": "my_notes",
+ * // "planningTermId": "my_planningTermId",
+ * // "projectId": "my_projectId",
+ * // "sellerOrderId": "my_sellerOrderId",
+ * // "sellerOrganizationName": "my_sellerOrganizationName",
+ * // "siteId": [],
+ * // "siteNames": [],
+ * // "subaccountId": "my_subaccountId",
+ * // "termsAndConditions": "my_termsAndConditions"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.orders.get
* @memberOf! ()
*
@@ -19601,6 +27728,64 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.orders.list
* @desc Retrieves a list of orders, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.orders.list({
+ * // Select only orders with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Project ID for orders.
+ * projectId: 'placeholder-value',
+ * // Allows searching for orders by name or ID. Wildcards (*) are allowed. For example, "order*2015" will return orders with names like "order June 2015", "order April 2015", or simply "order 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "order" will match orders with name "my order", "order 2015", or simply "order".
+ * searchString: 'placeholder-value',
+ * // Select only orders that are associated with these site IDs.
+ * siteId: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "orders": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.orders.list
* @memberOf! ()
*
@@ -19752,6 +27937,73 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.placementGroups.get
* @desc Gets one placement group by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementGroups.get({
+ * // Placement group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "childPlacementIds": [],
+ * // "comment": "my_comment",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementGroupType": "my_placementGroupType",
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primaryPlacementId": "my_primaryPlacementId",
+ * // "primaryPlacementIdDimensionValue": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementGroups.get
* @memberOf! ()
*
@@ -19827,6 +28079,104 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.placementGroups.insert
* @desc Inserts a new placement group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementGroups.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "childPlacementIds": [],
+ * // "comment": "my_comment",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementGroupType": "my_placementGroupType",
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primaryPlacementId": "my_primaryPlacementId",
+ * // "primaryPlacementIdDimensionValue": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "childPlacementIds": [],
+ * // "comment": "my_comment",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementGroupType": "my_placementGroupType",
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primaryPlacementId": "my_primaryPlacementId",
+ * // "primaryPlacementIdDimensionValue": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementGroups.insert
* @memberOf! ()
*
@@ -19902,6 +28252,86 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.placementGroups.list
* @desc Retrieves a list of placement groups, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementGroups.list({
+ * // Select only placement groups that belong to these advertisers.
+ * advertiserIds: 'placeholder-value',
+ * // Select only archived placements. Don't set this field to select both archived and non-archived placements.
+ * archived: 'placeholder-value',
+ * // Select only placement groups that belong to these campaigns.
+ * campaignIds: 'placeholder-value',
+ * // Select only placement groups that are associated with these content categories.
+ * contentCategoryIds: 'placeholder-value',
+ * // Select only placement groups that are associated with these directory sites.
+ * directorySiteIds: 'placeholder-value',
+ * // Select only placement groups with these IDs.
+ * ids: 'placeholder-value',
+ * // Select only placements or placement groups whose end date is on or before the specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
+ * maxEndDate: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Select only placements or placement groups whose start date is on or before the specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
+ * maxStartDate: 'placeholder-value',
+ * // Select only placements or placement groups whose end date is on or after the specified minEndDate. The date should be formatted as "yyyy-MM-dd".
+ * minEndDate: 'placeholder-value',
+ * // Select only placements or placement groups whose start date is on or after the specified minStartDate. The date should be formatted as "yyyy-MM-dd".
+ * minStartDate: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // Select only placement groups belonging with this group type. A package is a simple group of placements that acts as a single pricing point for a group of tags. A roadblock is a group of placements that not only acts as a single pricing point but also assumes that all the tags in it will be served at the same time. A roadblock requires one of its assigned placements to be marked as primary for reporting.
+ * placementGroupType: 'placeholder-value',
+ * // Select only placement groups that are associated with these placement strategies.
+ * placementStrategyIds: 'placeholder-value',
+ * // Select only placement groups with these pricing types.
+ * pricingTypes: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for placement groups by name or ID. Wildcards (*) are allowed. For example, "placement*2015" will return placement groups with names like "placement group June 2015", "placement group May 2015", or simply "placements 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "placementgroup" will match placement groups with name "my placementgroup", "placementgroup 2015", or simply "placementgroup".
+ * searchString: 'placeholder-value',
+ * // Select only placement groups that are associated with these sites.
+ * siteIds: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "placementGroups": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementGroups.list
* @memberOf! ()
*
@@ -20002,6 +28432,106 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.placementGroups.patch
* @desc Updates an existing placement group. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementGroups.patch({
+ * // Placement group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "childPlacementIds": [],
+ * // "comment": "my_comment",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementGroupType": "my_placementGroupType",
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primaryPlacementId": "my_primaryPlacementId",
+ * // "primaryPlacementIdDimensionValue": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "childPlacementIds": [],
+ * // "comment": "my_comment",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementGroupType": "my_placementGroupType",
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primaryPlacementId": "my_primaryPlacementId",
+ * // "primaryPlacementIdDimensionValue": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementGroups.patch
* @memberOf! ()
*
@@ -20078,6 +28608,104 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.placementGroups.update
* @desc Updates an existing placement group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementGroups.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "childPlacementIds": [],
+ * // "comment": "my_comment",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementGroupType": "my_placementGroupType",
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primaryPlacementId": "my_primaryPlacementId",
+ * // "primaryPlacementIdDimensionValue": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "childPlacementIds": [],
+ * // "comment": "my_comment",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementGroupType": "my_placementGroupType",
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primaryPlacementId": "my_primaryPlacementId",
+ * // "primaryPlacementIdDimensionValue": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementGroups.update
* @memberOf! ()
*
@@ -20320,6 +28948,55 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.placements.generatetags
* @desc Generates tags for a placement.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placements.generatetags({
+ * // Generate placements belonging to this campaign. This is a required field.
+ * campaignId: 'placeholder-value',
+ * // Generate tags for these placements.
+ * placementIds: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Tag formats to generate for these placements.
+ * //
+ * // Note: PLACEMENT_TAG_STANDARD can only be generated for 1x1 placements.
+ * tagFormats: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "placementTags": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placements.generatetags
* @memberOf! ()
*
@@ -20406,6 +29083,88 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.placements.get
* @desc Gets one placement by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placements.get({
+ * // Placement ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingOptOut": false,
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "comment": "my_comment",
+ * // "compatibility": "my_compatibility",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "lookbackConfiguration": {},
+ * // "name": "my_name",
+ * // "paymentApproved": false,
+ * // "paymentSource": "my_paymentSource",
+ * // "placementGroupId": "my_placementGroupId",
+ * // "placementGroupIdDimensionValue": {},
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primary": false,
+ * // "publisherUpdateInfo": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "size": {},
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormats": [],
+ * // "tagSetting": {},
+ * // "videoActiveViewOptOut": false,
+ * // "videoSettings": {},
+ * // "vpaidAdapterChoice": "my_vpaidAdapterChoice"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placements.get
* @memberOf! ()
*
@@ -20480,6 +29239,134 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.placements.insert
* @desc Inserts a new placement.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placements.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingOptOut": false,
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "comment": "my_comment",
+ * // "compatibility": "my_compatibility",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "lookbackConfiguration": {},
+ * // "name": "my_name",
+ * // "paymentApproved": false,
+ * // "paymentSource": "my_paymentSource",
+ * // "placementGroupId": "my_placementGroupId",
+ * // "placementGroupIdDimensionValue": {},
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primary": false,
+ * // "publisherUpdateInfo": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "size": {},
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormats": [],
+ * // "tagSetting": {},
+ * // "videoActiveViewOptOut": false,
+ * // "videoSettings": {},
+ * // "vpaidAdapterChoice": "my_vpaidAdapterChoice"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingOptOut": false,
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "comment": "my_comment",
+ * // "compatibility": "my_compatibility",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "lookbackConfiguration": {},
+ * // "name": "my_name",
+ * // "paymentApproved": false,
+ * // "paymentSource": "my_paymentSource",
+ * // "placementGroupId": "my_placementGroupId",
+ * // "placementGroupIdDimensionValue": {},
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primary": false,
+ * // "publisherUpdateInfo": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "size": {},
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormats": [],
+ * // "tagSetting": {},
+ * // "videoActiveViewOptOut": false,
+ * // "videoSettings": {},
+ * // "vpaidAdapterChoice": "my_vpaidAdapterChoice"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placements.insert
* @memberOf! ()
*
@@ -20554,6 +29441,92 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.placements.list
* @desc Retrieves a list of placements, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placements.list({
+ * // Select only placements that belong to these advertisers.
+ * advertiserIds: 'placeholder-value',
+ * // Select only archived placements. Don't set this field to select both archived and non-archived placements.
+ * archived: 'placeholder-value',
+ * // Select only placements that belong to these campaigns.
+ * campaignIds: 'placeholder-value',
+ * // Select only placements that are associated with these compatibilities. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard.
+ * compatibilities: 'placeholder-value',
+ * // Select only placements that are associated with these content categories.
+ * contentCategoryIds: 'placeholder-value',
+ * // Select only placements that are associated with these directory sites.
+ * directorySiteIds: 'placeholder-value',
+ * // Select only placements that belong to these placement groups.
+ * groupIds: 'placeholder-value',
+ * // Select only placements with these IDs.
+ * ids: 'placeholder-value',
+ * // Select only placements or placement groups whose end date is on or before the specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
+ * maxEndDate: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Select only placements or placement groups whose start date is on or before the specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
+ * maxStartDate: 'placeholder-value',
+ * // Select only placements or placement groups whose end date is on or after the specified minEndDate. The date should be formatted as "yyyy-MM-dd".
+ * minEndDate: 'placeholder-value',
+ * // Select only placements or placement groups whose start date is on or after the specified minStartDate. The date should be formatted as "yyyy-MM-dd".
+ * minStartDate: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // Select only placements with this payment source.
+ * paymentSource: 'placeholder-value',
+ * // Select only placements that are associated with these placement strategies.
+ * placementStrategyIds: 'placeholder-value',
+ * // Select only placements with these pricing types.
+ * pricingTypes: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for placements by name or ID. Wildcards (*) are allowed. For example, "placement*2015" will return placements with names like "placement June 2015", "placement May 2015", or simply "placements 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "placement" will match placements with name "my placement", "placement 2015", or simply "placement".
+ * searchString: 'placeholder-value',
+ * // Select only placements that are associated with these sites.
+ * siteIds: 'placeholder-value',
+ * // Select only placements that are associated with these sizes.
+ * sizeIds: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "placements": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placements.list
* @memberOf! ()
*
@@ -20650,6 +29623,136 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.placements.patch
* @desc Updates an existing placement. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placements.patch({
+ * // Placement ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingOptOut": false,
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "comment": "my_comment",
+ * // "compatibility": "my_compatibility",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "lookbackConfiguration": {},
+ * // "name": "my_name",
+ * // "paymentApproved": false,
+ * // "paymentSource": "my_paymentSource",
+ * // "placementGroupId": "my_placementGroupId",
+ * // "placementGroupIdDimensionValue": {},
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primary": false,
+ * // "publisherUpdateInfo": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "size": {},
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormats": [],
+ * // "tagSetting": {},
+ * // "videoActiveViewOptOut": false,
+ * // "videoSettings": {},
+ * // "vpaidAdapterChoice": "my_vpaidAdapterChoice"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingOptOut": false,
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "comment": "my_comment",
+ * // "compatibility": "my_compatibility",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "lookbackConfiguration": {},
+ * // "name": "my_name",
+ * // "paymentApproved": false,
+ * // "paymentSource": "my_paymentSource",
+ * // "placementGroupId": "my_placementGroupId",
+ * // "placementGroupIdDimensionValue": {},
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primary": false,
+ * // "publisherUpdateInfo": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "size": {},
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormats": [],
+ * // "tagSetting": {},
+ * // "videoActiveViewOptOut": false,
+ * // "videoSettings": {},
+ * // "vpaidAdapterChoice": "my_vpaidAdapterChoice"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placements.patch
* @memberOf! ()
*
@@ -20724,6 +29827,134 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.placements.update
* @desc Updates an existing placement.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placements.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingOptOut": false,
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "comment": "my_comment",
+ * // "compatibility": "my_compatibility",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "lookbackConfiguration": {},
+ * // "name": "my_name",
+ * // "paymentApproved": false,
+ * // "paymentSource": "my_paymentSource",
+ * // "placementGroupId": "my_placementGroupId",
+ * // "placementGroupIdDimensionValue": {},
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primary": false,
+ * // "publisherUpdateInfo": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "size": {},
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormats": [],
+ * // "tagSetting": {},
+ * // "videoActiveViewOptOut": false,
+ * // "videoSettings": {},
+ * // "vpaidAdapterChoice": "my_vpaidAdapterChoice"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingOptOut": false,
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "comment": "my_comment",
+ * // "compatibility": "my_compatibility",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "lookbackConfiguration": {},
+ * // "name": "my_name",
+ * // "paymentApproved": false,
+ * // "paymentSource": "my_paymentSource",
+ * // "placementGroupId": "my_placementGroupId",
+ * // "placementGroupIdDimensionValue": {},
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primary": false,
+ * // "publisherUpdateInfo": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "size": {},
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormats": [],
+ * // "tagSetting": {},
+ * // "videoActiveViewOptOut": false,
+ * // "videoSettings": {},
+ * // "vpaidAdapterChoice": "my_vpaidAdapterChoice"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placements.update
* @memberOf! ()
*
@@ -20998,6 +30229,43 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.placementStrategies.delete
* @desc Deletes an existing placement strategy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementStrategies.delete({
+ * // Placement strategy ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementStrategies.delete
* @memberOf! ()
*
@@ -21071,6 +30339,51 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.placementStrategies.get
* @desc Gets one placement strategy by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementStrategies.get({
+ * // Placement strategy ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementStrategies.get
* @memberOf! ()
*
@@ -21146,6 +30459,60 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.placementStrategies.insert
* @desc Inserts a new placement strategy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementStrategies.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementStrategies.insert
* @memberOf! ()
*
@@ -21221,6 +30588,60 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.placementStrategies.list
* @desc Retrieves a list of placement strategies, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementStrategies.list({
+ * // Select only placement strategies with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "placementstrategy*2015" will return objects with names like "placementstrategy June 2015", "placementstrategy April 2015", or simply "placementstrategy 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "placementstrategy" will match objects with name "my placementstrategy", "placementstrategy 2015", or simply "placementstrategy".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "placementStrategies": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementStrategies.list
* @memberOf! ()
*
@@ -21310,6 +30731,62 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.placementStrategies.patch
* @desc Updates an existing placement strategy. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementStrategies.patch({
+ * // Placement strategy ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementStrategies.patch
* @memberOf! ()
*
@@ -21386,6 +30863,60 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.placementStrategies.update
* @desc Updates an existing placement strategy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementStrategies.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementStrategies.update
* @memberOf! ()
*
@@ -21592,6 +31123,50 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.platformTypes.get
* @desc Gets one platform type by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.platformTypes.get({
+ * // Platform type ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.platformTypes.get
* @memberOf! ()
*
@@ -21667,6 +31242,47 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.platformTypes.list
* @desc Retrieves a list of platform types.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.platformTypes.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "platformTypes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.platformTypes.list
* @memberOf! ()
*
@@ -21784,6 +31400,52 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.postalCodes.get
* @desc Gets one postal code by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.postalCodes.get({
+ * // Postal code ID.
+ * code: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "code": "my_code",
+ * // "countryCode": "my_countryCode",
+ * // "countryDartId": "my_countryDartId",
+ * // "id": "my_id",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.postalCodes.get
* @memberOf! ()
*
@@ -21858,6 +31520,47 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.postalCodes.list
* @desc Retrieves a list of postal codes.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.postalCodes.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "postalCodes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.postalCodes.list
* @memberOf! ()
*
@@ -21967,6 +31670,69 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.projects.get
* @desc Gets one project by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.projects.get({
+ * // Project ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "audienceAgeGroup": "my_audienceAgeGroup",
+ * // "audienceGender": "my_audienceGender",
+ * // "budget": "my_budget",
+ * // "clientBillingCode": "my_clientBillingCode",
+ * // "clientName": "my_clientName",
+ * // "endDate": "my_endDate",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "overview": "my_overview",
+ * // "startDate": "my_startDate",
+ * // "subaccountId": "my_subaccountId",
+ * // "targetClicks": "my_targetClicks",
+ * // "targetConversions": "my_targetConversions",
+ * // "targetCpaNanos": "my_targetCpaNanos",
+ * // "targetCpcNanos": "my_targetCpcNanos",
+ * // "targetCpmActiveViewNanos": "my_targetCpmActiveViewNanos",
+ * // "targetCpmNanos": "my_targetCpmNanos",
+ * // "targetImpressions": "my_targetImpressions"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.projects.get
* @memberOf! ()
*
@@ -22039,6 +31805,62 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.projects.list
* @desc Retrieves a list of projects, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.projects.list({
+ * // Select only projects with these advertiser IDs.
+ * advertiserIds: 'placeholder-value',
+ * // Select only projects with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for projects by name or ID. Wildcards (*) are allowed. For example, "project*2015" will return projects with names like "project June 2015", "project April 2015", or simply "project 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "project" will match projects with name "my project", "project 2015", or simply "project".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "projects": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.projects.list
* @memberOf! ()
*
@@ -22182,6 +32004,47 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.regions.list
* @desc Retrieves a list of regions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.regions.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "regions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.regions.list
* @memberOf! ()
*
@@ -22273,6 +32136,60 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.remarketingLists.get
* @desc Gets one remarketing list by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.remarketingLists.get({
+ * // Remarketing list ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lifeSpan": "my_lifeSpan",
+ * // "listPopulationRule": {},
+ * // "listSize": "my_listSize",
+ * // "listSource": "my_listSource",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.remarketingLists.get
* @memberOf! ()
*
@@ -22348,6 +32265,78 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.remarketingLists.insert
* @desc Inserts a new remarketing list.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.remarketingLists.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lifeSpan": "my_lifeSpan",
+ * // "listPopulationRule": {},
+ * // "listSize": "my_listSize",
+ * // "listSource": "my_listSource",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lifeSpan": "my_lifeSpan",
+ * // "listPopulationRule": {},
+ * // "listSize": "my_listSize",
+ * // "listSource": "my_listSource",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.remarketingLists.insert
* @memberOf! ()
*
@@ -22423,6 +32412,64 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.remarketingLists.list
* @desc Retrieves a list of remarketing lists, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.remarketingLists.list({
+ * // Select only active or only inactive remarketing lists.
+ * active: 'placeholder-value',
+ * // Select only remarketing lists owned by this advertiser.
+ * advertiserId: 'placeholder-value',
+ * // Select only remarketing lists that have this floodlight activity ID.
+ * floodlightActivityId: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "remarketing list*2015" will return objects with names like "remarketing list June 2015", "remarketing list April 2015", or simply "remarketing list 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "remarketing list" will match objects with name "my remarketing list", "remarketing list 2015", or simply "remarketing list".
+ * name: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "remarketingLists": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.remarketingLists.list
* @memberOf! ()
*
@@ -22514,6 +32561,80 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.remarketingLists.patch
* @desc Updates an existing remarketing list. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.remarketingLists.patch({
+ * // Remarketing list ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lifeSpan": "my_lifeSpan",
+ * // "listPopulationRule": {},
+ * // "listSize": "my_listSize",
+ * // "listSource": "my_listSource",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lifeSpan": "my_lifeSpan",
+ * // "listPopulationRule": {},
+ * // "listSize": "my_listSize",
+ * // "listSource": "my_listSource",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.remarketingLists.patch
* @memberOf! ()
*
@@ -22590,6 +32711,78 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.remarketingLists.update
* @desc Updates an existing remarketing list.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.remarketingLists.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lifeSpan": "my_lifeSpan",
+ * // "listPopulationRule": {},
+ * // "listSize": "my_listSize",
+ * // "listSource": "my_listSource",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lifeSpan": "my_lifeSpan",
+ * // "listPopulationRule": {},
+ * // "listSize": "my_listSize",
+ * // "listSource": "my_listSource",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.remarketingLists.update
* @memberOf! ()
*
@@ -22788,6 +32981,51 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.remarketingListShares.get
* @desc Gets one remarketing list share by remarketing list ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.remarketingListShares.get({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Remarketing list ID.
+ * remarketingListId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "remarketingListId": "my_remarketingListId",
+ * // "sharedAccountIds": [],
+ * // "sharedAdvertiserIds": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.remarketingListShares.get
* @memberOf! ()
*
@@ -22865,6 +33103,62 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.remarketingListShares.patch
* @desc Updates an existing remarketing list share. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.remarketingListShares.patch({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Remarketing list ID.
+ * remarketingListId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "remarketingListId": "my_remarketingListId",
+ * // "sharedAccountIds": [],
+ * // "sharedAdvertiserIds": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "remarketingListId": "my_remarketingListId",
+ * // "sharedAccountIds": [],
+ * // "sharedAdvertiserIds": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.remarketingListShares.patch
* @memberOf! ()
*
@@ -22943,6 +33237,60 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.remarketingListShares.update
* @desc Updates an existing remarketing list share.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.remarketingListShares.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "remarketingListId": "my_remarketingListId",
+ * // "sharedAccountIds": [],
+ * // "sharedAdvertiserIds": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "remarketingListId": "my_remarketingListId",
+ * // "sharedAccountIds": [],
+ * // "sharedAdvertiserIds": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.remarketingListShares.update
* @memberOf! ()
*
@@ -23088,6 +33436,43 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.reports.delete
* @desc Deletes a report by its ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.delete({
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ * // The ID of the report.
+ * reportId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.delete
* @memberOf! ()
*
@@ -23160,6 +33545,65 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.reports.get
* @desc Retrieves a report by its ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.get({
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ * // The ID of the report.
+ * reportId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "criteria": {},
+ * // "crossDimensionReachCriteria": {},
+ * // "delivery": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "floodlightCriteria": {},
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name",
+ * // "ownerProfileId": "my_ownerProfileId",
+ * // "pathToConversionCriteria": {},
+ * // "reachCriteria": {},
+ * // "schedule": {},
+ * // "subAccountId": "my_subAccountId",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.get
* @memberOf! ()
*
@@ -23232,6 +33676,88 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.reports.insert
* @desc Creates a report.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.insert({
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "criteria": {},
+ * // "crossDimensionReachCriteria": {},
+ * // "delivery": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "floodlightCriteria": {},
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name",
+ * // "ownerProfileId": "my_ownerProfileId",
+ * // "pathToConversionCriteria": {},
+ * // "reachCriteria": {},
+ * // "schedule": {},
+ * // "subAccountId": "my_subAccountId",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "criteria": {},
+ * // "crossDimensionReachCriteria": {},
+ * // "delivery": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "floodlightCriteria": {},
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name",
+ * // "ownerProfileId": "my_ownerProfileId",
+ * // "pathToConversionCriteria": {},
+ * // "reachCriteria": {},
+ * // "schedule": {},
+ * // "subAccountId": "my_subAccountId",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.insert
* @memberOf! ()
*
@@ -23303,6 +33829,59 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.reports.list
* @desc Retrieves list of reports.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.list({
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // The value of the nextToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ * // The scope that defines which results are returned.
+ * scope: 'placeholder-value',
+ * // The field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.list
* @memberOf! ()
*
@@ -23380,6 +33959,90 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.reports.patch
* @desc Updates a report. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.patch({
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ * // The ID of the report.
+ * reportId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "criteria": {},
+ * // "crossDimensionReachCriteria": {},
+ * // "delivery": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "floodlightCriteria": {},
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name",
+ * // "ownerProfileId": "my_ownerProfileId",
+ * // "pathToConversionCriteria": {},
+ * // "reachCriteria": {},
+ * // "schedule": {},
+ * // "subAccountId": "my_subAccountId",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "criteria": {},
+ * // "crossDimensionReachCriteria": {},
+ * // "delivery": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "floodlightCriteria": {},
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name",
+ * // "ownerProfileId": "my_ownerProfileId",
+ * // "pathToConversionCriteria": {},
+ * // "reachCriteria": {},
+ * // "schedule": {},
+ * // "subAccountId": "my_subAccountId",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.patch
* @memberOf! ()
*
@@ -23453,6 +34116,59 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.reports.run
* @desc Runs a report.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.run({
+ * // The DFA profile ID.
+ * profileId: 'placeholder-value',
+ * // The ID of the report.
+ * reportId: 'placeholder-value',
+ * // If set and true, tries to run the report synchronously.
+ * synchronous: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dateRange": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "reportId": "my_reportId",
+ * // "status": "my_status",
+ * // "urls": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.run
* @memberOf! ()
*
@@ -23526,6 +34242,90 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.reports.update
* @desc Updates a report.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.update({
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ * // The ID of the report.
+ * reportId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "criteria": {},
+ * // "crossDimensionReachCriteria": {},
+ * // "delivery": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "floodlightCriteria": {},
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name",
+ * // "ownerProfileId": "my_ownerProfileId",
+ * // "pathToConversionCriteria": {},
+ * // "reachCriteria": {},
+ * // "schedule": {},
+ * // "subAccountId": "my_subAccountId",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "criteria": {},
+ * // "crossDimensionReachCriteria": {},
+ * // "delivery": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "floodlightCriteria": {},
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name",
+ * // "ownerProfileId": "my_ownerProfileId",
+ * // "pathToConversionCriteria": {},
+ * // "reachCriteria": {},
+ * // "schedule": {},
+ * // "subAccountId": "my_subAccountId",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.update
* @memberOf! ()
*
@@ -23743,6 +34543,76 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.reports.compatibleFields.query
* @desc Returns the fields that are compatible to be selected in the respective sections of a report criteria, given the fields already selected in the input report and user permissions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.compatibleFields.query({
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "criteria": {},
+ * // "crossDimensionReachCriteria": {},
+ * // "delivery": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "floodlightCriteria": {},
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name",
+ * // "ownerProfileId": "my_ownerProfileId",
+ * // "pathToConversionCriteria": {},
+ * // "reachCriteria": {},
+ * // "schedule": {},
+ * // "subAccountId": "my_subAccountId",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "crossDimensionReachReportCompatibleFields": {},
+ * // "floodlightReportCompatibleFields": {},
+ * // "kind": "my_kind",
+ * // "pathToConversionReportCompatibleFields": {},
+ * // "reachReportCompatibleFields": {},
+ * // "reportCompatibleFields": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.compatibleFields.query
* @memberOf! ()
*
@@ -23843,6 +34713,59 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.reports.files.get
* @desc Retrieves a report file by its report ID and file ID. This method supports media download.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.files.get({
+ * // The ID of the report file.
+ * fileId: 'placeholder-value',
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ * // The ID of the report.
+ * reportId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dateRange": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "reportId": "my_reportId",
+ * // "status": "my_status",
+ * // "urls": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.files.get
* @memberOf! ()
*
@@ -23917,6 +34840,59 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.reports.files.list
* @desc Lists files for a report.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.files.list({
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // The value of the nextToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ * // The ID of the report.
+ * reportId: 'placeholder-value',
+ * // The field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.files.list
* @memberOf! ()
*
@@ -24054,6 +35030,60 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.sites.get
* @desc Gets one site by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.sites.get({
+ * // Site ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "approved": false,
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteContacts": [],
+ * // "siteSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "videoSettings": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.sites.get
* @memberOf! ()
*
@@ -24125,6 +35155,78 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.sites.insert
* @desc Inserts a new site.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.sites.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "approved": false,
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteContacts": [],
+ * // "siteSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "videoSettings": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "approved": false,
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteContacts": [],
+ * // "siteSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "videoSettings": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.sites.insert
* @memberOf! ()
*
@@ -24196,6 +35298,78 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.sites.list
* @desc Retrieves a list of sites, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.sites.list({
+ * // This search filter is no longer supported and will have no effect on the results returned.
+ * acceptsInStreamVideoPlacements: 'placeholder-value',
+ * // This search filter is no longer supported and will have no effect on the results returned.
+ * acceptsInterstitialPlacements: 'placeholder-value',
+ * // Select only sites that accept publisher paid placements.
+ * acceptsPublisherPaidPlacements: 'placeholder-value',
+ * // Select only AdWords sites.
+ * adWordsSite: 'placeholder-value',
+ * // Select only approved sites.
+ * approved: 'placeholder-value',
+ * // Select only sites with these campaign IDs.
+ * campaignIds: 'placeholder-value',
+ * // Select only sites with these directory site IDs.
+ * directorySiteIds: 'placeholder-value',
+ * // Select only sites with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name, ID or keyName. Wildcards (*) are allowed. For example, "site*2015" will return objects with names like "site June 2015", "site April 2015", or simply "site 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "site" will match objects with name "my site", "site 2015", or simply "site".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only sites with this subaccount ID.
+ * subaccountId: 'placeholder-value',
+ * // Select only sites that have not been mapped to a directory site.
+ * unmappedSite: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "sites": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.sites.list
* @memberOf! ()
*
@@ -24283,6 +35457,80 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.sites.patch
* @desc Updates an existing site. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.sites.patch({
+ * // Site ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "approved": false,
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteContacts": [],
+ * // "siteSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "videoSettings": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "approved": false,
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteContacts": [],
+ * // "siteSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "videoSettings": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.sites.patch
* @memberOf! ()
*
@@ -24355,6 +35603,78 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.sites.update
* @desc Updates an existing site.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.sites.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "approved": false,
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteContacts": [],
+ * // "siteSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "videoSettings": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "approved": false,
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteContacts": [],
+ * // "siteSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "videoSettings": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.sites.update
* @memberOf! ()
*
@@ -24572,6 +35892,52 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.sizes.get
* @desc Gets one size by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.sizes.get({
+ * // Size ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "height": 0,
+ * // "iab": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "width": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.sizes.get
* @memberOf! ()
*
@@ -24643,6 +36009,62 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.sizes.insert
* @desc Inserts a new size.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.sizes.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "height": 0,
+ * // "iab": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "width": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "height": 0,
+ * // "iab": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "width": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.sizes.insert
* @memberOf! ()
*
@@ -24714,6 +36136,55 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.sizes.list
* @desc Retrieves a list of sizes, possibly filtered. Retrieved sizes are globally unique and may include values not currently in use by your account. Due to this, the list of sizes returned by this method may differ from the list seen in the Trafficking UI.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.sizes.list({
+ * // Select only sizes with this height.
+ * height: 'placeholder-value',
+ * // Select only IAB standard sizes.
+ * iabStandard: 'placeholder-value',
+ * // Select only sizes with these IDs.
+ * ids: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Select only sizes with this width.
+ * width: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "sizes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.sizes.list
* @memberOf! ()
*
@@ -24856,6 +36327,52 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.subaccounts.get
* @desc Gets one subaccount by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.subaccounts.get({
+ * // Subaccount ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "availablePermissionIds": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.subaccounts.get
* @memberOf! ()
*
@@ -24930,6 +36447,62 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.subaccounts.insert
* @desc Inserts a new subaccount.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.subaccounts.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "availablePermissionIds": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "availablePermissionIds": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.subaccounts.insert
* @memberOf! ()
*
@@ -25005,6 +36578,60 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.subaccounts.list
* @desc Gets a list of subaccounts, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.subaccounts.list({
+ * // Select only subaccounts with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "subaccount*2015" will return objects with names like "subaccount June 2015", "subaccount April 2015", or simply "subaccount 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "subaccount" will match objects with name "my subaccount", "subaccount 2015", or simply "subaccount".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "subaccounts": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.subaccounts.list
* @memberOf! ()
*
@@ -25086,6 +36713,64 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.subaccounts.patch
* @desc Updates an existing subaccount. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.subaccounts.patch({
+ * // Subaccount ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "availablePermissionIds": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "availablePermissionIds": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.subaccounts.patch
* @memberOf! ()
*
@@ -25162,6 +36847,62 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.subaccounts.update
* @desc Updates an existing subaccount.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.subaccounts.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "availablePermissionIds": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "availablePermissionIds": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.subaccounts.update
* @memberOf! ()
*
@@ -25350,6 +37091,59 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.targetableRemarketingLists.get
* @desc Gets one remarketing list by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.targetableRemarketingLists.get({
+ * // Remarketing list ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lifeSpan": "my_lifeSpan",
+ * // "listSize": "my_listSize",
+ * // "listSource": "my_listSource",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.targetableRemarketingLists.get
* @memberOf! ()
*
@@ -25430,6 +37224,62 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.targetableRemarketingLists.list
* @desc Retrieves a list of targetable remarketing lists, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.targetableRemarketingLists.list({
+ * // Select only active or only inactive targetable remarketing lists.
+ * active: 'placeholder-value',
+ * // Select only targetable remarketing lists targetable by these advertisers.
+ * advertiserId: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "remarketing list*2015" will return objects with names like "remarketing list June 2015", "remarketing list April 2015", or simply "remarketing list 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "remarketing list" will match objects with name "my remarketing list", "remarketing list 2015", or simply "remarketing list".
+ * name: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "targetableRemarketingLists": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.targetableRemarketingLists.list
* @memberOf! ()
*
@@ -25592,6 +37442,60 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.targetingTemplates.get
* @desc Gets one targeting template by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.targetingTemplates.get({
+ * // Targeting template ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "dayPartTargeting": {},
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "listTargetingExpression": {},
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "technologyTargeting": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.targetingTemplates.get
* @memberOf! ()
*
@@ -25667,6 +37571,78 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.targetingTemplates.insert
* @desc Inserts a new targeting template.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.targetingTemplates.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "dayPartTargeting": {},
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "listTargetingExpression": {},
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "technologyTargeting": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "dayPartTargeting": {},
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "listTargetingExpression": {},
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "technologyTargeting": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.targetingTemplates.insert
* @memberOf! ()
*
@@ -25742,6 +37718,62 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.targetingTemplates.list
* @desc Retrieves a list of targeting templates, optionally filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.targetingTemplates.list({
+ * // Select only targeting templates with this advertiser ID.
+ * advertiserId: 'placeholder-value',
+ * // Select only targeting templates with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "template*2015" will return objects with names like "template June 2015", "template April 2015", or simply "template 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "template" will match objects with name "my template", "template 2015", or simply "template".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "targetingTemplates": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.targetingTemplates.list
* @memberOf! ()
*
@@ -25832,6 +37864,80 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.targetingTemplates.patch
* @desc Updates an existing targeting template. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.targetingTemplates.patch({
+ * // Targeting template ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "dayPartTargeting": {},
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "listTargetingExpression": {},
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "technologyTargeting": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "dayPartTargeting": {},
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "listTargetingExpression": {},
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "technologyTargeting": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.targetingTemplates.patch
* @memberOf! ()
*
@@ -25908,6 +38014,78 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.targetingTemplates.update
* @desc Updates an existing targeting template.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.targetingTemplates.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "dayPartTargeting": {},
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "listTargetingExpression": {},
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "technologyTargeting": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "dayPartTargeting": {},
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "listTargetingExpression": {},
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "technologyTargeting": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.targetingTemplates.update
* @memberOf! ()
*
@@ -26102,6 +38280,56 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.userProfiles.get
* @desc Gets one user profile by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/dfareporting',
+ * 'https://www.googleapis.com/auth/dfatrafficking',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userProfiles.get({
+ * // The user profile ID.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "accountName": "my_accountName",
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "profileId": "my_profileId",
+ * // "subAccountId": "my_subAccountId",
+ * // "subAccountName": "my_subAccountName",
+ * // "userName": "my_userName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userProfiles.get
* @memberOf! ()
*
@@ -26174,6 +38402,48 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.userProfiles.list
* @desc Retrieves list of user profiles for a user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/dfareporting',
+ * 'https://www.googleapis.com/auth/dfatrafficking',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userProfiles.list({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userProfiles.list
* @memberOf! ()
*
@@ -26273,6 +38543,50 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.userRolePermissionGroups.get
* @desc Gets one user role permission group by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRolePermissionGroups.get({
+ * // User role permission group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRolePermissionGroups.get
* @memberOf! ()
*
@@ -26350,6 +38664,47 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.userRolePermissionGroups.list
* @desc Gets a list of all supported user role permission groups.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRolePermissionGroups.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "userRolePermissionGroups": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRolePermissionGroups.list
* @memberOf! ()
*
@@ -26477,6 +38832,52 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.userRolePermissions.get
* @desc Gets one user role permission by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRolePermissions.get({
+ * // User role permission ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "availability": "my_availability",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "permissionGroupId": "my_permissionGroupId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRolePermissions.get
* @memberOf! ()
*
@@ -26552,6 +38953,49 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.userRolePermissions.list
* @desc Gets a list of user role permissions, possibly filtered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRolePermissions.list({
+ * // Select only user role permissions with these IDs.
+ * ids: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "userRolePermissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRolePermissions.list
* @memberOf! ()
*
@@ -26676,6 +39120,43 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.userRoles.delete
* @desc Deletes an existing user role.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRoles.delete({
+ * // User role ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRoles.delete
* @memberOf! ()
*
@@ -26748,6 +39229,55 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.userRoles.get
* @desc Gets one user role by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRoles.get({
+ * // User role ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "defaultUserRole": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentUserRoleId": "my_parentUserRoleId",
+ * // "permissions": [],
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRoles.get
* @memberOf! ()
*
@@ -26820,6 +39350,68 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.userRoles.insert
* @desc Inserts a new user role.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRoles.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "defaultUserRole": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentUserRoleId": "my_parentUserRoleId",
+ * // "permissions": [],
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "defaultUserRole": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentUserRoleId": "my_parentUserRoleId",
+ * // "permissions": [],
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRoles.insert
* @memberOf! ()
*
@@ -26891,6 +39483,64 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.userRoles.list
* @desc Retrieves a list of user roles, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRoles.list({
+ * // Select only account level user roles not associated with any specific subaccount.
+ * accountUserRoleOnly: 'placeholder-value',
+ * // Select only user roles with the specified IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "userrole*2015" will return objects with names like "userrole June 2015", "userrole April 2015", or simply "userrole 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "userrole" will match objects with name "my userrole", "userrole 2015", or simply "userrole".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only user roles that belong to this subaccount.
+ * subaccountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "userRoles": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRoles.list
* @memberOf! ()
*
@@ -26973,6 +39623,70 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.userRoles.patch
* @desc Updates an existing user role. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRoles.patch({
+ * // User role ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "defaultUserRole": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentUserRoleId": "my_parentUserRoleId",
+ * // "permissions": [],
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "defaultUserRole": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentUserRoleId": "my_parentUserRoleId",
+ * // "permissions": [],
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRoles.patch
* @memberOf! ()
*
@@ -27045,6 +39759,68 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.userRoles.update
* @desc Updates an existing user role.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRoles.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "defaultUserRole": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentUserRoleId": "my_parentUserRoleId",
+ * // "permissions": [],
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "defaultUserRole": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentUserRoleId": "my_parentUserRoleId",
+ * // "permissions": [],
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRoles.update
* @memberOf! ()
*
@@ -27249,6 +40025,52 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.videoFormats.get
* @desc Gets one video format by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.videoFormats.get({
+ * // Video format ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "fileType": "my_fileType",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "resolution": {},
+ * // "targetBitRate": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.videoFormats.get
* @memberOf! ()
*
@@ -27323,6 +40145,47 @@ export namespace dfareporting_v3_3 {
/**
* dfareporting.videoFormats.list
* @desc Lists available video formats.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.3');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.videoFormats.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "videoFormats": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.videoFormats.list
* @memberOf! ()
*
diff --git a/src/apis/dfareporting/v3.4.ts b/src/apis/dfareporting/v3.4.ts
index 008eb9ff0c1..b7b25a67e4b 100644
--- a/src/apis/dfareporting/v3.4.ts
+++ b/src/apis/dfareporting/v3.4.ts
@@ -6763,6 +6763,52 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.accountActiveAdSummaries.get
* @desc Gets the account's active ad summary by account ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountActiveAdSummaries.get({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Account ID.
+ * summaryAccountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "activeAds": "my_activeAds",
+ * // "activeAdsLimitTier": "my_activeAdsLimitTier",
+ * // "availableAds": "my_availableAds",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountActiveAdSummaries.get
* @memberOf! ()
*
@@ -6864,6 +6910,50 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.accountPermissionGroups.get
* @desc Gets one account permission group by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountPermissionGroups.get({
+ * // Account permission group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountPermissionGroups.get
* @memberOf! ()
*
@@ -6941,6 +7031,47 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.accountPermissionGroups.list
* @desc Retrieves the list of account permission groups.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountPermissionGroups.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountPermissionGroups": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountPermissionGroups.list
* @memberOf! ()
*
@@ -7062,6 +7193,53 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.accountPermissions.get
* @desc Gets one account permission by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountPermissions.get({
+ * // Account permission ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountProfiles": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "level": "my_level",
+ * // "name": "my_name",
+ * // "permissionGroupId": "my_permissionGroupId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountPermissions.get
* @memberOf! ()
*
@@ -7137,6 +7315,47 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.accountPermissions.list
* @desc Retrieves the list of account permissions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountPermissions.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountPermissions": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountPermissions.list
* @memberOf! ()
*
@@ -7256,6 +7475,66 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.accounts.get
* @desc Gets one account by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accounts.get({
+ * // Account ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountPermissionIds": [],
+ * // "accountProfile": "my_accountProfile",
+ * // "active": false,
+ * // "activeAdsLimitTier": "my_activeAdsLimitTier",
+ * // "activeViewOptOut": false,
+ * // "availablePermissionIds": [],
+ * // "countryId": "my_countryId",
+ * // "currencyId": "my_currencyId",
+ * // "defaultCreativeSizeId": "my_defaultCreativeSizeId",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "maximumImageSize": "my_maximumImageSize",
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "reportsConfiguration": {},
+ * // "shareReportsWithTwitter": false,
+ * // "teaserSizeLimit": "my_teaserSizeLimit"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accounts.get
* @memberOf! ()
*
@@ -7328,6 +7607,62 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.accounts.list
* @desc Retrieves the list of accounts, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accounts.list({
+ * // Select only active accounts. Don't set this field to select both active and non-active accounts.
+ * active: 'placeholder-value',
+ * // Select only accounts with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "account*2015" will return objects with names like "account June 2015", "account April 2015", or simply "account 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "account" will match objects with name "my account", "account 2015", or simply "account".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accounts": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accounts.list
* @memberOf! ()
*
@@ -7409,6 +7744,92 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.accounts.patch
* @desc Updates an existing account. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accounts.patch({
+ * // Account ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountPermissionIds": [],
+ * // "accountProfile": "my_accountProfile",
+ * // "active": false,
+ * // "activeAdsLimitTier": "my_activeAdsLimitTier",
+ * // "activeViewOptOut": false,
+ * // "availablePermissionIds": [],
+ * // "countryId": "my_countryId",
+ * // "currencyId": "my_currencyId",
+ * // "defaultCreativeSizeId": "my_defaultCreativeSizeId",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "maximumImageSize": "my_maximumImageSize",
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "reportsConfiguration": {},
+ * // "shareReportsWithTwitter": false,
+ * // "teaserSizeLimit": "my_teaserSizeLimit"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountPermissionIds": [],
+ * // "accountProfile": "my_accountProfile",
+ * // "active": false,
+ * // "activeAdsLimitTier": "my_activeAdsLimitTier",
+ * // "activeViewOptOut": false,
+ * // "availablePermissionIds": [],
+ * // "countryId": "my_countryId",
+ * // "currencyId": "my_currencyId",
+ * // "defaultCreativeSizeId": "my_defaultCreativeSizeId",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "maximumImageSize": "my_maximumImageSize",
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "reportsConfiguration": {},
+ * // "shareReportsWithTwitter": false,
+ * // "teaserSizeLimit": "my_teaserSizeLimit"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accounts.patch
* @memberOf! ()
*
@@ -7481,6 +7902,90 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.accounts.update
* @desc Updates an existing account.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accounts.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountPermissionIds": [],
+ * // "accountProfile": "my_accountProfile",
+ * // "active": false,
+ * // "activeAdsLimitTier": "my_activeAdsLimitTier",
+ * // "activeViewOptOut": false,
+ * // "availablePermissionIds": [],
+ * // "countryId": "my_countryId",
+ * // "currencyId": "my_currencyId",
+ * // "defaultCreativeSizeId": "my_defaultCreativeSizeId",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "maximumImageSize": "my_maximumImageSize",
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "reportsConfiguration": {},
+ * // "shareReportsWithTwitter": false,
+ * // "teaserSizeLimit": "my_teaserSizeLimit"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountPermissionIds": [],
+ * // "accountProfile": "my_accountProfile",
+ * // "active": false,
+ * // "activeAdsLimitTier": "my_activeAdsLimitTier",
+ * // "activeViewOptOut": false,
+ * // "availablePermissionIds": [],
+ * // "countryId": "my_countryId",
+ * // "currencyId": "my_currencyId",
+ * // "defaultCreativeSizeId": "my_defaultCreativeSizeId",
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "maximumImageSize": "my_maximumImageSize",
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "reportsConfiguration": {},
+ * // "shareReportsWithTwitter": false,
+ * // "teaserSizeLimit": "my_teaserSizeLimit"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accounts.update
* @memberOf! ()
*
@@ -7650,6 +8155,63 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.accountUserProfiles.get
* @desc Gets one account user profile by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountUserProfiles.get({
+ * // User profile ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserFilter": {},
+ * // "campaignFilter": {},
+ * // "comments": "my_comments",
+ * // "email": "my_email",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "name": "my_name",
+ * // "siteFilter": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerType": "my_traffickerType",
+ * // "userAccessType": "my_userAccessType",
+ * // "userRoleFilter": {},
+ * // "userRoleId": "my_userRoleId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountUserProfiles.get
* @memberOf! ()
*
@@ -7725,6 +8287,84 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.accountUserProfiles.insert
* @desc Inserts a new account user profile.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountUserProfiles.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserFilter": {},
+ * // "campaignFilter": {},
+ * // "comments": "my_comments",
+ * // "email": "my_email",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "name": "my_name",
+ * // "siteFilter": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerType": "my_traffickerType",
+ * // "userAccessType": "my_userAccessType",
+ * // "userRoleFilter": {},
+ * // "userRoleId": "my_userRoleId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserFilter": {},
+ * // "campaignFilter": {},
+ * // "comments": "my_comments",
+ * // "email": "my_email",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "name": "my_name",
+ * // "siteFilter": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerType": "my_traffickerType",
+ * // "userAccessType": "my_userAccessType",
+ * // "userRoleFilter": {},
+ * // "userRoleId": "my_userRoleId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountUserProfiles.insert
* @memberOf! ()
*
@@ -7800,6 +8440,66 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.accountUserProfiles.list
* @desc Retrieves a list of account user profiles, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountUserProfiles.list({
+ * // Select only active user profiles.
+ * active: 'placeholder-value',
+ * // Select only user profiles with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name, ID or email. Wildcards (*) are allowed. For example, "user profile*2015" will return objects with names like "user profile June 2015", "user profile April 2015", or simply "user profile 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "user profile" will match objects with name "my user profile", "user profile 2015", or simply "user profile".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only user profiles with the specified subaccount ID.
+ * subaccountId: 'placeholder-value',
+ * // Select only user profiles with the specified user role ID.
+ * userRoleId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountUserProfiles": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountUserProfiles.list
* @memberOf! ()
*
@@ -7892,6 +8592,86 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.accountUserProfiles.patch
* @desc Updates an existing account user profile. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountUserProfiles.patch({
+ * // User profile ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserFilter": {},
+ * // "campaignFilter": {},
+ * // "comments": "my_comments",
+ * // "email": "my_email",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "name": "my_name",
+ * // "siteFilter": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerType": "my_traffickerType",
+ * // "userAccessType": "my_userAccessType",
+ * // "userRoleFilter": {},
+ * // "userRoleId": "my_userRoleId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserFilter": {},
+ * // "campaignFilter": {},
+ * // "comments": "my_comments",
+ * // "email": "my_email",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "name": "my_name",
+ * // "siteFilter": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerType": "my_traffickerType",
+ * // "userAccessType": "my_userAccessType",
+ * // "userRoleFilter": {},
+ * // "userRoleId": "my_userRoleId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountUserProfiles.patch
* @memberOf! ()
*
@@ -7968,6 +8748,84 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.accountUserProfiles.update
* @desc Updates an existing account user profile.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.accountUserProfiles.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserFilter": {},
+ * // "campaignFilter": {},
+ * // "comments": "my_comments",
+ * // "email": "my_email",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "name": "my_name",
+ * // "siteFilter": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerType": "my_traffickerType",
+ * // "userAccessType": "my_userAccessType",
+ * // "userRoleFilter": {},
+ * // "userRoleId": "my_userRoleId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserFilter": {},
+ * // "campaignFilter": {},
+ * // "comments": "my_comments",
+ * // "email": "my_email",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "locale": "my_locale",
+ * // "name": "my_name",
+ * // "siteFilter": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerType": "my_traffickerType",
+ * // "userAccessType": "my_userAccessType",
+ * // "userRoleFilter": {},
+ * // "userRoleId": "my_userRoleId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.accountUserProfiles.update
* @memberOf! ()
*
@@ -8170,6 +9028,86 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.ads.get
* @desc Gets one ad by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.ads.get({
+ * // Ad ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentId": "my_audienceSegmentId",
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "clickThroughUrl": {},
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comments": "my_comments",
+ * // "compatibility": "my_compatibility",
+ * // "createInfo": {},
+ * // "creativeGroupAssignments": [],
+ * // "creativeRotation": {},
+ * // "dayPartTargeting": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "deliverySchedule": {},
+ * // "dynamicClickTracker": false,
+ * // "endTime": "my_endTime",
+ * // "eventTagOverrides": [],
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementAssignments": [],
+ * // "remarketingListExpression": {},
+ * // "size": {},
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "startTime": "my_startTime",
+ * // "subaccountId": "my_subaccountId",
+ * // "targetingTemplateId": "my_targetingTemplateId",
+ * // "technologyTargeting": {},
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.ads.get
* @memberOf! ()
*
@@ -8241,6 +9179,130 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.ads.insert
* @desc Inserts a new ad.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.ads.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentId": "my_audienceSegmentId",
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "clickThroughUrl": {},
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comments": "my_comments",
+ * // "compatibility": "my_compatibility",
+ * // "createInfo": {},
+ * // "creativeGroupAssignments": [],
+ * // "creativeRotation": {},
+ * // "dayPartTargeting": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "deliverySchedule": {},
+ * // "dynamicClickTracker": false,
+ * // "endTime": "my_endTime",
+ * // "eventTagOverrides": [],
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementAssignments": [],
+ * // "remarketingListExpression": {},
+ * // "size": {},
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "startTime": "my_startTime",
+ * // "subaccountId": "my_subaccountId",
+ * // "targetingTemplateId": "my_targetingTemplateId",
+ * // "technologyTargeting": {},
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentId": "my_audienceSegmentId",
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "clickThroughUrl": {},
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comments": "my_comments",
+ * // "compatibility": "my_compatibility",
+ * // "createInfo": {},
+ * // "creativeGroupAssignments": [],
+ * // "creativeRotation": {},
+ * // "dayPartTargeting": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "deliverySchedule": {},
+ * // "dynamicClickTracker": false,
+ * // "endTime": "my_endTime",
+ * // "eventTagOverrides": [],
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementAssignments": [],
+ * // "remarketingListExpression": {},
+ * // "size": {},
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "startTime": "my_startTime",
+ * // "subaccountId": "my_subaccountId",
+ * // "targetingTemplateId": "my_targetingTemplateId",
+ * // "technologyTargeting": {},
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.ads.insert
* @memberOf! ()
*
@@ -8312,6 +9374,94 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.ads.list
* @desc Retrieves a list of ads, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.ads.list({
+ * // Select only active ads.
+ * active: 'placeholder-value',
+ * // Select only ads with this advertiser ID.
+ * advertiserId: 'placeholder-value',
+ * // Select only archived ads.
+ * archived: 'placeholder-value',
+ * // Select only ads with these audience segment IDs.
+ * audienceSegmentIds: 'placeholder-value',
+ * // Select only ads with these campaign IDs.
+ * campaignIds: 'placeholder-value',
+ * // Select default ads with the specified compatibility. Applicable when type is AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering an in-stream video ads developed with the VAST standard.
+ * compatibility: 'placeholder-value',
+ * // Select only ads with these creative IDs assigned.
+ * creativeIds: 'placeholder-value',
+ * // Select only ads with these creative optimization configuration IDs.
+ * creativeOptimizationConfigurationIds: 'placeholder-value',
+ * // Select only dynamic click trackers. Applicable when type is AD_SERVING_CLICK_TRACKER. If true, select dynamic click trackers. If false, select static click trackers. Leave unset to select both.
+ * dynamicClickTracker: 'placeholder-value',
+ * // Select only ads with these IDs.
+ * ids: 'placeholder-value',
+ * // Select only ads with these landing page IDs.
+ * landingPageIds: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Select only ads with this event tag override ID.
+ * overriddenEventTagId: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // Select only ads with these placement IDs assigned.
+ * placementIds: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Select only ads whose list targeting expression use these remarketing list IDs.
+ * remarketingListIds: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "ad*2015" will return objects with names like "ad June 2015", "ad April 2015", or simply "ad 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "ad" will match objects with name "my ad", "ad 2015", or simply "ad".
+ * searchString: 'placeholder-value',
+ * // Select only ads with these size IDs.
+ * sizeIds: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only ads that are SSL-compliant.
+ * sslCompliant: 'placeholder-value',
+ * // Select only ads that require SSL.
+ * sslRequired: 'placeholder-value',
+ * // Select only ads with these types.
+ * type: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "ads": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.ads.list
* @memberOf! ()
*
@@ -8407,6 +9557,132 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.ads.patch
* @desc Updates an existing ad. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.ads.patch({
+ * // Ad ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentId": "my_audienceSegmentId",
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "clickThroughUrl": {},
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comments": "my_comments",
+ * // "compatibility": "my_compatibility",
+ * // "createInfo": {},
+ * // "creativeGroupAssignments": [],
+ * // "creativeRotation": {},
+ * // "dayPartTargeting": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "deliverySchedule": {},
+ * // "dynamicClickTracker": false,
+ * // "endTime": "my_endTime",
+ * // "eventTagOverrides": [],
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementAssignments": [],
+ * // "remarketingListExpression": {},
+ * // "size": {},
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "startTime": "my_startTime",
+ * // "subaccountId": "my_subaccountId",
+ * // "targetingTemplateId": "my_targetingTemplateId",
+ * // "technologyTargeting": {},
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentId": "my_audienceSegmentId",
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "clickThroughUrl": {},
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comments": "my_comments",
+ * // "compatibility": "my_compatibility",
+ * // "createInfo": {},
+ * // "creativeGroupAssignments": [],
+ * // "creativeRotation": {},
+ * // "dayPartTargeting": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "deliverySchedule": {},
+ * // "dynamicClickTracker": false,
+ * // "endTime": "my_endTime",
+ * // "eventTagOverrides": [],
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementAssignments": [],
+ * // "remarketingListExpression": {},
+ * // "size": {},
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "startTime": "my_startTime",
+ * // "subaccountId": "my_subaccountId",
+ * // "targetingTemplateId": "my_targetingTemplateId",
+ * // "technologyTargeting": {},
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.ads.patch
* @memberOf! ()
*
@@ -8479,6 +9755,130 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.ads.update
* @desc Updates an existing ad.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.ads.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentId": "my_audienceSegmentId",
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "clickThroughUrl": {},
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comments": "my_comments",
+ * // "compatibility": "my_compatibility",
+ * // "createInfo": {},
+ * // "creativeGroupAssignments": [],
+ * // "creativeRotation": {},
+ * // "dayPartTargeting": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "deliverySchedule": {},
+ * // "dynamicClickTracker": false,
+ * // "endTime": "my_endTime",
+ * // "eventTagOverrides": [],
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementAssignments": [],
+ * // "remarketingListExpression": {},
+ * // "size": {},
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "startTime": "my_startTime",
+ * // "subaccountId": "my_subaccountId",
+ * // "targetingTemplateId": "my_targetingTemplateId",
+ * // "technologyTargeting": {},
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentId": "my_audienceSegmentId",
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "clickThroughUrl": {},
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comments": "my_comments",
+ * // "compatibility": "my_compatibility",
+ * // "createInfo": {},
+ * // "creativeGroupAssignments": [],
+ * // "creativeRotation": {},
+ * // "dayPartTargeting": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "deliverySchedule": {},
+ * // "dynamicClickTracker": false,
+ * // "endTime": "my_endTime",
+ * // "eventTagOverrides": [],
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementAssignments": [],
+ * // "remarketingListExpression": {},
+ * // "size": {},
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "startTime": "my_startTime",
+ * // "subaccountId": "my_subaccountId",
+ * // "targetingTemplateId": "my_targetingTemplateId",
+ * // "technologyTargeting": {},
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.ads.update
* @memberOf! ()
*
@@ -8728,6 +10128,43 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.advertiserGroups.delete
* @desc Deletes an existing advertiser group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserGroups.delete({
+ * // Advertiser group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserGroups.delete
* @memberOf! ()
*
@@ -8801,6 +10238,51 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.advertiserGroups.get
* @desc Gets one advertiser group by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserGroups.get({
+ * // Advertiser group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserGroups.get
* @memberOf! ()
*
@@ -8876,6 +10358,60 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.advertiserGroups.insert
* @desc Inserts a new advertiser group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserGroups.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserGroups.insert
* @memberOf! ()
*
@@ -8951,6 +10487,60 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.advertiserGroups.list
* @desc Retrieves a list of advertiser groups, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserGroups.list({
+ * // Select only advertiser groups with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "advertiser*2015" will return objects with names like "advertiser group June 2015", "advertiser group April 2015", or simply "advertiser group 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "advertisergroup" will match objects with name "my advertisergroup", "advertisergroup 2015", or simply "advertisergroup".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "advertiserGroups": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserGroups.list
* @memberOf! ()
*
@@ -9040,6 +10630,62 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.advertiserGroups.patch
* @desc Updates an existing advertiser group. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserGroups.patch({
+ * // Advertiser group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserGroups.patch
* @memberOf! ()
*
@@ -9116,6 +10762,60 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.advertiserGroups.update
* @desc Updates an existing advertiser group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserGroups.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserGroups.update
* @memberOf! ()
*
@@ -9322,6 +11022,54 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.advertiserLandingPages.get
* @desc Gets one landing page by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserLandingPages.get({
+ * // Landing page ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "advertiserId": "my_advertiserId",
+ * // "archived": false,
+ * // "deepLinks": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserLandingPages.get
* @memberOf! ()
*
@@ -9397,6 +11145,66 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.advertiserLandingPages.insert
* @desc Inserts a new landing page.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserLandingPages.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "advertiserId": "my_advertiserId",
+ * // "archived": false,
+ * // "deepLinks": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "url": "my_url"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "advertiserId": "my_advertiserId",
+ * // "archived": false,
+ * // "deepLinks": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserLandingPages.insert
* @memberOf! ()
*
@@ -9472,6 +11280,68 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.advertiserLandingPages.list
* @desc Retrieves a list of landing pages.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserLandingPages.list({
+ * // Select only landing pages that belong to these advertisers.
+ * advertiserIds: 'placeholder-value',
+ * // Select only archived landing pages. Don't set this field to select both archived and non-archived landing pages.
+ * archived: 'placeholder-value',
+ * // Select only landing pages that are associated with these campaigns.
+ * campaignIds: 'placeholder-value',
+ * // Select only landing pages with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for landing pages by name or ID. Wildcards (*) are allowed. For example, "landingpage*2017" will return landing pages with names like "landingpage July 2017", "landingpage March 2017", or simply "landingpage 2017". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "landingpage" will match campaigns with name "my landingpage", "landingpage 2015", or simply "landingpage".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only landing pages that belong to this subaccount.
+ * subaccountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "landingPages": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserLandingPages.list
* @memberOf! ()
*
@@ -9565,6 +11435,68 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.advertiserLandingPages.patch
* @desc Updates an existing landing page. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserLandingPages.patch({
+ * // Landing page ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "advertiserId": "my_advertiserId",
+ * // "archived": false,
+ * // "deepLinks": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "url": "my_url"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "advertiserId": "my_advertiserId",
+ * // "archived": false,
+ * // "deepLinks": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserLandingPages.patch
* @memberOf! ()
*
@@ -9641,6 +11573,66 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.advertiserLandingPages.update
* @desc Updates an existing landing page.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertiserLandingPages.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "advertiserId": "my_advertiserId",
+ * // "archived": false,
+ * // "deepLinks": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "url": "my_url"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "advertiserId": "my_advertiserId",
+ * // "archived": false,
+ * // "deepLinks": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertiserLandingPages.update
* @memberOf! ()
*
@@ -9847,6 +11839,62 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.advertisers.get
* @desc Gets one advertiser by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertisers.get({
+ * // Advertiser ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "clickThroughUrlSuffix": "my_clickThroughUrlSuffix",
+ * // "defaultClickThroughEventTagId": "my_defaultClickThroughEventTagId",
+ * // "defaultEmail": "my_defaultEmail",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "originalFloodlightConfigurationId": "my_originalFloodlightConfigurationId",
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "suspended": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertisers.get
* @memberOf! ()
*
@@ -9921,6 +11969,82 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.advertisers.insert
* @desc Inserts a new advertiser.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertisers.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "clickThroughUrlSuffix": "my_clickThroughUrlSuffix",
+ * // "defaultClickThroughEventTagId": "my_defaultClickThroughEventTagId",
+ * // "defaultEmail": "my_defaultEmail",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "originalFloodlightConfigurationId": "my_originalFloodlightConfigurationId",
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "suspended": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "clickThroughUrlSuffix": "my_clickThroughUrlSuffix",
+ * // "defaultClickThroughEventTagId": "my_defaultClickThroughEventTagId",
+ * // "defaultEmail": "my_defaultEmail",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "originalFloodlightConfigurationId": "my_originalFloodlightConfigurationId",
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "suspended": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertisers.insert
* @memberOf! ()
*
@@ -9996,6 +12120,72 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.advertisers.list
* @desc Retrieves a list of advertisers, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertisers.list({
+ * // Select only advertisers with these advertiser group IDs.
+ * advertiserGroupIds: 'placeholder-value',
+ * // Select only advertisers with these floodlight configuration IDs.
+ * floodlightConfigurationIds: 'placeholder-value',
+ * // Select only advertisers with these IDs.
+ * ids: 'placeholder-value',
+ * // Select only advertisers which do not belong to any advertiser group.
+ * includeAdvertisersWithoutGroupsOnly: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Select only advertisers which use another advertiser's floodlight configuration.
+ * onlyParent: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "advertiser*2015" will return objects with names like "advertiser June 2015", "advertiser April 2015", or simply "advertiser 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "advertiser" will match objects with name "my advertiser", "advertiser 2015", or simply "advertiser".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only advertisers with the specified status.
+ * status: 'placeholder-value',
+ * // Select only advertisers with these subaccount IDs.
+ * subaccountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "advertisers": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertisers.list
* @memberOf! ()
*
@@ -10083,6 +12273,84 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.advertisers.patch
* @desc Updates an existing advertiser. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertisers.patch({
+ * // Advertiser ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "clickThroughUrlSuffix": "my_clickThroughUrlSuffix",
+ * // "defaultClickThroughEventTagId": "my_defaultClickThroughEventTagId",
+ * // "defaultEmail": "my_defaultEmail",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "originalFloodlightConfigurationId": "my_originalFloodlightConfigurationId",
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "suspended": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "clickThroughUrlSuffix": "my_clickThroughUrlSuffix",
+ * // "defaultClickThroughEventTagId": "my_defaultClickThroughEventTagId",
+ * // "defaultEmail": "my_defaultEmail",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "originalFloodlightConfigurationId": "my_originalFloodlightConfigurationId",
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "suspended": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertisers.patch
* @memberOf! ()
*
@@ -10159,6 +12427,82 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.advertisers.update
* @desc Updates an existing advertiser.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.advertisers.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "clickThroughUrlSuffix": "my_clickThroughUrlSuffix",
+ * // "defaultClickThroughEventTagId": "my_defaultClickThroughEventTagId",
+ * // "defaultEmail": "my_defaultEmail",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "originalFloodlightConfigurationId": "my_originalFloodlightConfigurationId",
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "suspended": false
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "clickThroughUrlSuffix": "my_clickThroughUrlSuffix",
+ * // "defaultClickThroughEventTagId": "my_defaultClickThroughEventTagId",
+ * // "defaultEmail": "my_defaultEmail",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "originalFloodlightConfigurationId": "my_originalFloodlightConfigurationId",
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "suspended": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.advertisers.update
* @memberOf! ()
*
@@ -10371,6 +12715,47 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.browsers.list
* @desc Retrieves a list of browsers.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.browsers.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "browsers": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.browsers.list
* @memberOf! ()
*
@@ -10464,6 +12849,58 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.campaignCreativeAssociations.insert
* @desc Associates a creative with the specified campaign. This method creates a default ad with dimensions matching the creative in the campaign if such a default ad does not exist already.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.campaignCreativeAssociations.insert({
+ * // Campaign ID in this association.
+ * campaignId: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "creativeId": "my_creativeId",
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creativeId": "my_creativeId",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.campaignCreativeAssociations.insert
* @memberOf! ()
*
@@ -10547,6 +12984,56 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.campaignCreativeAssociations.list
* @desc Retrieves the list of creative IDs associated with the specified campaign. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.campaignCreativeAssociations.list({
+ * // Campaign ID in this association.
+ * campaignId: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "campaignCreativeAssociations": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.campaignCreativeAssociations.list
* @memberOf! ()
*
@@ -10699,6 +13186,75 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.campaigns.get
* @desc Gets one campaign by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.campaigns.get({
+ * // Campaign ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingConfiguration": {},
+ * // "additionalCreativeOptimizationConfigurations": [],
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentGroups": [],
+ * // "billingInvoiceCode": "my_billingInvoiceCode",
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comment": "my_comment",
+ * // "createInfo": {},
+ * // "creativeGroupIds": [],
+ * // "creativeOptimizationConfiguration": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "defaultLandingPageId": "my_defaultLandingPageId",
+ * // "endDate": "my_endDate",
+ * // "eventTagOverrides": [],
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "startDate": "my_startDate",
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.campaigns.get
* @memberOf! ()
*
@@ -10771,6 +13327,108 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.campaigns.insert
* @desc Inserts a new campaign.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.campaigns.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingConfiguration": {},
+ * // "additionalCreativeOptimizationConfigurations": [],
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentGroups": [],
+ * // "billingInvoiceCode": "my_billingInvoiceCode",
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comment": "my_comment",
+ * // "createInfo": {},
+ * // "creativeGroupIds": [],
+ * // "creativeOptimizationConfiguration": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "defaultLandingPageId": "my_defaultLandingPageId",
+ * // "endDate": "my_endDate",
+ * // "eventTagOverrides": [],
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "startDate": "my_startDate",
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerEmails": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingConfiguration": {},
+ * // "additionalCreativeOptimizationConfigurations": [],
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentGroups": [],
+ * // "billingInvoiceCode": "my_billingInvoiceCode",
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comment": "my_comment",
+ * // "createInfo": {},
+ * // "creativeGroupIds": [],
+ * // "creativeOptimizationConfiguration": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "defaultLandingPageId": "my_defaultLandingPageId",
+ * // "endDate": "my_endDate",
+ * // "eventTagOverrides": [],
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "startDate": "my_startDate",
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.campaigns.insert
* @memberOf! ()
*
@@ -10842,6 +13500,74 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.campaigns.list
* @desc Retrieves a list of campaigns, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.campaigns.list({
+ * // Select only campaigns whose advertisers belong to these advertiser groups.
+ * advertiserGroupIds: 'placeholder-value',
+ * // Select only campaigns that belong to these advertisers.
+ * advertiserIds: 'placeholder-value',
+ * // Select only archived campaigns. Don't set this field to select both archived and non-archived campaigns.
+ * archived: 'placeholder-value',
+ * // Select only campaigns that have at least one optimization activity.
+ * atLeastOneOptimizationActivity: 'placeholder-value',
+ * // Exclude campaigns with these IDs.
+ * excludedIds: 'placeholder-value',
+ * // Select only campaigns with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Select only campaigns that have overridden this event tag ID.
+ * overriddenEventTagId: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for campaigns by name or ID. Wildcards (*) are allowed. For example, "campaign*2015" will return campaigns with names like "campaign June 2015", "campaign April 2015", or simply "campaign 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "campaign" will match campaigns with name "my campaign", "campaign 2015", or simply "campaign".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only campaigns that belong to this subaccount.
+ * subaccountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "campaigns": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.campaigns.list
* @memberOf! ()
*
@@ -10929,6 +13655,110 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.campaigns.patch
* @desc Updates an existing campaign. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.campaigns.patch({
+ * // Campaign ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingConfiguration": {},
+ * // "additionalCreativeOptimizationConfigurations": [],
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentGroups": [],
+ * // "billingInvoiceCode": "my_billingInvoiceCode",
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comment": "my_comment",
+ * // "createInfo": {},
+ * // "creativeGroupIds": [],
+ * // "creativeOptimizationConfiguration": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "defaultLandingPageId": "my_defaultLandingPageId",
+ * // "endDate": "my_endDate",
+ * // "eventTagOverrides": [],
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "startDate": "my_startDate",
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerEmails": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingConfiguration": {},
+ * // "additionalCreativeOptimizationConfigurations": [],
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentGroups": [],
+ * // "billingInvoiceCode": "my_billingInvoiceCode",
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comment": "my_comment",
+ * // "createInfo": {},
+ * // "creativeGroupIds": [],
+ * // "creativeOptimizationConfiguration": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "defaultLandingPageId": "my_defaultLandingPageId",
+ * // "endDate": "my_endDate",
+ * // "eventTagOverrides": [],
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "startDate": "my_startDate",
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.campaigns.patch
* @memberOf! ()
*
@@ -11001,6 +13831,108 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.campaigns.update
* @desc Updates an existing campaign.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.campaigns.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingConfiguration": {},
+ * // "additionalCreativeOptimizationConfigurations": [],
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentGroups": [],
+ * // "billingInvoiceCode": "my_billingInvoiceCode",
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comment": "my_comment",
+ * // "createInfo": {},
+ * // "creativeGroupIds": [],
+ * // "creativeOptimizationConfiguration": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "defaultLandingPageId": "my_defaultLandingPageId",
+ * // "endDate": "my_endDate",
+ * // "eventTagOverrides": [],
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "startDate": "my_startDate",
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerEmails": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingConfiguration": {},
+ * // "additionalCreativeOptimizationConfigurations": [],
+ * // "advertiserGroupId": "my_advertiserGroupId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "audienceSegmentGroups": [],
+ * // "billingInvoiceCode": "my_billingInvoiceCode",
+ * // "clickThroughUrlSuffixProperties": {},
+ * // "comment": "my_comment",
+ * // "createInfo": {},
+ * // "creativeGroupIds": [],
+ * // "creativeOptimizationConfiguration": {},
+ * // "defaultClickThroughEventTagProperties": {},
+ * // "defaultLandingPageId": "my_defaultLandingPageId",
+ * // "endDate": "my_endDate",
+ * // "eventTagOverrides": [],
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "nielsenOcrEnabled": false,
+ * // "startDate": "my_startDate",
+ * // "subaccountId": "my_subaccountId",
+ * // "traffickerEmails": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.campaigns.update
* @memberOf! ()
*
@@ -11210,6 +14142,61 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.changeLogs.get
* @desc Gets one change log by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.changeLogs.get({
+ * // Change log ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "action": "my_action",
+ * // "changeTime": "my_changeTime",
+ * // "fieldName": "my_fieldName",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "newValue": "my_newValue",
+ * // "objectId": "my_objectId",
+ * // "objectType": "my_objectType",
+ * // "oldValue": "my_oldValue",
+ * // "subaccountId": "my_subaccountId",
+ * // "transactionId": "my_transactionId",
+ * // "userProfileId": "my_userProfileId",
+ * // "userProfileName": "my_userProfileName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.changeLogs.get
* @memberOf! ()
*
@@ -11284,6 +14271,68 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.changeLogs.list
* @desc Retrieves a list of change logs. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.changeLogs.list({
+ * // Select only change logs with the specified action.
+ * action: 'placeholder-value',
+ * // Select only change logs with these IDs.
+ * ids: 'placeholder-value',
+ * // Select only change logs whose change time is before the specified maxChangeTime.The time should be formatted as an RFC3339 date/time string. For example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, the format is "2015-07-18T22:54:00-04:00". In other words, the year, month, day, the letter T, the hour (24-hour clock system), minute, second, and then the time zone offset.
+ * maxChangeTime: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Select only change logs whose change time is after the specified minChangeTime.The time should be formatted as an RFC3339 date/time string. For example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, the format is "2015-07-18T22:54:00-04:00". In other words, the year, month, day, the letter T, the hour (24-hour clock system), minute, second, and then the time zone offset.
+ * minChangeTime: 'placeholder-value',
+ * // Select only change logs with these object IDs.
+ * objectIds: 'placeholder-value',
+ * // Select only change logs with the specified object type.
+ * objectType: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Select only change logs whose object ID, user name, old or new values match the search string.
+ * searchString: 'placeholder-value',
+ * // Select only change logs with these user profile IDs.
+ * userProfileIds: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "changeLogs": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.changeLogs.list
* @memberOf! ()
*
@@ -11442,6 +14491,55 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.cities.list
* @desc Retrieves a list of cities, possibly filtered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.cities.list({
+ * // Select only cities from these countries.
+ * countryDartIds: 'placeholder-value',
+ * // Select only cities with these DART IDs.
+ * dartIds: 'placeholder-value',
+ * // Select only cities with names starting with this prefix.
+ * namePrefix: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Select only cities from these regions.
+ * regionDartIds: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "cities": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.cities.list
* @memberOf! ()
*
@@ -11553,6 +14651,50 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.connectionTypes.get
* @desc Gets one connection type by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.connectionTypes.get({
+ * // Connection type ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.connectionTypes.get
* @memberOf! ()
*
@@ -11628,6 +14770,47 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.connectionTypes.list
* @desc Retrieves a list of connection types.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.connectionTypes.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "connectionTypes": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.connectionTypes.list
* @memberOf! ()
*
@@ -11745,6 +14928,43 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.contentCategories.delete
* @desc Deletes an existing content category.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.contentCategories.delete({
+ * // Content category ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.contentCategories.delete
* @memberOf! ()
*
@@ -11818,6 +15038,51 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.contentCategories.get
* @desc Gets one content category by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.contentCategories.get({
+ * // Content category ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.contentCategories.get
* @memberOf! ()
*
@@ -11893,6 +15158,60 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.contentCategories.insert
* @desc Inserts a new content category.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.contentCategories.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.contentCategories.insert
* @memberOf! ()
*
@@ -11968,6 +15287,60 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.contentCategories.list
* @desc Retrieves a list of content categories, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.contentCategories.list({
+ * // Select only content categories with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "contentcategory*2015" will return objects with names like "contentcategory June 2015", "contentcategory April 2015", or simply "contentcategory 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "contentcategory" will match objects with name "my contentcategory", "contentcategory 2015", or simply "contentcategory".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "contentCategories": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.contentCategories.list
* @memberOf! ()
*
@@ -12057,6 +15430,62 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.contentCategories.patch
* @desc Updates an existing content category. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.contentCategories.patch({
+ * // Content category ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.contentCategories.patch
* @memberOf! ()
*
@@ -12133,6 +15562,60 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.contentCategories.update
* @desc Updates an existing content category.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.contentCategories.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.contentCategories.update
* @memberOf! ()
*
@@ -12339,6 +15822,58 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.conversions.batchinsert
* @desc Inserts conversions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/ddmconversions'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.conversions.batchinsert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "conversions": [],
+ * // "encryptionInfo": {},
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "hasFailures": false,
+ * // "kind": "my_kind",
+ * // "status": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.conversions.batchinsert
* @memberOf! ()
*
@@ -12423,6 +15958,58 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.conversions.batchupdate
* @desc Updates existing conversions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/ddmconversions'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.conversions.batchupdate({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "conversions": [],
+ * // "encryptionInfo": {},
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "hasFailures": false,
+ * // "kind": "my_kind",
+ * // "status": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.conversions.batchupdate
* @memberOf! ()
*
@@ -12549,6 +16136,52 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.countries.get
* @desc Gets one country by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.countries.get({
+ * // Country DART ID.
+ * dartId: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "countryCode": "my_countryCode",
+ * // "dartId": "my_dartId",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "sslEnabled": false
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.countries.get
* @memberOf! ()
*
@@ -12621,6 +16254,47 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.countries.list
* @desc Retrieves a list of countries.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.countries.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "countries": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.countries.list
* @memberOf! ()
*
@@ -12729,6 +16403,80 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeAssets.insert
* @desc Inserts a new creative asset.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeAssets.insert({
+ * // Advertiser ID of this creative. This is a required field.
+ * advertiserId: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "assetIdentifier": {},
+ * // "clickTags": [],
+ * // "counterCustomEvents": [],
+ * // "detectedFeatures": [],
+ * // "exitCustomEvents": [],
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "richMedia": false,
+ * // "timerCustomEvents": [],
+ * // "warnedValidationRules": []
+ * // }
+ * },
+ * media: {
+ * mimeType: 'placeholder-value',
+ * body: 'placeholder-value',
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "assetIdentifier": {},
+ * // "clickTags": [],
+ * // "counterCustomEvents": [],
+ * // "detectedFeatures": [],
+ * // "exitCustomEvents": [],
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "richMedia": false,
+ * // "timerCustomEvents": [],
+ * // "warnedValidationRules": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeAssets.insert
* @memberOf! ()
*
@@ -12858,6 +16606,43 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeFields.delete
* @desc Deletes an existing creative field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFields.delete({
+ * // Creative Field ID
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFields.delete
* @memberOf! ()
*
@@ -12931,6 +16716,54 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeFields.get
* @desc Gets one creative field by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFields.get({
+ * // Creative Field ID
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFields.get
* @memberOf! ()
*
@@ -13006,6 +16839,66 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeFields.insert
* @desc Inserts a new creative field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFields.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFields.insert
* @memberOf! ()
*
@@ -13081,6 +16974,62 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeFields.list
* @desc Retrieves a list of creative fields, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFields.list({
+ * // Select only creative fields that belong to these advertisers.
+ * advertiserIds: 'placeholder-value',
+ * // Select only creative fields with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for creative fields by name or ID. Wildcards (*) are allowed. For example, "creativefield*2015" will return creative fields with names like "creativefield June 2015", "creativefield April 2015", or simply "creativefield 2015". Most of the searches also add wild-cards implicitly at the start and the end of the search string. For example, a search string of "creativefield" will match creative fields with the name "my creativefield", "creativefield 2015", or simply "creativefield".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creativeFields": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFields.list
* @memberOf! ()
*
@@ -13169,6 +17118,68 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeFields.patch
* @desc Updates an existing creative field. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFields.patch({
+ * // Creative Field ID
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFields.patch
* @memberOf! ()
*
@@ -13245,6 +17256,66 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeFields.update
* @desc Updates an existing creative field.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFields.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFields.update
* @memberOf! ()
*
@@ -13455,6 +17526,45 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeFieldValues.delete
* @desc Deletes an existing creative field value.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFieldValues.delete({
+ * // Creative field ID for this creative field value.
+ * creativeFieldId: 'placeholder-value',
+ * // Creative Field Value ID
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFieldValues.delete
* @memberOf! ()
*
@@ -13529,6 +17639,52 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeFieldValues.get
* @desc Gets one creative field value by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFieldValues.get({
+ * // Creative field ID for this creative field value.
+ * creativeFieldId: 'placeholder-value',
+ * // Creative Field Value ID
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "value": "my_value"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFieldValues.get
* @memberOf! ()
*
@@ -13605,6 +17761,60 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeFieldValues.insert
* @desc Inserts a new creative field value.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFieldValues.insert({
+ * // Creative field ID for this creative field value.
+ * creativeFieldId: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "value": "my_value"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "value": "my_value"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFieldValues.insert
* @memberOf! ()
*
@@ -13681,6 +17891,62 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeFieldValues.list
* @desc Retrieves a list of creative field values, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFieldValues.list({
+ * // Creative field ID for this creative field value.
+ * creativeFieldId: 'placeholder-value',
+ * // Select only creative field values with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for creative field values by their values. Wildcards (e.g. *) are not allowed.
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creativeFieldValues": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFieldValues.list
* @memberOf! ()
*
@@ -13771,6 +18037,62 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeFieldValues.patch
* @desc Updates an existing creative field value. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFieldValues.patch({
+ * // Creative field ID for this creative field value.
+ * creativeFieldId: 'placeholder-value',
+ * // Creative Field Value ID
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "value": "my_value"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "value": "my_value"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFieldValues.patch
* @memberOf! ()
*
@@ -13848,6 +18170,60 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeFieldValues.update
* @desc Updates an existing creative field value.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeFieldValues.update({
+ * // Creative field ID for this creative field value.
+ * creativeFieldId: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "value": "my_value"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "value": "my_value"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeFieldValues.update
* @memberOf! ()
*
@@ -14079,6 +18455,55 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeGroups.get
* @desc Gets one creative group by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeGroups.get({
+ * // Creative group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "groupNumber": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeGroups.get
* @memberOf! ()
*
@@ -14154,6 +18579,68 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeGroups.insert
* @desc Inserts a new creative group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeGroups.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "groupNumber": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "groupNumber": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeGroups.insert
* @memberOf! ()
*
@@ -14229,6 +18716,64 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeGroups.list
* @desc Retrieves a list of creative groups, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeGroups.list({
+ * // Select only creative groups that belong to these advertisers.
+ * advertiserIds: 'placeholder-value',
+ * // Select only creative groups that belong to this subgroup.
+ * groupNumber: 'placeholder-value',
+ * // Select only creative groups with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for creative groups by name or ID. Wildcards (*) are allowed. For example, "creativegroup*2015" will return creative groups with names like "creativegroup June 2015", "creativegroup April 2015", or simply "creativegroup 2015". Most of the searches also add wild-cards implicitly at the start and the end of the search string. For example, a search string of "creativegroup" will match creative groups with the name "my creativegroup", "creativegroup 2015", or simply "creativegroup".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creativeGroups": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeGroups.list
* @memberOf! ()
*
@@ -14318,6 +18863,70 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeGroups.patch
* @desc Updates an existing creative group. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeGroups.patch({
+ * // Creative group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "groupNumber": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "groupNumber": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeGroups.patch
* @memberOf! ()
*
@@ -14394,6 +19003,68 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creativeGroups.update
* @desc Updates an existing creative group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creativeGroups.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "groupNumber": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "groupNumber": 0,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creativeGroups.update
* @memberOf! ()
*
@@ -14592,6 +19263,112 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creatives.get
* @desc Gets one creative by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creatives.get({
+ * // Creative ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "adParameters": "my_adParameters",
+ * // "adTagKeys": [],
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "allowScriptAccess": false,
+ * // "archived": false,
+ * // "artworkType": "my_artworkType",
+ * // "authoringSource": "my_authoringSource",
+ * // "authoringTool": "my_authoringTool",
+ * // "autoAdvanceImages": false,
+ * // "backgroundColor": "my_backgroundColor",
+ * // "backupImageClickThroughUrl": {},
+ * // "backupImageFeatures": [],
+ * // "backupImageReportingLabel": "my_backupImageReportingLabel",
+ * // "backupImageTargetWindow": {},
+ * // "clickTags": [],
+ * // "commercialId": "my_commercialId",
+ * // "companionCreatives": [],
+ * // "compatibility": [],
+ * // "convertFlashToHtml5": false,
+ * // "counterCustomEvents": [],
+ * // "creativeAssetSelection": {},
+ * // "creativeAssets": [],
+ * // "creativeFieldAssignments": [],
+ * // "customKeyValues": [],
+ * // "dynamicAssetSelection": false,
+ * // "exitCustomEvents": [],
+ * // "fsCommand": {},
+ * // "htmlCode": "my_htmlCode",
+ * // "htmlCodeLocked": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "latestTraffickedCreativeId": "my_latestTraffickedCreativeId",
+ * // "mediaDescription": "my_mediaDescription",
+ * // "mediaDuration": {},
+ * // "name": "my_name",
+ * // "obaIcon": {},
+ * // "overrideCss": "my_overrideCss",
+ * // "progressOffset": {},
+ * // "redirectUrl": "my_redirectUrl",
+ * // "renderingId": "my_renderingId",
+ * // "renderingIdDimensionValue": {},
+ * // "requiredFlashPluginVersion": "my_requiredFlashPluginVersion",
+ * // "requiredFlashVersion": 0,
+ * // "size": {},
+ * // "skipOffset": {},
+ * // "skippable": false,
+ * // "sslCompliant": false,
+ * // "sslOverride": false,
+ * // "studioAdvertiserId": "my_studioAdvertiserId",
+ * // "studioCreativeId": "my_studioCreativeId",
+ * // "studioTraffickedCreativeId": "my_studioTraffickedCreativeId",
+ * // "subaccountId": "my_subaccountId",
+ * // "thirdPartyBackupImageImpressionsUrl": "my_thirdPartyBackupImageImpressionsUrl",
+ * // "thirdPartyRichMediaImpressionsUrl": "my_thirdPartyRichMediaImpressionsUrl",
+ * // "thirdPartyUrls": [],
+ * // "timerCustomEvents": [],
+ * // "totalFileSize": "my_totalFileSize",
+ * // "type": "my_type",
+ * // "universalAdId": {},
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creatives.get
* @memberOf! ()
*
@@ -14664,6 +19441,182 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creatives.insert
* @desc Inserts a new creative.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creatives.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "adParameters": "my_adParameters",
+ * // "adTagKeys": [],
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "allowScriptAccess": false,
+ * // "archived": false,
+ * // "artworkType": "my_artworkType",
+ * // "authoringSource": "my_authoringSource",
+ * // "authoringTool": "my_authoringTool",
+ * // "autoAdvanceImages": false,
+ * // "backgroundColor": "my_backgroundColor",
+ * // "backupImageClickThroughUrl": {},
+ * // "backupImageFeatures": [],
+ * // "backupImageReportingLabel": "my_backupImageReportingLabel",
+ * // "backupImageTargetWindow": {},
+ * // "clickTags": [],
+ * // "commercialId": "my_commercialId",
+ * // "companionCreatives": [],
+ * // "compatibility": [],
+ * // "convertFlashToHtml5": false,
+ * // "counterCustomEvents": [],
+ * // "creativeAssetSelection": {},
+ * // "creativeAssets": [],
+ * // "creativeFieldAssignments": [],
+ * // "customKeyValues": [],
+ * // "dynamicAssetSelection": false,
+ * // "exitCustomEvents": [],
+ * // "fsCommand": {},
+ * // "htmlCode": "my_htmlCode",
+ * // "htmlCodeLocked": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "latestTraffickedCreativeId": "my_latestTraffickedCreativeId",
+ * // "mediaDescription": "my_mediaDescription",
+ * // "mediaDuration": {},
+ * // "name": "my_name",
+ * // "obaIcon": {},
+ * // "overrideCss": "my_overrideCss",
+ * // "progressOffset": {},
+ * // "redirectUrl": "my_redirectUrl",
+ * // "renderingId": "my_renderingId",
+ * // "renderingIdDimensionValue": {},
+ * // "requiredFlashPluginVersion": "my_requiredFlashPluginVersion",
+ * // "requiredFlashVersion": 0,
+ * // "size": {},
+ * // "skipOffset": {},
+ * // "skippable": false,
+ * // "sslCompliant": false,
+ * // "sslOverride": false,
+ * // "studioAdvertiserId": "my_studioAdvertiserId",
+ * // "studioCreativeId": "my_studioCreativeId",
+ * // "studioTraffickedCreativeId": "my_studioTraffickedCreativeId",
+ * // "subaccountId": "my_subaccountId",
+ * // "thirdPartyBackupImageImpressionsUrl": "my_thirdPartyBackupImageImpressionsUrl",
+ * // "thirdPartyRichMediaImpressionsUrl": "my_thirdPartyRichMediaImpressionsUrl",
+ * // "thirdPartyUrls": [],
+ * // "timerCustomEvents": [],
+ * // "totalFileSize": "my_totalFileSize",
+ * // "type": "my_type",
+ * // "universalAdId": {},
+ * // "version": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "adParameters": "my_adParameters",
+ * // "adTagKeys": [],
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "allowScriptAccess": false,
+ * // "archived": false,
+ * // "artworkType": "my_artworkType",
+ * // "authoringSource": "my_authoringSource",
+ * // "authoringTool": "my_authoringTool",
+ * // "autoAdvanceImages": false,
+ * // "backgroundColor": "my_backgroundColor",
+ * // "backupImageClickThroughUrl": {},
+ * // "backupImageFeatures": [],
+ * // "backupImageReportingLabel": "my_backupImageReportingLabel",
+ * // "backupImageTargetWindow": {},
+ * // "clickTags": [],
+ * // "commercialId": "my_commercialId",
+ * // "companionCreatives": [],
+ * // "compatibility": [],
+ * // "convertFlashToHtml5": false,
+ * // "counterCustomEvents": [],
+ * // "creativeAssetSelection": {},
+ * // "creativeAssets": [],
+ * // "creativeFieldAssignments": [],
+ * // "customKeyValues": [],
+ * // "dynamicAssetSelection": false,
+ * // "exitCustomEvents": [],
+ * // "fsCommand": {},
+ * // "htmlCode": "my_htmlCode",
+ * // "htmlCodeLocked": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "latestTraffickedCreativeId": "my_latestTraffickedCreativeId",
+ * // "mediaDescription": "my_mediaDescription",
+ * // "mediaDuration": {},
+ * // "name": "my_name",
+ * // "obaIcon": {},
+ * // "overrideCss": "my_overrideCss",
+ * // "progressOffset": {},
+ * // "redirectUrl": "my_redirectUrl",
+ * // "renderingId": "my_renderingId",
+ * // "renderingIdDimensionValue": {},
+ * // "requiredFlashPluginVersion": "my_requiredFlashPluginVersion",
+ * // "requiredFlashVersion": 0,
+ * // "size": {},
+ * // "skipOffset": {},
+ * // "skippable": false,
+ * // "sslCompliant": false,
+ * // "sslOverride": false,
+ * // "studioAdvertiserId": "my_studioAdvertiserId",
+ * // "studioCreativeId": "my_studioCreativeId",
+ * // "studioTraffickedCreativeId": "my_studioTraffickedCreativeId",
+ * // "subaccountId": "my_subaccountId",
+ * // "thirdPartyBackupImageImpressionsUrl": "my_thirdPartyBackupImageImpressionsUrl",
+ * // "thirdPartyRichMediaImpressionsUrl": "my_thirdPartyRichMediaImpressionsUrl",
+ * // "thirdPartyUrls": [],
+ * // "timerCustomEvents": [],
+ * // "totalFileSize": "my_totalFileSize",
+ * // "type": "my_type",
+ * // "universalAdId": {},
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creatives.insert
* @memberOf! ()
*
@@ -14735,6 +19688,80 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creatives.list
* @desc Retrieves a list of creatives, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creatives.list({
+ * // Select only active creatives. Leave blank to select active and inactive creatives.
+ * active: 'placeholder-value',
+ * // Select only creatives with this advertiser ID.
+ * advertiserId: 'placeholder-value',
+ * // Select only archived creatives. Leave blank to select archived and unarchived creatives.
+ * archived: 'placeholder-value',
+ * // Select only creatives with this campaign ID.
+ * campaignId: 'placeholder-value',
+ * // Select only in-stream video creatives with these companion IDs.
+ * companionCreativeIds: 'placeholder-value',
+ * // Select only creatives with these creative field IDs.
+ * creativeFieldIds: 'placeholder-value',
+ * // Select only creatives with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Select only creatives with these rendering IDs.
+ * renderingIds: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "creative*2015" will return objects with names like "creative June 2015", "creative April 2015", or simply "creative 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "creative" will match objects with name "my creative", "creative 2015", or simply "creative".
+ * searchString: 'placeholder-value',
+ * // Select only creatives with these size IDs.
+ * sizeIds: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only creatives corresponding to this Studio creative ID.
+ * studioCreativeId: 'placeholder-value',
+ * // Select only creatives with these creative types.
+ * types: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "creatives": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creatives.list
* @memberOf! ()
*
@@ -14825,6 +19852,184 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creatives.patch
* @desc Updates an existing creative. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creatives.patch({
+ * // Creative ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "adParameters": "my_adParameters",
+ * // "adTagKeys": [],
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "allowScriptAccess": false,
+ * // "archived": false,
+ * // "artworkType": "my_artworkType",
+ * // "authoringSource": "my_authoringSource",
+ * // "authoringTool": "my_authoringTool",
+ * // "autoAdvanceImages": false,
+ * // "backgroundColor": "my_backgroundColor",
+ * // "backupImageClickThroughUrl": {},
+ * // "backupImageFeatures": [],
+ * // "backupImageReportingLabel": "my_backupImageReportingLabel",
+ * // "backupImageTargetWindow": {},
+ * // "clickTags": [],
+ * // "commercialId": "my_commercialId",
+ * // "companionCreatives": [],
+ * // "compatibility": [],
+ * // "convertFlashToHtml5": false,
+ * // "counterCustomEvents": [],
+ * // "creativeAssetSelection": {},
+ * // "creativeAssets": [],
+ * // "creativeFieldAssignments": [],
+ * // "customKeyValues": [],
+ * // "dynamicAssetSelection": false,
+ * // "exitCustomEvents": [],
+ * // "fsCommand": {},
+ * // "htmlCode": "my_htmlCode",
+ * // "htmlCodeLocked": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "latestTraffickedCreativeId": "my_latestTraffickedCreativeId",
+ * // "mediaDescription": "my_mediaDescription",
+ * // "mediaDuration": {},
+ * // "name": "my_name",
+ * // "obaIcon": {},
+ * // "overrideCss": "my_overrideCss",
+ * // "progressOffset": {},
+ * // "redirectUrl": "my_redirectUrl",
+ * // "renderingId": "my_renderingId",
+ * // "renderingIdDimensionValue": {},
+ * // "requiredFlashPluginVersion": "my_requiredFlashPluginVersion",
+ * // "requiredFlashVersion": 0,
+ * // "size": {},
+ * // "skipOffset": {},
+ * // "skippable": false,
+ * // "sslCompliant": false,
+ * // "sslOverride": false,
+ * // "studioAdvertiserId": "my_studioAdvertiserId",
+ * // "studioCreativeId": "my_studioCreativeId",
+ * // "studioTraffickedCreativeId": "my_studioTraffickedCreativeId",
+ * // "subaccountId": "my_subaccountId",
+ * // "thirdPartyBackupImageImpressionsUrl": "my_thirdPartyBackupImageImpressionsUrl",
+ * // "thirdPartyRichMediaImpressionsUrl": "my_thirdPartyRichMediaImpressionsUrl",
+ * // "thirdPartyUrls": [],
+ * // "timerCustomEvents": [],
+ * // "totalFileSize": "my_totalFileSize",
+ * // "type": "my_type",
+ * // "universalAdId": {},
+ * // "version": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "adParameters": "my_adParameters",
+ * // "adTagKeys": [],
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "allowScriptAccess": false,
+ * // "archived": false,
+ * // "artworkType": "my_artworkType",
+ * // "authoringSource": "my_authoringSource",
+ * // "authoringTool": "my_authoringTool",
+ * // "autoAdvanceImages": false,
+ * // "backgroundColor": "my_backgroundColor",
+ * // "backupImageClickThroughUrl": {},
+ * // "backupImageFeatures": [],
+ * // "backupImageReportingLabel": "my_backupImageReportingLabel",
+ * // "backupImageTargetWindow": {},
+ * // "clickTags": [],
+ * // "commercialId": "my_commercialId",
+ * // "companionCreatives": [],
+ * // "compatibility": [],
+ * // "convertFlashToHtml5": false,
+ * // "counterCustomEvents": [],
+ * // "creativeAssetSelection": {},
+ * // "creativeAssets": [],
+ * // "creativeFieldAssignments": [],
+ * // "customKeyValues": [],
+ * // "dynamicAssetSelection": false,
+ * // "exitCustomEvents": [],
+ * // "fsCommand": {},
+ * // "htmlCode": "my_htmlCode",
+ * // "htmlCodeLocked": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "latestTraffickedCreativeId": "my_latestTraffickedCreativeId",
+ * // "mediaDescription": "my_mediaDescription",
+ * // "mediaDuration": {},
+ * // "name": "my_name",
+ * // "obaIcon": {},
+ * // "overrideCss": "my_overrideCss",
+ * // "progressOffset": {},
+ * // "redirectUrl": "my_redirectUrl",
+ * // "renderingId": "my_renderingId",
+ * // "renderingIdDimensionValue": {},
+ * // "requiredFlashPluginVersion": "my_requiredFlashPluginVersion",
+ * // "requiredFlashVersion": 0,
+ * // "size": {},
+ * // "skipOffset": {},
+ * // "skippable": false,
+ * // "sslCompliant": false,
+ * // "sslOverride": false,
+ * // "studioAdvertiserId": "my_studioAdvertiserId",
+ * // "studioCreativeId": "my_studioCreativeId",
+ * // "studioTraffickedCreativeId": "my_studioTraffickedCreativeId",
+ * // "subaccountId": "my_subaccountId",
+ * // "thirdPartyBackupImageImpressionsUrl": "my_thirdPartyBackupImageImpressionsUrl",
+ * // "thirdPartyRichMediaImpressionsUrl": "my_thirdPartyRichMediaImpressionsUrl",
+ * // "thirdPartyUrls": [],
+ * // "timerCustomEvents": [],
+ * // "totalFileSize": "my_totalFileSize",
+ * // "type": "my_type",
+ * // "universalAdId": {},
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creatives.patch
* @memberOf! ()
*
@@ -14897,6 +20102,182 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.creatives.update
* @desc Updates an existing creative.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.creatives.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "adParameters": "my_adParameters",
+ * // "adTagKeys": [],
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "allowScriptAccess": false,
+ * // "archived": false,
+ * // "artworkType": "my_artworkType",
+ * // "authoringSource": "my_authoringSource",
+ * // "authoringTool": "my_authoringTool",
+ * // "autoAdvanceImages": false,
+ * // "backgroundColor": "my_backgroundColor",
+ * // "backupImageClickThroughUrl": {},
+ * // "backupImageFeatures": [],
+ * // "backupImageReportingLabel": "my_backupImageReportingLabel",
+ * // "backupImageTargetWindow": {},
+ * // "clickTags": [],
+ * // "commercialId": "my_commercialId",
+ * // "companionCreatives": [],
+ * // "compatibility": [],
+ * // "convertFlashToHtml5": false,
+ * // "counterCustomEvents": [],
+ * // "creativeAssetSelection": {},
+ * // "creativeAssets": [],
+ * // "creativeFieldAssignments": [],
+ * // "customKeyValues": [],
+ * // "dynamicAssetSelection": false,
+ * // "exitCustomEvents": [],
+ * // "fsCommand": {},
+ * // "htmlCode": "my_htmlCode",
+ * // "htmlCodeLocked": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "latestTraffickedCreativeId": "my_latestTraffickedCreativeId",
+ * // "mediaDescription": "my_mediaDescription",
+ * // "mediaDuration": {},
+ * // "name": "my_name",
+ * // "obaIcon": {},
+ * // "overrideCss": "my_overrideCss",
+ * // "progressOffset": {},
+ * // "redirectUrl": "my_redirectUrl",
+ * // "renderingId": "my_renderingId",
+ * // "renderingIdDimensionValue": {},
+ * // "requiredFlashPluginVersion": "my_requiredFlashPluginVersion",
+ * // "requiredFlashVersion": 0,
+ * // "size": {},
+ * // "skipOffset": {},
+ * // "skippable": false,
+ * // "sslCompliant": false,
+ * // "sslOverride": false,
+ * // "studioAdvertiserId": "my_studioAdvertiserId",
+ * // "studioCreativeId": "my_studioCreativeId",
+ * // "studioTraffickedCreativeId": "my_studioTraffickedCreativeId",
+ * // "subaccountId": "my_subaccountId",
+ * // "thirdPartyBackupImageImpressionsUrl": "my_thirdPartyBackupImageImpressionsUrl",
+ * // "thirdPartyRichMediaImpressionsUrl": "my_thirdPartyRichMediaImpressionsUrl",
+ * // "thirdPartyUrls": [],
+ * // "timerCustomEvents": [],
+ * // "totalFileSize": "my_totalFileSize",
+ * // "type": "my_type",
+ * // "universalAdId": {},
+ * // "version": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "adParameters": "my_adParameters",
+ * // "adTagKeys": [],
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "allowScriptAccess": false,
+ * // "archived": false,
+ * // "artworkType": "my_artworkType",
+ * // "authoringSource": "my_authoringSource",
+ * // "authoringTool": "my_authoringTool",
+ * // "autoAdvanceImages": false,
+ * // "backgroundColor": "my_backgroundColor",
+ * // "backupImageClickThroughUrl": {},
+ * // "backupImageFeatures": [],
+ * // "backupImageReportingLabel": "my_backupImageReportingLabel",
+ * // "backupImageTargetWindow": {},
+ * // "clickTags": [],
+ * // "commercialId": "my_commercialId",
+ * // "companionCreatives": [],
+ * // "compatibility": [],
+ * // "convertFlashToHtml5": false,
+ * // "counterCustomEvents": [],
+ * // "creativeAssetSelection": {},
+ * // "creativeAssets": [],
+ * // "creativeFieldAssignments": [],
+ * // "customKeyValues": [],
+ * // "dynamicAssetSelection": false,
+ * // "exitCustomEvents": [],
+ * // "fsCommand": {},
+ * // "htmlCode": "my_htmlCode",
+ * // "htmlCodeLocked": false,
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "latestTraffickedCreativeId": "my_latestTraffickedCreativeId",
+ * // "mediaDescription": "my_mediaDescription",
+ * // "mediaDuration": {},
+ * // "name": "my_name",
+ * // "obaIcon": {},
+ * // "overrideCss": "my_overrideCss",
+ * // "progressOffset": {},
+ * // "redirectUrl": "my_redirectUrl",
+ * // "renderingId": "my_renderingId",
+ * // "renderingIdDimensionValue": {},
+ * // "requiredFlashPluginVersion": "my_requiredFlashPluginVersion",
+ * // "requiredFlashVersion": 0,
+ * // "size": {},
+ * // "skipOffset": {},
+ * // "skippable": false,
+ * // "sslCompliant": false,
+ * // "sslOverride": false,
+ * // "studioAdvertiserId": "my_studioAdvertiserId",
+ * // "studioCreativeId": "my_studioCreativeId",
+ * // "studioTraffickedCreativeId": "my_studioTraffickedCreativeId",
+ * // "subaccountId": "my_subaccountId",
+ * // "thirdPartyBackupImageImpressionsUrl": "my_thirdPartyBackupImageImpressionsUrl",
+ * // "thirdPartyRichMediaImpressionsUrl": "my_thirdPartyRichMediaImpressionsUrl",
+ * // "thirdPartyUrls": [],
+ * // "timerCustomEvents": [],
+ * // "totalFileSize": "my_totalFileSize",
+ * // "type": "my_type",
+ * // "universalAdId": {},
+ * // "version": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.creatives.update
* @memberOf! ()
*
@@ -15118,6 +20499,57 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.customEvents.batchinsert
* @desc Inserts custom events.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/ddmconversions'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.customEvents.batchinsert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "customEvents": [],
+ * // "kind": "my_kind"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "hasFailures": false,
+ * // "kind": "my_kind",
+ * // "status": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.customEvents.batchinsert
* @memberOf! ()
*
@@ -15227,6 +20659,65 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.dimensionValues.query
* @desc Retrieves list of report dimension values for a list of filters.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.dimensionValues.query({
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // The value of the nextToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "dimensionName": "my_dimensionName",
+ * // "endDate": "my_endDate",
+ * // "filters": [],
+ * // "kind": "my_kind",
+ * // "startDate": "my_startDate"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.dimensionValues.query
* @memberOf! ()
*
@@ -15337,6 +20828,55 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.directorySites.get
* @desc Gets one directory site by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.directorySites.get({
+ * // Directory site ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "inpageTagFormats": [],
+ * // "interstitialTagFormats": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "settings": {},
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.directorySites.get
* @memberOf! ()
*
@@ -15412,6 +20952,68 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.directorySites.insert
* @desc Inserts a new directory site.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.directorySites.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "inpageTagFormats": [],
+ * // "interstitialTagFormats": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "settings": {},
+ * // "url": "my_url"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "inpageTagFormats": [],
+ * // "interstitialTagFormats": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "settings": {},
+ * // "url": "my_url"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.directorySites.insert
* @memberOf! ()
*
@@ -15487,6 +21089,70 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.directorySites.list
* @desc Retrieves a list of directory sites, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.directorySites.list({
+ * // This search filter is no longer supported and will have no effect on the results returned.
+ * acceptsInStreamVideoPlacements: 'placeholder-value',
+ * // This search filter is no longer supported and will have no effect on the results returned.
+ * acceptsInterstitialPlacements: 'placeholder-value',
+ * // Select only directory sites that accept publisher paid placements. This field can be left blank.
+ * acceptsPublisherPaidPlacements: 'placeholder-value',
+ * // Select only active directory sites. Leave blank to retrieve both active and inactive directory sites.
+ * active: 'placeholder-value',
+ * // Select only directory sites with this Ad Manager network code.
+ * dfpNetworkCode: 'placeholder-value',
+ * // Select only directory sites with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name, ID or URL. Wildcards (*) are allowed. For example, "directory site*2015" will return objects with names like "directory site June 2015", "directory site April 2015", or simply "directory site 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "directory site" will match objects with name "my directory site", "directory site 2015" or simply, "directory site".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "directorySites": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.directorySites.list
* @memberOf! ()
*
@@ -15676,6 +21342,47 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.dynamicTargetingKeys.delete
* @desc Deletes an existing dynamic targeting key.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.dynamicTargetingKeys.delete({
+ * // Name of this dynamic targeting key. This is a required field. Must be less than 256 characters long and cannot contain commas. All characters are converted to lowercase.
+ * name: 'placeholder-value',
+ * // ID of the object of this dynamic targeting key. This is a required field.
+ * objectId: 'placeholder-value',
+ * // Type of the object of this dynamic targeting key. This is a required field.
+ * objectType: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.dynamicTargetingKeys.delete
* @memberOf! ()
*
@@ -15751,6 +21458,60 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.dynamicTargetingKeys.insert
* @desc Inserts a new dynamic targeting key. Keys must be created at the advertiser level before being assigned to the advertiser's ads, creatives, or placements. There is a maximum of 1000 keys per advertiser, out of which a maximum of 20 keys can be assigned per ad, creative, or placement.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.dynamicTargetingKeys.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "objectId": "my_objectId",
+ * // "objectType": "my_objectType"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "objectId": "my_objectId",
+ * // "objectType": "my_objectType"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.dynamicTargetingKeys.insert
* @memberOf! ()
*
@@ -15826,6 +21587,55 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.dynamicTargetingKeys.list
* @desc Retrieves a list of dynamic targeting keys.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.dynamicTargetingKeys.list({
+ * // Select only dynamic targeting keys whose object has this advertiser ID.
+ * advertiserId: 'placeholder-value',
+ * // Select only dynamic targeting keys exactly matching these names.
+ * names: 'placeholder-value',
+ * // Select only dynamic targeting keys with this object ID.
+ * objectId: 'placeholder-value',
+ * // Select only dynamic targeting keys with this object type.
+ * objectType: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dynamicTargetingKeys": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.dynamicTargetingKeys.list
* @memberOf! ()
*
@@ -15990,6 +21800,43 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.eventTags.delete
* @desc Deletes an existing event tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.eventTags.delete({
+ * // Event tag ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.eventTags.delete
* @memberOf! ()
*
@@ -16062,6 +21909,65 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.eventTags.get
* @desc Gets one event tag by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.eventTags.get({
+ * // Event tag ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "enabledByDefault": false,
+ * // "excludeFromAdxRequests": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteFilterType": "my_siteFilterType",
+ * // "siteIds": [],
+ * // "sslCompliant": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "type": "my_type",
+ * // "url": "my_url",
+ * // "urlEscapeLevels": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.eventTags.get
* @memberOf! ()
*
@@ -16134,6 +22040,88 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.eventTags.insert
* @desc Inserts a new event tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.eventTags.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "enabledByDefault": false,
+ * // "excludeFromAdxRequests": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteFilterType": "my_siteFilterType",
+ * // "siteIds": [],
+ * // "sslCompliant": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "type": "my_type",
+ * // "url": "my_url",
+ * // "urlEscapeLevels": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "enabledByDefault": false,
+ * // "excludeFromAdxRequests": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteFilterType": "my_siteFilterType",
+ * // "siteIds": [],
+ * // "sslCompliant": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "type": "my_type",
+ * // "url": "my_url",
+ * // "urlEscapeLevels": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.eventTags.insert
* @memberOf! ()
*
@@ -16205,6 +22193,67 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.eventTags.list
* @desc Retrieves a list of event tags, possibly filtered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.eventTags.list({
+ * // Select only event tags that belong to this ad.
+ * adId: 'placeholder-value',
+ * // Select only event tags that belong to this advertiser.
+ * advertiserId: 'placeholder-value',
+ * // Select only event tags that belong to this campaign.
+ * campaignId: 'placeholder-value',
+ * // Examine only the specified campaign or advertiser's event tags for matching selector criteria. When set to false, the parent advertiser and parent campaign of the specified ad or campaign is examined as well. In addition, when set to false, the status field is examined as well, along with the enabledByDefault field. This parameter can not be set to true when adId is specified as ads do not define their own even tags.
+ * definitionsOnly: 'placeholder-value',
+ * // Select only enabled event tags. What is considered enabled or disabled depends on the definitionsOnly parameter. When definitionsOnly is set to true, only the specified advertiser or campaign's event tags' enabledByDefault field is examined. When definitionsOnly is set to false, the specified ad or specified campaign's parent advertiser's or parent campaign's event tags' enabledByDefault and status fields are examined as well.
+ * enabled: 'placeholder-value',
+ * // Select only event tags with the specified event tag types. Event tag types can be used to specify whether to use a third-party pixel, a third-party JavaScript URL, or a third-party click-through URL for either impression or click tracking.
+ * eventTagTypes: 'placeholder-value',
+ * // Select only event tags with these IDs.
+ * ids: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "eventtag*2015" will return objects with names like "eventtag June 2015", "eventtag April 2015", or simply "eventtag 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "eventtag" will match objects with name "my eventtag", "eventtag 2015", or simply "eventtag".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "eventTags": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.eventTags.list
* @memberOf! ()
*
@@ -16289,6 +22338,90 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.eventTags.patch
* @desc Updates an existing event tag. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.eventTags.patch({
+ * // Event tag ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "enabledByDefault": false,
+ * // "excludeFromAdxRequests": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteFilterType": "my_siteFilterType",
+ * // "siteIds": [],
+ * // "sslCompliant": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "type": "my_type",
+ * // "url": "my_url",
+ * // "urlEscapeLevels": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "enabledByDefault": false,
+ * // "excludeFromAdxRequests": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteFilterType": "my_siteFilterType",
+ * // "siteIds": [],
+ * // "sslCompliant": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "type": "my_type",
+ * // "url": "my_url",
+ * // "urlEscapeLevels": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.eventTags.patch
* @memberOf! ()
*
@@ -16361,6 +22494,88 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.eventTags.update
* @desc Updates an existing event tag.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.eventTags.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "enabledByDefault": false,
+ * // "excludeFromAdxRequests": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteFilterType": "my_siteFilterType",
+ * // "siteIds": [],
+ * // "sslCompliant": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "type": "my_type",
+ * // "url": "my_url",
+ * // "urlEscapeLevels": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "enabledByDefault": false,
+ * // "excludeFromAdxRequests": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteFilterType": "my_siteFilterType",
+ * // "siteIds": [],
+ * // "sslCompliant": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "type": "my_type",
+ * // "url": "my_url",
+ * // "urlEscapeLevels": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.eventTags.update
* @memberOf! ()
*
@@ -16573,6 +22788,57 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.files.get
* @desc Retrieves a report file by its report ID and file ID. This method supports media download.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.files.get({
+ * // The ID of the report file.
+ * fileId: 'placeholder-value',
+ * // The ID of the report.
+ * reportId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dateRange": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "reportId": "my_reportId",
+ * // "status": "my_status",
+ * // "urls": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.files.get
* @memberOf! ()
*
@@ -16644,6 +22910,59 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.files.list
* @desc Lists files for a user profile.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.files.list({
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // The value of the nextToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // The DFA profile ID.
+ * profileId: 'placeholder-value',
+ * // The scope that defines which results are returned.
+ * scope: 'placeholder-value',
+ * // The field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.files.list
* @memberOf! ()
*
@@ -16773,6 +23092,43 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.floodlightActivities.delete
* @desc Deletes an existing floodlight activity.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivities.delete({
+ * // Floodlight activity ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivities.delete
* @memberOf! ()
*
@@ -16846,6 +23202,50 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.floodlightActivities.generatetag
* @desc Generates a tag for a floodlight activity.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivities.generatetag({
+ * // Floodlight activity ID for which we want to generate a tag.
+ * floodlightActivityId: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "floodlightActivityTag": "my_floodlightActivityTag",
+ * // "globalSiteTagGlobalSnippet": "my_globalSiteTagGlobalSnippet",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivities.generatetag
* @memberOf! ()
*
@@ -16938,6 +23338,75 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.floodlightActivities.get
* @desc Gets one floodlight activity by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivities.get({
+ * // Floodlight activity ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "cacheBustingType": "my_cacheBustingType",
+ * // "countingMethod": "my_countingMethod",
+ * // "defaultTags": [],
+ * // "expectedUrl": "my_expectedUrl",
+ * // "floodlightActivityGroupId": "my_floodlightActivityGroupId",
+ * // "floodlightActivityGroupName": "my_floodlightActivityGroupName",
+ * // "floodlightActivityGroupTagString": "my_floodlightActivityGroupTagString",
+ * // "floodlightActivityGroupType": "my_floodlightActivityGroupType",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "floodlightTagType": "my_floodlightTagType",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "notes": "my_notes",
+ * // "publisherTags": [],
+ * // "secure": false,
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormat": "my_tagFormat",
+ * // "tagString": "my_tagString",
+ * // "userDefinedVariableTypes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivities.get
* @memberOf! ()
*
@@ -17013,6 +23482,108 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.floodlightActivities.insert
* @desc Inserts a new floodlight activity.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivities.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "cacheBustingType": "my_cacheBustingType",
+ * // "countingMethod": "my_countingMethod",
+ * // "defaultTags": [],
+ * // "expectedUrl": "my_expectedUrl",
+ * // "floodlightActivityGroupId": "my_floodlightActivityGroupId",
+ * // "floodlightActivityGroupName": "my_floodlightActivityGroupName",
+ * // "floodlightActivityGroupTagString": "my_floodlightActivityGroupTagString",
+ * // "floodlightActivityGroupType": "my_floodlightActivityGroupType",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "floodlightTagType": "my_floodlightTagType",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "notes": "my_notes",
+ * // "publisherTags": [],
+ * // "secure": false,
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormat": "my_tagFormat",
+ * // "tagString": "my_tagString",
+ * // "userDefinedVariableTypes": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "cacheBustingType": "my_cacheBustingType",
+ * // "countingMethod": "my_countingMethod",
+ * // "defaultTags": [],
+ * // "expectedUrl": "my_expectedUrl",
+ * // "floodlightActivityGroupId": "my_floodlightActivityGroupId",
+ * // "floodlightActivityGroupName": "my_floodlightActivityGroupName",
+ * // "floodlightActivityGroupTagString": "my_floodlightActivityGroupTagString",
+ * // "floodlightActivityGroupType": "my_floodlightActivityGroupType",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "floodlightTagType": "my_floodlightTagType",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "notes": "my_notes",
+ * // "publisherTags": [],
+ * // "secure": false,
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormat": "my_tagFormat",
+ * // "tagString": "my_tagString",
+ * // "userDefinedVariableTypes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivities.insert
* @memberOf! ()
*
@@ -17088,6 +23659,74 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.floodlightActivities.list
* @desc Retrieves a list of floodlight activities, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivities.list({
+ * // Select only floodlight activities for the specified advertiser ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.
+ * advertiserId: 'placeholder-value',
+ * // Select only floodlight activities with the specified floodlight activity group IDs.
+ * floodlightActivityGroupIds: 'placeholder-value',
+ * // Select only floodlight activities with the specified floodlight activity group name.
+ * floodlightActivityGroupName: 'placeholder-value',
+ * // Select only floodlight activities with the specified floodlight activity group tag string.
+ * floodlightActivityGroupTagString: 'placeholder-value',
+ * // Select only floodlight activities with the specified floodlight activity group type.
+ * floodlightActivityGroupType: 'placeholder-value',
+ * // Select only floodlight activities for the specified floodlight configuration ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.
+ * floodlightConfigurationId: 'placeholder-value',
+ * // Select only floodlight activities with the specified IDs. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "floodlightactivity*2015" will return objects with names like "floodlightactivity June 2015", "floodlightactivity April 2015", or simply "floodlightactivity 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "floodlightactivity" will match objects with name "my floodlightactivity activity", "floodlightactivity 2015", or simply "floodlightactivity".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only floodlight activities with the specified tag string.
+ * tagString: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "floodlightActivities": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivities.list
* @memberOf! ()
*
@@ -17184,6 +23823,110 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.floodlightActivities.patch
* @desc Updates an existing floodlight activity. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivities.patch({
+ * // Floodlight activity ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "cacheBustingType": "my_cacheBustingType",
+ * // "countingMethod": "my_countingMethod",
+ * // "defaultTags": [],
+ * // "expectedUrl": "my_expectedUrl",
+ * // "floodlightActivityGroupId": "my_floodlightActivityGroupId",
+ * // "floodlightActivityGroupName": "my_floodlightActivityGroupName",
+ * // "floodlightActivityGroupTagString": "my_floodlightActivityGroupTagString",
+ * // "floodlightActivityGroupType": "my_floodlightActivityGroupType",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "floodlightTagType": "my_floodlightTagType",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "notes": "my_notes",
+ * // "publisherTags": [],
+ * // "secure": false,
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormat": "my_tagFormat",
+ * // "tagString": "my_tagString",
+ * // "userDefinedVariableTypes": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "cacheBustingType": "my_cacheBustingType",
+ * // "countingMethod": "my_countingMethod",
+ * // "defaultTags": [],
+ * // "expectedUrl": "my_expectedUrl",
+ * // "floodlightActivityGroupId": "my_floodlightActivityGroupId",
+ * // "floodlightActivityGroupName": "my_floodlightActivityGroupName",
+ * // "floodlightActivityGroupTagString": "my_floodlightActivityGroupTagString",
+ * // "floodlightActivityGroupType": "my_floodlightActivityGroupType",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "floodlightTagType": "my_floodlightTagType",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "notes": "my_notes",
+ * // "publisherTags": [],
+ * // "secure": false,
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormat": "my_tagFormat",
+ * // "tagString": "my_tagString",
+ * // "userDefinedVariableTypes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivities.patch
* @memberOf! ()
*
@@ -17260,6 +24003,108 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.floodlightActivities.update
* @desc Updates an existing floodlight activity.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivities.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "cacheBustingType": "my_cacheBustingType",
+ * // "countingMethod": "my_countingMethod",
+ * // "defaultTags": [],
+ * // "expectedUrl": "my_expectedUrl",
+ * // "floodlightActivityGroupId": "my_floodlightActivityGroupId",
+ * // "floodlightActivityGroupName": "my_floodlightActivityGroupName",
+ * // "floodlightActivityGroupTagString": "my_floodlightActivityGroupTagString",
+ * // "floodlightActivityGroupType": "my_floodlightActivityGroupType",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "floodlightTagType": "my_floodlightTagType",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "notes": "my_notes",
+ * // "publisherTags": [],
+ * // "secure": false,
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormat": "my_tagFormat",
+ * // "tagString": "my_tagString",
+ * // "userDefinedVariableTypes": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "cacheBustingType": "my_cacheBustingType",
+ * // "countingMethod": "my_countingMethod",
+ * // "defaultTags": [],
+ * // "expectedUrl": "my_expectedUrl",
+ * // "floodlightActivityGroupId": "my_floodlightActivityGroupId",
+ * // "floodlightActivityGroupName": "my_floodlightActivityGroupName",
+ * // "floodlightActivityGroupTagString": "my_floodlightActivityGroupTagString",
+ * // "floodlightActivityGroupType": "my_floodlightActivityGroupType",
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "floodlightTagType": "my_floodlightTagType",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "notes": "my_notes",
+ * // "publisherTags": [],
+ * // "secure": false,
+ * // "sslCompliant": false,
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormat": "my_tagFormat",
+ * // "tagString": "my_tagString",
+ * // "userDefinedVariableTypes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivities.update
* @memberOf! ()
*
@@ -17510,6 +24355,59 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.floodlightActivityGroups.get
* @desc Gets one floodlight activity group by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivityGroups.get({
+ * // Floodlight activity Group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagString": "my_tagString",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivityGroups.get
* @memberOf! ()
*
@@ -17587,6 +24485,76 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.floodlightActivityGroups.insert
* @desc Inserts a new floodlight activity group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivityGroups.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagString": "my_tagString",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagString": "my_tagString",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivityGroups.insert
* @memberOf! ()
*
@@ -17666,6 +24634,66 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.floodlightActivityGroups.list
* @desc Retrieves a list of floodlight activity groups, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivityGroups.list({
+ * // Select only floodlight activity groups with the specified advertiser ID. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.
+ * advertiserId: 'placeholder-value',
+ * // Select only floodlight activity groups with the specified floodlight configuration ID. Must specify either advertiserId, or floodlightConfigurationId for a non-empty result.
+ * floodlightConfigurationId: 'placeholder-value',
+ * // Select only floodlight activity groups with the specified IDs. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "floodlightactivitygroup*2015" will return objects with names like "floodlightactivitygroup June 2015", "floodlightactivitygroup April 2015", or simply "floodlightactivitygroup 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "floodlightactivitygroup" will match objects with name "my floodlightactivitygroup activity", "floodlightactivitygroup 2015", or simply "floodlightactivitygroup".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only floodlight activity groups with the specified floodlight activity group type.
+ * type: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "floodlightActivityGroups": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivityGroups.list
* @memberOf! ()
*
@@ -17766,6 +24794,78 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.floodlightActivityGroups.patch
* @desc Updates an existing floodlight activity group. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivityGroups.patch({
+ * // Floodlight activity Group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagString": "my_tagString",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagString": "my_tagString",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivityGroups.patch
* @memberOf! ()
*
@@ -17844,6 +24944,76 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.floodlightActivityGroups.update
* @desc Updates an existing floodlight activity group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightActivityGroups.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagString": "my_tagString",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "floodlightConfigurationId": "my_floodlightConfigurationId",
+ * // "floodlightConfigurationIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagString": "my_tagString",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightActivityGroups.update
* @memberOf! ()
*
@@ -18050,6 +25220,65 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.floodlightConfigurations.get
* @desc Gets one floodlight configuration by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightConfigurations.get({
+ * // Floodlight configuration ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "analyticsDataSharingEnabled": false,
+ * // "customViewabilityMetric": {},
+ * // "exposureToConversionEnabled": false,
+ * // "firstDayOfWeek": "my_firstDayOfWeek",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "inAppAttributionTrackingEnabled": false,
+ * // "kind": "my_kind",
+ * // "lookbackConfiguration": {},
+ * // "naturalSearchConversionAttributionOption": "my_naturalSearchConversionAttributionOption",
+ * // "omnitureSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "tagSettings": {},
+ * // "thirdPartyAuthenticationTokens": [],
+ * // "userDefinedVariableConfigurations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightConfigurations.get
* @memberOf! ()
*
@@ -18127,6 +25356,49 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.floodlightConfigurations.list
* @desc Retrieves a list of floodlight configurations, possibly filtered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightConfigurations.list({
+ * // Set of IDs of floodlight configurations to retrieve. Required field; otherwise an empty list will be returned.
+ * ids: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "floodlightConfigurations": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightConfigurations.list
* @memberOf! ()
*
@@ -18219,6 +25491,90 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.floodlightConfigurations.patch
* @desc Updates an existing floodlight configuration. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightConfigurations.patch({
+ * // Floodlight configuration ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "analyticsDataSharingEnabled": false,
+ * // "customViewabilityMetric": {},
+ * // "exposureToConversionEnabled": false,
+ * // "firstDayOfWeek": "my_firstDayOfWeek",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "inAppAttributionTrackingEnabled": false,
+ * // "kind": "my_kind",
+ * // "lookbackConfiguration": {},
+ * // "naturalSearchConversionAttributionOption": "my_naturalSearchConversionAttributionOption",
+ * // "omnitureSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "tagSettings": {},
+ * // "thirdPartyAuthenticationTokens": [],
+ * // "userDefinedVariableConfigurations": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "analyticsDataSharingEnabled": false,
+ * // "customViewabilityMetric": {},
+ * // "exposureToConversionEnabled": false,
+ * // "firstDayOfWeek": "my_firstDayOfWeek",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "inAppAttributionTrackingEnabled": false,
+ * // "kind": "my_kind",
+ * // "lookbackConfiguration": {},
+ * // "naturalSearchConversionAttributionOption": "my_naturalSearchConversionAttributionOption",
+ * // "omnitureSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "tagSettings": {},
+ * // "thirdPartyAuthenticationTokens": [],
+ * // "userDefinedVariableConfigurations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightConfigurations.patch
* @memberOf! ()
*
@@ -18297,6 +25653,88 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.floodlightConfigurations.update
* @desc Updates an existing floodlight configuration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.floodlightConfigurations.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "analyticsDataSharingEnabled": false,
+ * // "customViewabilityMetric": {},
+ * // "exposureToConversionEnabled": false,
+ * // "firstDayOfWeek": "my_firstDayOfWeek",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "inAppAttributionTrackingEnabled": false,
+ * // "kind": "my_kind",
+ * // "lookbackConfiguration": {},
+ * // "naturalSearchConversionAttributionOption": "my_naturalSearchConversionAttributionOption",
+ * // "omnitureSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "tagSettings": {},
+ * // "thirdPartyAuthenticationTokens": [],
+ * // "userDefinedVariableConfigurations": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "analyticsDataSharingEnabled": false,
+ * // "customViewabilityMetric": {},
+ * // "exposureToConversionEnabled": false,
+ * // "firstDayOfWeek": "my_firstDayOfWeek",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "inAppAttributionTrackingEnabled": false,
+ * // "kind": "my_kind",
+ * // "lookbackConfiguration": {},
+ * // "naturalSearchConversionAttributionOption": "my_naturalSearchConversionAttributionOption",
+ * // "omnitureSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "tagSettings": {},
+ * // "thirdPartyAuthenticationTokens": [],
+ * // "userDefinedVariableConfigurations": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.floodlightConfigurations.update
* @memberOf! ()
*
@@ -18454,6 +25892,69 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.inventoryItems.get
* @desc Gets one inventory item by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.inventoryItems.get({
+ * // Inventory item ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Project ID for order documents.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adSlots": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "estimatedClickThroughRate": "my_estimatedClickThroughRate",
+ * // "estimatedConversionRate": "my_estimatedConversionRate",
+ * // "id": "my_id",
+ * // "inPlan": false,
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "negotiationChannelId": "my_negotiationChannelId",
+ * // "orderId": "my_orderId",
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricing": {},
+ * // "projectId": "my_projectId",
+ * // "rfpId": "my_rfpId",
+ * // "siteId": "my_siteId",
+ * // "subaccountId": "my_subaccountId",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.inventoryItems.get
* @memberOf! ()
*
@@ -18530,6 +26031,68 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.inventoryItems.list
* @desc Retrieves a list of inventory items, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.inventoryItems.list({
+ * // Select only inventory items with these IDs.
+ * ids: 'placeholder-value',
+ * // Select only inventory items that are in plan.
+ * inPlan: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Select only inventory items that belong to specified orders.
+ * orderId: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Project ID for order documents.
+ * projectId: 'placeholder-value',
+ * // Select only inventory items that are associated with these sites.
+ * siteId: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only inventory items with this type.
+ * type: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "inventoryItems": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.inventoryItems.list
* @memberOf! ()
*
@@ -18701,6 +26264,47 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.languages.list
* @desc Retrieves a list of languages.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.languages.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "languages": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.languages.list
* @memberOf! ()
*
@@ -18794,6 +26398,47 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.metros.list
* @desc Retrieves a list of metros.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.metros.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "metros": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.metros.list
* @memberOf! ()
*
@@ -18885,6 +26530,52 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.mobileApps.get
* @desc Gets one mobile app by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.mobileApps.get({
+ * // Mobile app ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "directory": "my_directory",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "publisherName": "my_publisherName",
+ * // "title": "my_title"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.mobileApps.get
* @memberOf! ()
*
@@ -18959,6 +26650,58 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.mobileApps.list
* @desc Retrieves list of available mobile apps.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.mobileApps.list({
+ * // Select only apps from these directories.
+ * directories: 'placeholder-value',
+ * // Select only apps with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "app*2015" will return objects with names like "app Jan 2018", "app Jan 2018", or simply "app 2018". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "app" will match objects with name "my app", "app 2018", or simply "app".
+ * searchString: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "mobileApps": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.mobileApps.list
* @memberOf! ()
*
@@ -19092,6 +26835,52 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.mobileCarriers.get
* @desc Gets one mobile carrier by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.mobileCarriers.get({
+ * // Mobile carrier ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "countryCode": "my_countryCode",
+ * // "countryDartId": "my_countryDartId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.mobileCarriers.get
* @memberOf! ()
*
@@ -19167,6 +26956,47 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.mobileCarriers.list
* @desc Retrieves a list of mobile carriers.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.mobileCarriers.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "mobileCarriers": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.mobileCarriers.list
* @memberOf! ()
*
@@ -19284,6 +27114,52 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.operatingSystems.get
* @desc Gets one operating system by DART ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.operatingSystems.get({
+ * // Operating system DART ID.
+ * dartId: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dartId": "my_dartId",
+ * // "desktop": false,
+ * // "kind": "my_kind",
+ * // "mobile": false,
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.operatingSystems.get
* @memberOf! ()
*
@@ -19359,6 +27235,47 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.operatingSystems.list
* @desc Retrieves a list of operating systems.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.operatingSystems.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "operatingSystems": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.operatingSystems.list
* @memberOf! ()
*
@@ -19478,6 +27395,53 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.operatingSystemVersions.get
* @desc Gets one operating system version by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.operatingSystemVersions.get({
+ * // Operating system version ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "majorVersion": "my_majorVersion",
+ * // "minorVersion": "my_minorVersion",
+ * // "name": "my_name",
+ * // "operatingSystem": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.operatingSystemVersions.get
* @memberOf! ()
*
@@ -19555,6 +27519,47 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.operatingSystemVersions.list
* @desc Retrieves a list of operating system versions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.operatingSystemVersions.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "operatingSystemVersions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.operatingSystemVersions.list
* @memberOf! ()
*
@@ -19676,6 +27681,66 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.orderDocuments.get
* @desc Gets one order document by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.orderDocuments.get({
+ * // Order document ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Project ID for order documents.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "amendedOrderDocumentId": "my_amendedOrderDocumentId",
+ * // "approvedByUserProfileIds": [],
+ * // "cancelled": false,
+ * // "createdInfo": {},
+ * // "effectiveDate": "my_effectiveDate",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastSentRecipients": [],
+ * // "lastSentTime": "my_lastSentTime",
+ * // "orderId": "my_orderId",
+ * // "projectId": "my_projectId",
+ * // "signed": false,
+ * // "subaccountId": "my_subaccountId",
+ * // "title": "my_title",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.orderDocuments.get
* @memberOf! ()
*
@@ -19752,6 +27817,68 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.orderDocuments.list
* @desc Retrieves a list of order documents, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.orderDocuments.list({
+ * // Select only order documents that have been approved by at least one user.
+ * approved: 'placeholder-value',
+ * // Select only order documents with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Select only order documents for specified orders.
+ * orderId: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Project ID for order documents.
+ * projectId: 'placeholder-value',
+ * // Allows searching for order documents by name or ID. Wildcards (*) are allowed. For example, "orderdocument*2015" will return order documents with names like "orderdocument June 2015", "orderdocument April 2015", or simply "orderdocument 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "orderdocument" will match order documents with name "my orderdocument", "orderdocument 2015", or simply "orderdocument".
+ * searchString: 'placeholder-value',
+ * // Select only order documents that are associated with these sites.
+ * siteId: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "orderDocuments": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.orderDocuments.list
* @memberOf! ()
*
@@ -19923,6 +28050,69 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.orders.get
* @desc Gets one order by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.orders.get({
+ * // Order ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Project ID for orders.
+ * projectId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "approverUserProfileIds": [],
+ * // "buyerInvoiceId": "my_buyerInvoiceId",
+ * // "buyerOrganizationName": "my_buyerOrganizationName",
+ * // "comments": "my_comments",
+ * // "contacts": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "notes": "my_notes",
+ * // "planningTermId": "my_planningTermId",
+ * // "projectId": "my_projectId",
+ * // "sellerOrderId": "my_sellerOrderId",
+ * // "sellerOrganizationName": "my_sellerOrganizationName",
+ * // "siteId": [],
+ * // "siteNames": [],
+ * // "subaccountId": "my_subaccountId",
+ * // "termsAndConditions": "my_termsAndConditions"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.orders.get
* @memberOf! ()
*
@@ -19996,6 +28186,64 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.orders.list
* @desc Retrieves a list of orders, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.orders.list({
+ * // Select only orders with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Project ID for orders.
+ * projectId: 'placeholder-value',
+ * // Allows searching for orders by name or ID. Wildcards (*) are allowed. For example, "order*2015" will return orders with names like "order June 2015", "order April 2015", or simply "order 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "order" will match orders with name "my order", "order 2015", or simply "order".
+ * searchString: 'placeholder-value',
+ * // Select only orders that are associated with these site IDs.
+ * siteId: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "orders": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.orders.list
* @memberOf! ()
*
@@ -20147,6 +28395,73 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.placementGroups.get
* @desc Gets one placement group by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementGroups.get({
+ * // Placement group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "childPlacementIds": [],
+ * // "comment": "my_comment",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementGroupType": "my_placementGroupType",
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primaryPlacementId": "my_primaryPlacementId",
+ * // "primaryPlacementIdDimensionValue": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementGroups.get
* @memberOf! ()
*
@@ -20222,6 +28537,104 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.placementGroups.insert
* @desc Inserts a new placement group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementGroups.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "childPlacementIds": [],
+ * // "comment": "my_comment",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementGroupType": "my_placementGroupType",
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primaryPlacementId": "my_primaryPlacementId",
+ * // "primaryPlacementIdDimensionValue": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "childPlacementIds": [],
+ * // "comment": "my_comment",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementGroupType": "my_placementGroupType",
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primaryPlacementId": "my_primaryPlacementId",
+ * // "primaryPlacementIdDimensionValue": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementGroups.insert
* @memberOf! ()
*
@@ -20297,6 +28710,86 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.placementGroups.list
* @desc Retrieves a list of placement groups, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementGroups.list({
+ * // Select only placement groups that belong to these advertisers.
+ * advertiserIds: 'placeholder-value',
+ * // Select only archived placements. Don't set this field to select both archived and non-archived placements.
+ * archived: 'placeholder-value',
+ * // Select only placement groups that belong to these campaigns.
+ * campaignIds: 'placeholder-value',
+ * // Select only placement groups that are associated with these content categories.
+ * contentCategoryIds: 'placeholder-value',
+ * // Select only placement groups that are associated with these directory sites.
+ * directorySiteIds: 'placeholder-value',
+ * // Select only placement groups with these IDs.
+ * ids: 'placeholder-value',
+ * // Select only placements or placement groups whose end date is on or before the specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
+ * maxEndDate: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Select only placements or placement groups whose start date is on or before the specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
+ * maxStartDate: 'placeholder-value',
+ * // Select only placements or placement groups whose end date is on or after the specified minEndDate. The date should be formatted as "yyyy-MM-dd".
+ * minEndDate: 'placeholder-value',
+ * // Select only placements or placement groups whose start date is on or after the specified minStartDate. The date should be formatted as "yyyy-MM-dd".
+ * minStartDate: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // Select only placement groups belonging with this group type. A package is a simple group of placements that acts as a single pricing point for a group of tags. A roadblock is a group of placements that not only acts as a single pricing point but also assumes that all the tags in it will be served at the same time. A roadblock requires one of its assigned placements to be marked as primary for reporting.
+ * placementGroupType: 'placeholder-value',
+ * // Select only placement groups that are associated with these placement strategies.
+ * placementStrategyIds: 'placeholder-value',
+ * // Select only placement groups with these pricing types.
+ * pricingTypes: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for placement groups by name or ID. Wildcards (*) are allowed. For example, "placement*2015" will return placement groups with names like "placement group June 2015", "placement group May 2015", or simply "placements 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "placementgroup" will match placement groups with name "my placementgroup", "placementgroup 2015", or simply "placementgroup".
+ * searchString: 'placeholder-value',
+ * // Select only placement groups that are associated with these sites.
+ * siteIds: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "placementGroups": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementGroups.list
* @memberOf! ()
*
@@ -20397,6 +28890,106 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.placementGroups.patch
* @desc Updates an existing placement group. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementGroups.patch({
+ * // Placement group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "childPlacementIds": [],
+ * // "comment": "my_comment",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementGroupType": "my_placementGroupType",
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primaryPlacementId": "my_primaryPlacementId",
+ * // "primaryPlacementIdDimensionValue": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "childPlacementIds": [],
+ * // "comment": "my_comment",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementGroupType": "my_placementGroupType",
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primaryPlacementId": "my_primaryPlacementId",
+ * // "primaryPlacementIdDimensionValue": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementGroups.patch
* @memberOf! ()
*
@@ -20473,6 +29066,104 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.placementGroups.update
* @desc Updates an existing placement group.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementGroups.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "childPlacementIds": [],
+ * // "comment": "my_comment",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementGroupType": "my_placementGroupType",
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primaryPlacementId": "my_primaryPlacementId",
+ * // "primaryPlacementIdDimensionValue": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "childPlacementIds": [],
+ * // "comment": "my_comment",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "placementGroupType": "my_placementGroupType",
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primaryPlacementId": "my_primaryPlacementId",
+ * // "primaryPlacementIdDimensionValue": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementGroups.update
* @memberOf! ()
*
@@ -20715,6 +29406,55 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.placements.generatetags
* @desc Generates tags for a placement.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placements.generatetags({
+ * // Generate placements belonging to this campaign. This is a required field.
+ * campaignId: 'placeholder-value',
+ * // Generate tags for these placements.
+ * placementIds: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Tag formats to generate for these placements.
+ * //
+ * // Note: PLACEMENT_TAG_STANDARD can only be generated for 1x1 placements.
+ * tagFormats: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "placementTags": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placements.generatetags
* @memberOf! ()
*
@@ -20801,6 +29541,88 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.placements.get
* @desc Gets one placement by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placements.get({
+ * // Placement ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingOptOut": false,
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "comment": "my_comment",
+ * // "compatibility": "my_compatibility",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "lookbackConfiguration": {},
+ * // "name": "my_name",
+ * // "paymentApproved": false,
+ * // "paymentSource": "my_paymentSource",
+ * // "placementGroupId": "my_placementGroupId",
+ * // "placementGroupIdDimensionValue": {},
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primary": false,
+ * // "publisherUpdateInfo": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "size": {},
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormats": [],
+ * // "tagSetting": {},
+ * // "videoActiveViewOptOut": false,
+ * // "videoSettings": {},
+ * // "vpaidAdapterChoice": "my_vpaidAdapterChoice"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placements.get
* @memberOf! ()
*
@@ -20875,6 +29697,134 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.placements.insert
* @desc Inserts a new placement.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placements.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingOptOut": false,
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "comment": "my_comment",
+ * // "compatibility": "my_compatibility",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "lookbackConfiguration": {},
+ * // "name": "my_name",
+ * // "paymentApproved": false,
+ * // "paymentSource": "my_paymentSource",
+ * // "placementGroupId": "my_placementGroupId",
+ * // "placementGroupIdDimensionValue": {},
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primary": false,
+ * // "publisherUpdateInfo": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "size": {},
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormats": [],
+ * // "tagSetting": {},
+ * // "videoActiveViewOptOut": false,
+ * // "videoSettings": {},
+ * // "vpaidAdapterChoice": "my_vpaidAdapterChoice"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingOptOut": false,
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "comment": "my_comment",
+ * // "compatibility": "my_compatibility",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "lookbackConfiguration": {},
+ * // "name": "my_name",
+ * // "paymentApproved": false,
+ * // "paymentSource": "my_paymentSource",
+ * // "placementGroupId": "my_placementGroupId",
+ * // "placementGroupIdDimensionValue": {},
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primary": false,
+ * // "publisherUpdateInfo": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "size": {},
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormats": [],
+ * // "tagSetting": {},
+ * // "videoActiveViewOptOut": false,
+ * // "videoSettings": {},
+ * // "vpaidAdapterChoice": "my_vpaidAdapterChoice"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placements.insert
* @memberOf! ()
*
@@ -20949,6 +29899,92 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.placements.list
* @desc Retrieves a list of placements, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placements.list({
+ * // Select only placements that belong to these advertisers.
+ * advertiserIds: 'placeholder-value',
+ * // Select only archived placements. Don't set this field to select both archived and non-archived placements.
+ * archived: 'placeholder-value',
+ * // Select only placements that belong to these campaigns.
+ * campaignIds: 'placeholder-value',
+ * // Select only placements that are associated with these compatibilities. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard.
+ * compatibilities: 'placeholder-value',
+ * // Select only placements that are associated with these content categories.
+ * contentCategoryIds: 'placeholder-value',
+ * // Select only placements that are associated with these directory sites.
+ * directorySiteIds: 'placeholder-value',
+ * // Select only placements that belong to these placement groups.
+ * groupIds: 'placeholder-value',
+ * // Select only placements with these IDs.
+ * ids: 'placeholder-value',
+ * // Select only placements or placement groups whose end date is on or before the specified maxEndDate. The date should be formatted as "yyyy-MM-dd".
+ * maxEndDate: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Select only placements or placement groups whose start date is on or before the specified maxStartDate. The date should be formatted as "yyyy-MM-dd".
+ * maxStartDate: 'placeholder-value',
+ * // Select only placements or placement groups whose end date is on or after the specified minEndDate. The date should be formatted as "yyyy-MM-dd".
+ * minEndDate: 'placeholder-value',
+ * // Select only placements or placement groups whose start date is on or after the specified minStartDate. The date should be formatted as "yyyy-MM-dd".
+ * minStartDate: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // Select only placements with this payment source.
+ * paymentSource: 'placeholder-value',
+ * // Select only placements that are associated with these placement strategies.
+ * placementStrategyIds: 'placeholder-value',
+ * // Select only placements with these pricing types.
+ * pricingTypes: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for placements by name or ID. Wildcards (*) are allowed. For example, "placement*2015" will return placements with names like "placement June 2015", "placement May 2015", or simply "placements 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "placement" will match placements with name "my placement", "placement 2015", or simply "placement".
+ * searchString: 'placeholder-value',
+ * // Select only placements that are associated with these sites.
+ * siteIds: 'placeholder-value',
+ * // Select only placements that are associated with these sizes.
+ * sizeIds: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "placements": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placements.list
* @memberOf! ()
*
@@ -21045,6 +30081,136 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.placements.patch
* @desc Updates an existing placement. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placements.patch({
+ * // Placement ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingOptOut": false,
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "comment": "my_comment",
+ * // "compatibility": "my_compatibility",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "lookbackConfiguration": {},
+ * // "name": "my_name",
+ * // "paymentApproved": false,
+ * // "paymentSource": "my_paymentSource",
+ * // "placementGroupId": "my_placementGroupId",
+ * // "placementGroupIdDimensionValue": {},
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primary": false,
+ * // "publisherUpdateInfo": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "size": {},
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormats": [],
+ * // "tagSetting": {},
+ * // "videoActiveViewOptOut": false,
+ * // "videoSettings": {},
+ * // "vpaidAdapterChoice": "my_vpaidAdapterChoice"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingOptOut": false,
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "comment": "my_comment",
+ * // "compatibility": "my_compatibility",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "lookbackConfiguration": {},
+ * // "name": "my_name",
+ * // "paymentApproved": false,
+ * // "paymentSource": "my_paymentSource",
+ * // "placementGroupId": "my_placementGroupId",
+ * // "placementGroupIdDimensionValue": {},
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primary": false,
+ * // "publisherUpdateInfo": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "size": {},
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormats": [],
+ * // "tagSetting": {},
+ * // "videoActiveViewOptOut": false,
+ * // "videoSettings": {},
+ * // "vpaidAdapterChoice": "my_vpaidAdapterChoice"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placements.patch
* @memberOf! ()
*
@@ -21119,6 +30285,134 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.placements.update
* @desc Updates an existing placement.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placements.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingOptOut": false,
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "comment": "my_comment",
+ * // "compatibility": "my_compatibility",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "lookbackConfiguration": {},
+ * // "name": "my_name",
+ * // "paymentApproved": false,
+ * // "paymentSource": "my_paymentSource",
+ * // "placementGroupId": "my_placementGroupId",
+ * // "placementGroupIdDimensionValue": {},
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primary": false,
+ * // "publisherUpdateInfo": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "size": {},
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormats": [],
+ * // "tagSetting": {},
+ * // "videoActiveViewOptOut": false,
+ * // "videoSettings": {},
+ * // "vpaidAdapterChoice": "my_vpaidAdapterChoice"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "adBlockingOptOut": false,
+ * // "additionalSizes": [],
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "archived": false,
+ * // "campaignId": "my_campaignId",
+ * // "campaignIdDimensionValue": {},
+ * // "comment": "my_comment",
+ * // "compatibility": "my_compatibility",
+ * // "contentCategoryId": "my_contentCategoryId",
+ * // "createInfo": {},
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "externalId": "my_externalId",
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "lookbackConfiguration": {},
+ * // "name": "my_name",
+ * // "paymentApproved": false,
+ * // "paymentSource": "my_paymentSource",
+ * // "placementGroupId": "my_placementGroupId",
+ * // "placementGroupIdDimensionValue": {},
+ * // "placementStrategyId": "my_placementStrategyId",
+ * // "pricingSchedule": {},
+ * // "primary": false,
+ * // "publisherUpdateInfo": {},
+ * // "siteId": "my_siteId",
+ * // "siteIdDimensionValue": {},
+ * // "size": {},
+ * // "sslRequired": false,
+ * // "status": "my_status",
+ * // "subaccountId": "my_subaccountId",
+ * // "tagFormats": [],
+ * // "tagSetting": {},
+ * // "videoActiveViewOptOut": false,
+ * // "videoSettings": {},
+ * // "vpaidAdapterChoice": "my_vpaidAdapterChoice"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placements.update
* @memberOf! ()
*
@@ -21393,6 +30687,43 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.placementStrategies.delete
* @desc Deletes an existing placement strategy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementStrategies.delete({
+ * // Placement strategy ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementStrategies.delete
* @memberOf! ()
*
@@ -21466,6 +30797,51 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.placementStrategies.get
* @desc Gets one placement strategy by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementStrategies.get({
+ * // Placement strategy ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementStrategies.get
* @memberOf! ()
*
@@ -21541,6 +30917,60 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.placementStrategies.insert
* @desc Inserts a new placement strategy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementStrategies.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementStrategies.insert
* @memberOf! ()
*
@@ -21616,6 +31046,60 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.placementStrategies.list
* @desc Retrieves a list of placement strategies, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementStrategies.list({
+ * // Select only placement strategies with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "placementstrategy*2015" will return objects with names like "placementstrategy June 2015", "placementstrategy April 2015", or simply "placementstrategy 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "placementstrategy" will match objects with name "my placementstrategy", "placementstrategy 2015", or simply "placementstrategy".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "placementStrategies": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementStrategies.list
* @memberOf! ()
*
@@ -21705,6 +31189,62 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.placementStrategies.patch
* @desc Updates an existing placement strategy. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementStrategies.patch({
+ * // Placement strategy ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementStrategies.patch
* @memberOf! ()
*
@@ -21781,6 +31321,60 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.placementStrategies.update
* @desc Updates an existing placement strategy.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.placementStrategies.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.placementStrategies.update
* @memberOf! ()
*
@@ -21987,6 +31581,50 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.platformTypes.get
* @desc Gets one platform type by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.platformTypes.get({
+ * // Platform type ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.platformTypes.get
* @memberOf! ()
*
@@ -22062,6 +31700,47 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.platformTypes.list
* @desc Retrieves a list of platform types.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.platformTypes.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "platformTypes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.platformTypes.list
* @memberOf! ()
*
@@ -22179,6 +31858,52 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.postalCodes.get
* @desc Gets one postal code by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.postalCodes.get({
+ * // Postal code ID.
+ * code: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "code": "my_code",
+ * // "countryCode": "my_countryCode",
+ * // "countryDartId": "my_countryDartId",
+ * // "id": "my_id",
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.postalCodes.get
* @memberOf! ()
*
@@ -22253,6 +31978,47 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.postalCodes.list
* @desc Retrieves a list of postal codes.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.postalCodes.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "postalCodes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.postalCodes.list
* @memberOf! ()
*
@@ -22362,6 +32128,69 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.projects.get
* @desc Gets one project by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.projects.get({
+ * // Project ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "audienceAgeGroup": "my_audienceAgeGroup",
+ * // "audienceGender": "my_audienceGender",
+ * // "budget": "my_budget",
+ * // "clientBillingCode": "my_clientBillingCode",
+ * // "clientName": "my_clientName",
+ * // "endDate": "my_endDate",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedInfo": {},
+ * // "name": "my_name",
+ * // "overview": "my_overview",
+ * // "startDate": "my_startDate",
+ * // "subaccountId": "my_subaccountId",
+ * // "targetClicks": "my_targetClicks",
+ * // "targetConversions": "my_targetConversions",
+ * // "targetCpaNanos": "my_targetCpaNanos",
+ * // "targetCpcNanos": "my_targetCpcNanos",
+ * // "targetCpmActiveViewNanos": "my_targetCpmActiveViewNanos",
+ * // "targetCpmNanos": "my_targetCpmNanos",
+ * // "targetImpressions": "my_targetImpressions"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.projects.get
* @memberOf! ()
*
@@ -22434,6 +32263,62 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.projects.list
* @desc Retrieves a list of projects, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.projects.list({
+ * // Select only projects with these advertiser IDs.
+ * advertiserIds: 'placeholder-value',
+ * // Select only projects with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for projects by name or ID. Wildcards (*) are allowed. For example, "project*2015" will return projects with names like "project June 2015", "project April 2015", or simply "project 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "project" will match projects with name "my project", "project 2015", or simply "project".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "projects": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.projects.list
* @memberOf! ()
*
@@ -22577,6 +32462,47 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.regions.list
* @desc Retrieves a list of regions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.regions.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "regions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.regions.list
* @memberOf! ()
*
@@ -22668,6 +32594,60 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.remarketingLists.get
* @desc Gets one remarketing list by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.remarketingLists.get({
+ * // Remarketing list ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lifeSpan": "my_lifeSpan",
+ * // "listPopulationRule": {},
+ * // "listSize": "my_listSize",
+ * // "listSource": "my_listSource",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.remarketingLists.get
* @memberOf! ()
*
@@ -22743,6 +32723,78 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.remarketingLists.insert
* @desc Inserts a new remarketing list.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.remarketingLists.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lifeSpan": "my_lifeSpan",
+ * // "listPopulationRule": {},
+ * // "listSize": "my_listSize",
+ * // "listSource": "my_listSource",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lifeSpan": "my_lifeSpan",
+ * // "listPopulationRule": {},
+ * // "listSize": "my_listSize",
+ * // "listSource": "my_listSource",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.remarketingLists.insert
* @memberOf! ()
*
@@ -22818,6 +32870,64 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.remarketingLists.list
* @desc Retrieves a list of remarketing lists, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.remarketingLists.list({
+ * // Select only active or only inactive remarketing lists.
+ * active: 'placeholder-value',
+ * // Select only remarketing lists owned by this advertiser.
+ * advertiserId: 'placeholder-value',
+ * // Select only remarketing lists that have this floodlight activity ID.
+ * floodlightActivityId: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "remarketing list*2015" will return objects with names like "remarketing list June 2015", "remarketing list April 2015", or simply "remarketing list 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "remarketing list" will match objects with name "my remarketing list", "remarketing list 2015", or simply "remarketing list".
+ * name: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "remarketingLists": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.remarketingLists.list
* @memberOf! ()
*
@@ -22909,6 +33019,80 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.remarketingLists.patch
* @desc Updates an existing remarketing list. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.remarketingLists.patch({
+ * // Remarketing list ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lifeSpan": "my_lifeSpan",
+ * // "listPopulationRule": {},
+ * // "listSize": "my_listSize",
+ * // "listSource": "my_listSource",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lifeSpan": "my_lifeSpan",
+ * // "listPopulationRule": {},
+ * // "listSize": "my_listSize",
+ * // "listSource": "my_listSource",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.remarketingLists.patch
* @memberOf! ()
*
@@ -22985,6 +33169,78 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.remarketingLists.update
* @desc Updates an existing remarketing list.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.remarketingLists.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lifeSpan": "my_lifeSpan",
+ * // "listPopulationRule": {},
+ * // "listSize": "my_listSize",
+ * // "listSource": "my_listSource",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lifeSpan": "my_lifeSpan",
+ * // "listPopulationRule": {},
+ * // "listSize": "my_listSize",
+ * // "listSource": "my_listSource",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.remarketingLists.update
* @memberOf! ()
*
@@ -23183,6 +33439,51 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.remarketingListShares.get
* @desc Gets one remarketing list share by remarketing list ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.remarketingListShares.get({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Remarketing list ID.
+ * remarketingListId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "remarketingListId": "my_remarketingListId",
+ * // "sharedAccountIds": [],
+ * // "sharedAdvertiserIds": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.remarketingListShares.get
* @memberOf! ()
*
@@ -23260,6 +33561,62 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.remarketingListShares.patch
* @desc Updates an existing remarketing list share. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.remarketingListShares.patch({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Remarketing list ID.
+ * remarketingListId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "remarketingListId": "my_remarketingListId",
+ * // "sharedAccountIds": [],
+ * // "sharedAdvertiserIds": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "remarketingListId": "my_remarketingListId",
+ * // "sharedAccountIds": [],
+ * // "sharedAdvertiserIds": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.remarketingListShares.patch
* @memberOf! ()
*
@@ -23338,6 +33695,60 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.remarketingListShares.update
* @desc Updates an existing remarketing list share.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.remarketingListShares.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "kind": "my_kind",
+ * // "remarketingListId": "my_remarketingListId",
+ * // "sharedAccountIds": [],
+ * // "sharedAdvertiserIds": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "remarketingListId": "my_remarketingListId",
+ * // "sharedAccountIds": [],
+ * // "sharedAdvertiserIds": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.remarketingListShares.update
* @memberOf! ()
*
@@ -23483,6 +33894,43 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.reports.delete
* @desc Deletes a report by its ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.delete({
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ * // The ID of the report.
+ * reportId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.delete
* @memberOf! ()
*
@@ -23555,6 +34003,65 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.reports.get
* @desc Retrieves a report by its ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.get({
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ * // The ID of the report.
+ * reportId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "criteria": {},
+ * // "crossDimensionReachCriteria": {},
+ * // "delivery": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "floodlightCriteria": {},
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name",
+ * // "ownerProfileId": "my_ownerProfileId",
+ * // "pathToConversionCriteria": {},
+ * // "reachCriteria": {},
+ * // "schedule": {},
+ * // "subAccountId": "my_subAccountId",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.get
* @memberOf! ()
*
@@ -23627,6 +34134,88 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.reports.insert
* @desc Creates a report.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.insert({
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "criteria": {},
+ * // "crossDimensionReachCriteria": {},
+ * // "delivery": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "floodlightCriteria": {},
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name",
+ * // "ownerProfileId": "my_ownerProfileId",
+ * // "pathToConversionCriteria": {},
+ * // "reachCriteria": {},
+ * // "schedule": {},
+ * // "subAccountId": "my_subAccountId",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "criteria": {},
+ * // "crossDimensionReachCriteria": {},
+ * // "delivery": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "floodlightCriteria": {},
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name",
+ * // "ownerProfileId": "my_ownerProfileId",
+ * // "pathToConversionCriteria": {},
+ * // "reachCriteria": {},
+ * // "schedule": {},
+ * // "subAccountId": "my_subAccountId",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.insert
* @memberOf! ()
*
@@ -23698,6 +34287,59 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.reports.list
* @desc Retrieves list of reports.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.list({
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // The value of the nextToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ * // The scope that defines which results are returned.
+ * scope: 'placeholder-value',
+ * // The field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.list
* @memberOf! ()
*
@@ -23775,6 +34417,59 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.reports.run
* @desc Runs a report.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.run({
+ * // The DFA profile ID.
+ * profileId: 'placeholder-value',
+ * // The ID of the report.
+ * reportId: 'placeholder-value',
+ * // If set and true, tries to run the report synchronously.
+ * synchronous: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dateRange": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "reportId": "my_reportId",
+ * // "status": "my_status",
+ * // "urls": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.run
* @memberOf! ()
*
@@ -23848,6 +34543,90 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.reports.update
* @desc Updates a report.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.update({
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ * // The ID of the report.
+ * reportId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "criteria": {},
+ * // "crossDimensionReachCriteria": {},
+ * // "delivery": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "floodlightCriteria": {},
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name",
+ * // "ownerProfileId": "my_ownerProfileId",
+ * // "pathToConversionCriteria": {},
+ * // "reachCriteria": {},
+ * // "schedule": {},
+ * // "subAccountId": "my_subAccountId",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "criteria": {},
+ * // "crossDimensionReachCriteria": {},
+ * // "delivery": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "floodlightCriteria": {},
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name",
+ * // "ownerProfileId": "my_ownerProfileId",
+ * // "pathToConversionCriteria": {},
+ * // "reachCriteria": {},
+ * // "schedule": {},
+ * // "subAccountId": "my_subAccountId",
+ * // "type": "my_type"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.update
* @memberOf! ()
*
@@ -24045,6 +34824,76 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.reports.compatibleFields.query
* @desc Returns the fields that are compatible to be selected in the respective sections of a report criteria, given the fields already selected in the input report and user permissions.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.compatibleFields.query({
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "criteria": {},
+ * // "crossDimensionReachCriteria": {},
+ * // "delivery": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "floodlightCriteria": {},
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "name": "my_name",
+ * // "ownerProfileId": "my_ownerProfileId",
+ * // "pathToConversionCriteria": {},
+ * // "reachCriteria": {},
+ * // "schedule": {},
+ * // "subAccountId": "my_subAccountId",
+ * // "type": "my_type"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "crossDimensionReachReportCompatibleFields": {},
+ * // "floodlightReportCompatibleFields": {},
+ * // "kind": "my_kind",
+ * // "pathToConversionReportCompatibleFields": {},
+ * // "reachReportCompatibleFields": {},
+ * // "reportCompatibleFields": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.compatibleFields.query
* @memberOf! ()
*
@@ -24145,6 +34994,59 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.reports.files.get
* @desc Retrieves a report file by its report ID and file ID. This method supports media download.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.files.get({
+ * // The ID of the report file.
+ * fileId: 'placeholder-value',
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ * // The ID of the report.
+ * reportId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "dateRange": {},
+ * // "etag": "my_etag",
+ * // "fileName": "my_fileName",
+ * // "format": "my_format",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lastModifiedTime": "my_lastModifiedTime",
+ * // "reportId": "my_reportId",
+ * // "status": "my_status",
+ * // "urls": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.files.get
* @memberOf! ()
*
@@ -24219,6 +35121,59 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.reports.files.list
* @desc Lists files for a report.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfareporting'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.reports.files.list({
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // The value of the nextToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // The DFA user profile ID.
+ * profileId: 'placeholder-value',
+ * // The ID of the report.
+ * reportId: 'placeholder-value',
+ * // The field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.reports.files.list
* @memberOf! ()
*
@@ -24356,6 +35311,60 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.sites.get
* @desc Gets one site by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.sites.get({
+ * // Site ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "approved": false,
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteContacts": [],
+ * // "siteSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "videoSettings": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.sites.get
* @memberOf! ()
*
@@ -24427,6 +35436,78 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.sites.insert
* @desc Inserts a new site.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.sites.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "approved": false,
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteContacts": [],
+ * // "siteSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "videoSettings": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "approved": false,
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteContacts": [],
+ * // "siteSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "videoSettings": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.sites.insert
* @memberOf! ()
*
@@ -24498,6 +35579,78 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.sites.list
* @desc Retrieves a list of sites, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.sites.list({
+ * // This search filter is no longer supported and will have no effect on the results returned.
+ * acceptsInStreamVideoPlacements: 'placeholder-value',
+ * // This search filter is no longer supported and will have no effect on the results returned.
+ * acceptsInterstitialPlacements: 'placeholder-value',
+ * // Select only sites that accept publisher paid placements.
+ * acceptsPublisherPaidPlacements: 'placeholder-value',
+ * // Select only AdWords sites.
+ * adWordsSite: 'placeholder-value',
+ * // Select only approved sites.
+ * approved: 'placeholder-value',
+ * // Select only sites with these campaign IDs.
+ * campaignIds: 'placeholder-value',
+ * // Select only sites with these directory site IDs.
+ * directorySiteIds: 'placeholder-value',
+ * // Select only sites with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name, ID or keyName. Wildcards (*) are allowed. For example, "site*2015" will return objects with names like "site June 2015", "site April 2015", or simply "site 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "site" will match objects with name "my site", "site 2015", or simply "site".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only sites with this subaccount ID.
+ * subaccountId: 'placeholder-value',
+ * // Select only sites that have not been mapped to a directory site.
+ * unmappedSite: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "sites": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.sites.list
* @memberOf! ()
*
@@ -24585,6 +35738,80 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.sites.patch
* @desc Updates an existing site. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.sites.patch({
+ * // Site ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "approved": false,
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteContacts": [],
+ * // "siteSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "videoSettings": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "approved": false,
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteContacts": [],
+ * // "siteSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "videoSettings": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.sites.patch
* @memberOf! ()
*
@@ -24657,6 +35884,78 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.sites.update
* @desc Updates an existing site.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.sites.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "approved": false,
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteContacts": [],
+ * // "siteSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "videoSettings": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "approved": false,
+ * // "directorySiteId": "my_directorySiteId",
+ * // "directorySiteIdDimensionValue": {},
+ * // "id": "my_id",
+ * // "idDimensionValue": {},
+ * // "keyName": "my_keyName",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "siteContacts": [],
+ * // "siteSettings": {},
+ * // "subaccountId": "my_subaccountId",
+ * // "videoSettings": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.sites.update
* @memberOf! ()
*
@@ -24874,6 +36173,52 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.sizes.get
* @desc Gets one size by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.sizes.get({
+ * // Size ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "height": 0,
+ * // "iab": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "width": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.sizes.get
* @memberOf! ()
*
@@ -24945,6 +36290,62 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.sizes.insert
* @desc Inserts a new size.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.sizes.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "height": 0,
+ * // "iab": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "width": 0
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "height": 0,
+ * // "iab": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "width": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.sizes.insert
* @memberOf! ()
*
@@ -25016,6 +36417,55 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.sizes.list
* @desc Retrieves a list of sizes, possibly filtered. Retrieved sizes are globally unique and may include values not currently in use by your account. Due to this, the list of sizes returned by this method may differ from the list seen in the Trafficking UI.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.sizes.list({
+ * // Select only sizes with this height.
+ * height: 'placeholder-value',
+ * // Select only IAB standard sizes.
+ * iabStandard: 'placeholder-value',
+ * // Select only sizes with these IDs.
+ * ids: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Select only sizes with this width.
+ * width: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "sizes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.sizes.list
* @memberOf! ()
*
@@ -25158,6 +36608,52 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.subaccounts.get
* @desc Gets one subaccount by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.subaccounts.get({
+ * // Subaccount ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "availablePermissionIds": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.subaccounts.get
* @memberOf! ()
*
@@ -25232,6 +36728,62 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.subaccounts.insert
* @desc Inserts a new subaccount.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.subaccounts.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "availablePermissionIds": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "availablePermissionIds": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.subaccounts.insert
* @memberOf! ()
*
@@ -25307,6 +36859,60 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.subaccounts.list
* @desc Gets a list of subaccounts, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.subaccounts.list({
+ * // Select only subaccounts with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "subaccount*2015" will return objects with names like "subaccount June 2015", "subaccount April 2015", or simply "subaccount 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "subaccount" will match objects with name "my subaccount", "subaccount 2015", or simply "subaccount".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "subaccounts": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.subaccounts.list
* @memberOf! ()
*
@@ -25388,6 +36994,64 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.subaccounts.patch
* @desc Updates an existing subaccount. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.subaccounts.patch({
+ * // Subaccount ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "availablePermissionIds": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "availablePermissionIds": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.subaccounts.patch
* @memberOf! ()
*
@@ -25464,6 +37128,62 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.subaccounts.update
* @desc Updates an existing subaccount.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.subaccounts.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "availablePermissionIds": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "availablePermissionIds": [],
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.subaccounts.update
* @memberOf! ()
*
@@ -25652,6 +37372,59 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.targetableRemarketingLists.get
* @desc Gets one remarketing list by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.targetableRemarketingLists.get({
+ * // Remarketing list ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "active": false,
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "description": "my_description",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "lifeSpan": "my_lifeSpan",
+ * // "listSize": "my_listSize",
+ * // "listSource": "my_listSource",
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.targetableRemarketingLists.get
* @memberOf! ()
*
@@ -25732,6 +37505,62 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.targetableRemarketingLists.list
* @desc Retrieves a list of targetable remarketing lists, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.targetableRemarketingLists.list({
+ * // Select only active or only inactive targetable remarketing lists.
+ * active: 'placeholder-value',
+ * // Select only targetable remarketing lists targetable by these advertisers.
+ * advertiserId: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "remarketing list*2015" will return objects with names like "remarketing list June 2015", "remarketing list April 2015", or simply "remarketing list 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "remarketing list" will match objects with name "my remarketing list", "remarketing list 2015", or simply "remarketing list".
+ * name: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "targetableRemarketingLists": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.targetableRemarketingLists.list
* @memberOf! ()
*
@@ -25894,6 +37723,60 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.targetingTemplates.get
* @desc Gets one targeting template by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.targetingTemplates.get({
+ * // Targeting template ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "dayPartTargeting": {},
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "listTargetingExpression": {},
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "technologyTargeting": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.targetingTemplates.get
* @memberOf! ()
*
@@ -25969,6 +37852,78 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.targetingTemplates.insert
* @desc Inserts a new targeting template.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.targetingTemplates.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "dayPartTargeting": {},
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "listTargetingExpression": {},
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "technologyTargeting": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "dayPartTargeting": {},
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "listTargetingExpression": {},
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "technologyTargeting": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.targetingTemplates.insert
* @memberOf! ()
*
@@ -26044,6 +37999,62 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.targetingTemplates.list
* @desc Retrieves a list of targeting templates, optionally filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.targetingTemplates.list({
+ * // Select only targeting templates with this advertiser ID.
+ * advertiserId: 'placeholder-value',
+ * // Select only targeting templates with these IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "template*2015" will return objects with names like "template June 2015", "template April 2015", or simply "template 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "template" will match objects with name "my template", "template 2015", or simply "template".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "targetingTemplates": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.targetingTemplates.list
* @memberOf! ()
*
@@ -26134,6 +38145,80 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.targetingTemplates.patch
* @desc Updates an existing targeting template. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.targetingTemplates.patch({
+ * // Targeting template ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "dayPartTargeting": {},
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "listTargetingExpression": {},
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "technologyTargeting": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "dayPartTargeting": {},
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "listTargetingExpression": {},
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "technologyTargeting": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.targetingTemplates.patch
* @memberOf! ()
*
@@ -26210,6 +38295,78 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.targetingTemplates.update
* @desc Updates an existing targeting template.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.targetingTemplates.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "dayPartTargeting": {},
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "listTargetingExpression": {},
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "technologyTargeting": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "advertiserId": "my_advertiserId",
+ * // "advertiserIdDimensionValue": {},
+ * // "dayPartTargeting": {},
+ * // "geoTargeting": {},
+ * // "id": "my_id",
+ * // "keyValueTargetingExpression": {},
+ * // "kind": "my_kind",
+ * // "languageTargeting": {},
+ * // "listTargetingExpression": {},
+ * // "name": "my_name",
+ * // "subaccountId": "my_subaccountId",
+ * // "technologyTargeting": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.targetingTemplates.update
* @memberOf! ()
*
@@ -26404,6 +38561,56 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.userProfiles.get
* @desc Gets one user profile by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/dfareporting',
+ * 'https://www.googleapis.com/auth/dfatrafficking',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userProfiles.get({
+ * // The user profile ID.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "accountName": "my_accountName",
+ * // "etag": "my_etag",
+ * // "kind": "my_kind",
+ * // "profileId": "my_profileId",
+ * // "subAccountId": "my_subAccountId",
+ * // "subAccountName": "my_subAccountName",
+ * // "userName": "my_userName"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userProfiles.get
* @memberOf! ()
*
@@ -26476,6 +38683,48 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.userProfiles.list
* @desc Retrieves list of user profiles for a user.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/dfareporting',
+ * 'https://www.googleapis.com/auth/dfatrafficking',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userProfiles.list({});
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "etag": "my_etag",
+ * // "items": [],
+ * // "kind": "my_kind"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userProfiles.list
* @memberOf! ()
*
@@ -26575,6 +38824,50 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.userRolePermissionGroups.get
* @desc Gets one user role permission group by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRolePermissionGroups.get({
+ * // User role permission group ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRolePermissionGroups.get
* @memberOf! ()
*
@@ -26652,6 +38945,47 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.userRolePermissionGroups.list
* @desc Gets a list of all supported user role permission groups.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRolePermissionGroups.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "userRolePermissionGroups": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRolePermissionGroups.list
* @memberOf! ()
*
@@ -26779,6 +39113,52 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.userRolePermissions.get
* @desc Gets one user role permission by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRolePermissions.get({
+ * // User role permission ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "availability": "my_availability",
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "permissionGroupId": "my_permissionGroupId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRolePermissions.get
* @memberOf! ()
*
@@ -26854,6 +39234,49 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.userRolePermissions.list
* @desc Gets a list of user role permissions, possibly filtered.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRolePermissions.list({
+ * // Select only user role permissions with these IDs.
+ * ids: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "userRolePermissions": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRolePermissions.list
* @memberOf! ()
*
@@ -26978,6 +39401,43 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.userRoles.delete
* @desc Deletes an existing user role.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRoles.delete({
+ * // User role ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRoles.delete
* @memberOf! ()
*
@@ -27050,6 +39510,55 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.userRoles.get
* @desc Gets one user role by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRoles.get({
+ * // User role ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "defaultUserRole": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentUserRoleId": "my_parentUserRoleId",
+ * // "permissions": [],
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRoles.get
* @memberOf! ()
*
@@ -27122,6 +39631,68 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.userRoles.insert
* @desc Inserts a new user role.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRoles.insert({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "defaultUserRole": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentUserRoleId": "my_parentUserRoleId",
+ * // "permissions": [],
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "defaultUserRole": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentUserRoleId": "my_parentUserRoleId",
+ * // "permissions": [],
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRoles.insert
* @memberOf! ()
*
@@ -27193,6 +39764,64 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.userRoles.list
* @desc Retrieves a list of user roles, possibly filtered. This method supports paging.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRoles.list({
+ * // Select only account level user roles not associated with any specific subaccount.
+ * accountUserRoleOnly: 'placeholder-value',
+ * // Select only user roles with the specified IDs.
+ * ids: 'placeholder-value',
+ * // Maximum number of results to return.
+ * maxResults: 'placeholder-value',
+ * // Value of the nextPageToken from the previous result page.
+ * pageToken: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "userrole*2015" will return objects with names like "userrole June 2015", "userrole April 2015", or simply "userrole 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "userrole" will match objects with name "my userrole", "userrole 2015", or simply "userrole".
+ * searchString: 'placeholder-value',
+ * // Field by which to sort the list.
+ * sortField: 'placeholder-value',
+ * // Order of sorted results.
+ * sortOrder: 'placeholder-value',
+ * // Select only user roles that belong to this subaccount.
+ * subaccountId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "nextPageToken": "my_nextPageToken",
+ * // "userRoles": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRoles.list
* @memberOf! ()
*
@@ -27275,6 +39904,70 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.userRoles.patch
* @desc Updates an existing user role. This method supports patch semantics.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRoles.patch({
+ * // User role ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "defaultUserRole": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentUserRoleId": "my_parentUserRoleId",
+ * // "permissions": [],
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "defaultUserRole": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentUserRoleId": "my_parentUserRoleId",
+ * // "permissions": [],
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRoles.patch
* @memberOf! ()
*
@@ -27347,6 +40040,68 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.userRoles.update
* @desc Updates an existing user role.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.userRoles.update({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "accountId": "my_accountId",
+ * // "defaultUserRole": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentUserRoleId": "my_parentUserRoleId",
+ * // "permissions": [],
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "accountId": "my_accountId",
+ * // "defaultUserRole": false,
+ * // "id": "my_id",
+ * // "kind": "my_kind",
+ * // "name": "my_name",
+ * // "parentUserRoleId": "my_parentUserRoleId",
+ * // "permissions": [],
+ * // "subaccountId": "my_subaccountId"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.userRoles.update
* @memberOf! ()
*
@@ -27551,6 +40306,52 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.videoFormats.get
* @desc Gets one video format by ID.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.videoFormats.get({
+ * // Video format ID.
+ * id: 'placeholder-value',
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "fileType": "my_fileType",
+ * // "id": 0,
+ * // "kind": "my_kind",
+ * // "resolution": {},
+ * // "targetBitRate": 0
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.videoFormats.get
* @memberOf! ()
*
@@ -27625,6 +40426,47 @@ export namespace dfareporting_v3_4 {
/**
* dfareporting.videoFormats.list
* @desc Lists available video formats.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dfareporting.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dfareporting = google.dfareporting('v3.4');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: ['https://www.googleapis.com/auth/dfatrafficking'],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dfareporting.videoFormats.list({
+ * // User profile ID associated with this request.
+ * profileId: 'placeholder-value',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "kind": "my_kind",
+ * // "videoFormats": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dfareporting.videoFormats.list
* @memberOf! ()
*
diff --git a/src/apis/dialogflow/v2.ts b/src/apis/dialogflow/v2.ts
index 9613b3ea50b..70dac5af6b4 100644
--- a/src/apis/dialogflow/v2.ts
+++ b/src/apis/dialogflow/v2.ts
@@ -3078,6 +3078,48 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.deleteAgent
* @desc Deletes the specified agent.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.deleteAgent({
+ * // Required. The project that the agent to delete is associated with.
+ * // Format: `projects/`.
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.deleteAgent
* @memberOf! ()
*
@@ -3154,6 +3196,61 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.getAgent
* @desc Retrieves the specified agent.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.getAgent({
+ * // Required. The project that the agent to fetch is associated with.
+ * // Format: `projects/`.
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "apiVersion": "my_apiVersion",
+ * // "avatarUri": "my_avatarUri",
+ * // "classificationThreshold": {},
+ * // "defaultLanguageCode": "my_defaultLanguageCode",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "enableLogging": false,
+ * // "matchMode": "my_matchMode",
+ * // "parent": "my_parent",
+ * // "supportedLanguageCodes": [],
+ * // "tier": "my_tier",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.getAgent
* @memberOf! ()
*
@@ -3237,6 +3334,82 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.setAgent
* @desc Creates/updates the specified agent.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.setAgent({
+ * // Required. The project of this agent.
+ * // Format: `projects/`.
+ * parent: 'projects/my-project',
+ * // Optional. The mask to control which fields get updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "apiVersion": "my_apiVersion",
+ * // "avatarUri": "my_avatarUri",
+ * // "classificationThreshold": {},
+ * // "defaultLanguageCode": "my_defaultLanguageCode",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "enableLogging": false,
+ * // "matchMode": "my_matchMode",
+ * // "parent": "my_parent",
+ * // "supportedLanguageCodes": [],
+ * // "tier": "my_tier",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "apiVersion": "my_apiVersion",
+ * // "avatarUri": "my_avatarUri",
+ * // "classificationThreshold": {},
+ * // "defaultLanguageCode": "my_defaultLanguageCode",
+ * // "description": "my_description",
+ * // "displayName": "my_displayName",
+ * // "enableLogging": false,
+ * // "matchMode": "my_matchMode",
+ * // "parent": "my_parent",
+ * // "supportedLanguageCodes": [],
+ * // "tier": "my_tier",
+ * // "timeZone": "my_timeZone"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.setAgent
* @memberOf! ()
*
@@ -3385,6 +3558,62 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.export
* @desc Exports the specified agent to a ZIP file. Operation
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.export({
+ * // Required. The project that the agent to export is associated with.
+ * // Format: `projects/`.
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "agentUri": "my_agentUri"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.export
* @memberOf! ()
*
@@ -3467,6 +3696,54 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.getFulfillment
* @desc Retrieves the fulfillment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.getFulfillment({
+ * // Required. The name of the fulfillment.
+ * // Format: `projects//agent/fulfillment`.
+ * name: 'projects/my-project/agent/fulfillment',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "enabled": false,
+ * // "features": [],
+ * // "genericWebService": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.getFulfillment
* @memberOf! ()
*
@@ -3547,6 +3824,56 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.getValidationResult
* @desc Gets agent validation result. Agent validation is performed during training time and is updated automatically when training is completed.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.getValidationResult({
+ * // Optional. The language for which you want a validation result. If not
+ * // specified, the agent's default language is used. [Many
+ * // languages](https://cloud.google.com/dialogflow/docs/reference/language)
+ * // are supported. Note: languages must be enabled in the agent before they can
+ * // be used.
+ * languageCode: 'placeholder-value',
+ * // Required. The project that the agent is associated with.
+ * // Format: `projects/`.
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "validationErrors": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.getValidationResult
* @memberOf! ()
*
@@ -3639,6 +3966,63 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.import
* @desc Imports the specified agent from a ZIP file. Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new versions from ImportAgentRequest. Operation
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.import({
+ * // Required. The project that the agent to import is associated with.
+ * // Format: `projects/`.
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "agentContent": "my_agentContent",
+ * // "agentUri": "my_agentUri"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.import
* @memberOf! ()
*
@@ -3721,6 +4105,63 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.restore
* @desc Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and entity types in the older version are deleted. Operation
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.restore({
+ * // Required. The project that the agent to restore is associated with.
+ * // Format: `projects/`.
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "agentContent": "my_agentContent",
+ * // "agentUri": "my_agentUri"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.restore
* @memberOf! ()
*
@@ -3803,6 +4244,56 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.search
* @desc Returns the list of agents. Since there is at most one conversational agent per project, this method is useful primarily for listing all agents across projects the caller has access to. One can achieve that with a wildcard project collection id "-". Refer to [List Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.search({
+ * // Optional. The maximum number of items to return in a single page. By
+ * // default 100 and at most 1000.
+ * pageSize: 'placeholder-value',
+ * // The next_page_token value returned from a previous list request.
+ * pageToken: 'placeholder-value',
+ * // Required. The project to list agents from.
+ * // Format: `projects/`.
+ * parent: 'projects/my-project',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "agents": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.search
* @memberOf! ()
*
@@ -3904,6 +4395,60 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.train
* @desc Trains the specified agent. Operation
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.train({
+ * // Required. The project that the agent to train is associated with.
+ * // Format: `projects/`.
+ * parent: 'projects/my-project',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {}
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.train
* @memberOf! ()
*
@@ -3986,6 +4531,69 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.updateFulfillment
* @desc Updates the fulfillment.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.updateFulfillment({
+ * // Required. The unique identifier of the fulfillment.
+ * // Format: `projects//agent/fulfillment`.
+ * name: 'projects/my-project/agent/fulfillment',
+ * // Required. The mask to control which fields get updated. If the mask is not
+ * // present, all fields will be updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "displayName": "my_displayName",
+ * // "enabled": false,
+ * // "features": [],
+ * // "genericWebService": {},
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "displayName": "my_displayName",
+ * // "enabled": false,
+ * // "features": [],
+ * // "genericWebService": {},
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.updateFulfillment
* @memberOf! ()
*
@@ -4217,6 +4825,62 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.entityTypes.batchDelete
* @desc Deletes entity types in the specified agent. Operation
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.entityTypes.batchDelete({
+ * // Required. The name of the agent to delete all entities types for. Format:
+ * // `projects//agent`.
+ * parent: 'projects/my-project/agent',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entityTypeNames": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.entityTypes.batchDelete
* @memberOf! ()
*
@@ -4299,6 +4963,65 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.entityTypes.batchUpdate
* @desc Updates/Creates multiple entity types in the specified agent. Operation
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.entityTypes.batchUpdate({
+ * // Required. The name of the agent to update or create entity types in.
+ * // Format: `projects//agent`.
+ * parent: 'projects/my-project/agent',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entityTypeBatchInline": {},
+ * // "entityTypeBatchUri": "my_entityTypeBatchUri",
+ * // "languageCode": "my_languageCode",
+ * // "updateMask": "my_updateMask"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.entityTypes.batchUpdate
* @memberOf! ()
*
@@ -4381,6 +5104,74 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.entityTypes.create
* @desc Creates an entity type in the specified agent.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.entityTypes.create({
+ * // Optional. The language used to access language-specific data.
+ * // If not specified, the agent's default language is used.
+ * // For more information, see
+ * // [Multilingual intent and entity
+ * // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
+ * languageCode: 'placeholder-value',
+ * // Required. The agent to create a entity type for.
+ * // Format: `projects//agent`.
+ * parent: 'projects/my-project/agent',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoExpansionMode": "my_autoExpansionMode",
+ * // "displayName": "my_displayName",
+ * // "enableFuzzyExtraction": false,
+ * // "entities": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoExpansionMode": "my_autoExpansionMode",
+ * // "displayName": "my_displayName",
+ * // "enableFuzzyExtraction": false,
+ * // "entities": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.entityTypes.create
* @memberOf! ()
*
@@ -4466,6 +5257,48 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.entityTypes.delete
* @desc Deletes the specified entity type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.entityTypes.delete({
+ * // Required. The name of the entity type to delete.
+ * // Format: `projects//agent/entityTypes/`.
+ * name: 'projects/my-project/agent/entityTypes/my-entityType',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.entityTypes.delete
* @memberOf! ()
*
@@ -4537,6 +5370,61 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.entityTypes.get
* @desc Retrieves the specified entity type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.entityTypes.get({
+ * // Optional. The language used to access language-specific data.
+ * // If not specified, the agent's default language is used.
+ * // For more information, see
+ * // [Multilingual intent and entity
+ * // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
+ * languageCode: 'placeholder-value',
+ * // Required. The name of the entity type.
+ * // Format: `projects//agent/entityTypes/`.
+ * name: 'projects/my-project/agent/entityTypes/my-entityType',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoExpansionMode": "my_autoExpansionMode",
+ * // "displayName": "my_displayName",
+ * // "enableFuzzyExtraction": false,
+ * // "entities": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.entityTypes.get
* @memberOf! ()
*
@@ -4618,6 +5506,62 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.entityTypes.list
* @desc Returns the list of all entity types in the specified agent.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.entityTypes.list({
+ * // Optional. The language used to access language-specific data.
+ * // If not specified, the agent's default language is used.
+ * // For more information, see
+ * // [Multilingual intent and entity
+ * // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
+ * languageCode: 'placeholder-value',
+ * // Optional. The maximum number of items to return in a single page. By
+ * // default 100 and at most 1000.
+ * pageSize: 'placeholder-value',
+ * // Optional. The next_page_token value returned from a previous list request.
+ * pageToken: 'placeholder-value',
+ * // Required. The agent to list all entity types from.
+ * // Format: `projects//agent`.
+ * parent: 'projects/my-project/agent',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entityTypes": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.entityTypes.list
* @memberOf! ()
*
@@ -4720,6 +5664,78 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.entityTypes.patch
* @desc Updates the specified entity type.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.entityTypes.patch({
+ * // Optional. The language used to access language-specific data.
+ * // If not specified, the agent's default language is used.
+ * // For more information, see
+ * // [Multilingual intent and entity
+ * // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
+ * languageCode: 'placeholder-value',
+ * // The unique identifier of the entity type.
+ * // Required for EntityTypes.UpdateEntityType and
+ * // EntityTypes.BatchUpdateEntityTypes methods.
+ * // Format: `projects//agent/entityTypes/`.
+ * name: 'projects/my-project/agent/entityTypes/my-entityType',
+ * // Optional. The mask to control which fields get updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "autoExpansionMode": "my_autoExpansionMode",
+ * // "displayName": "my_displayName",
+ * // "enableFuzzyExtraction": false,
+ * // "entities": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "autoExpansionMode": "my_autoExpansionMode",
+ * // "displayName": "my_displayName",
+ * // "enableFuzzyExtraction": false,
+ * // "entities": [],
+ * // "kind": "my_kind",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.entityTypes.patch
* @memberOf! ()
*
@@ -4943,6 +5959,63 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.entityTypes.entities.batchCreate
* @desc Creates multiple new entities in the specified entity type. Operation
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.entityTypes.entities.batchCreate({
+ * // Required. The name of the entity type to create entities in. Format:
+ * // `projects//agent/entityTypes/`.
+ * parent: 'projects/my-project/agent/entityTypes/my-entityType',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entities": [],
+ * // "languageCode": "my_languageCode"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.entityTypes.entities.batchCreate
* @memberOf! ()
*
@@ -5025,6 +6098,63 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.entityTypes.entities.batchDelete
* @desc Deletes entities in the specified entity type. Operation
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.entityTypes.entities.batchDelete({
+ * // Required. The name of the entity type to delete entries for. Format:
+ * // `projects//agent/entityTypes/`.
+ * parent: 'projects/my-project/agent/entityTypes/my-entityType',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entityValues": [],
+ * // "languageCode": "my_languageCode"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.entityTypes.entities.batchDelete
* @memberOf! ()
*
@@ -5107,6 +6237,64 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.entityTypes.entities.batchUpdate
* @desc Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request. Operation
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.entityTypes.entities.batchUpdate({
+ * // Required. The name of the entity type to update or create entities in.
+ * // Format: `projects//agent/entityTypes/`.
+ * parent: 'projects/my-project/agent/entityTypes/my-entityType',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entities": [],
+ * // "languageCode": "my_languageCode",
+ * // "updateMask": "my_updateMask"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.entityTypes.entities.batchUpdate
* @memberOf! ()
*
@@ -5250,6 +6438,56 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.environments.list
* @desc Returns the list of all non-draft environments of the specified agent.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.environments.list({
+ * // Optional. The maximum number of items to return in a single page. By default 100 and
+ * // at most 1000.
+ * pageSize: 'placeholder-value',
+ * // Optional. The next_page_token value returned from a previous list request.
+ * pageToken: 'placeholder-value',
+ * // Required. The agent to list all environments from.
+ * // Format: `projects//agent`.
+ * parent: 'projects/my-project/agent',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "environments": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.environments.list
* @memberOf! ()
*
@@ -5397,6 +6635,55 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.environments.users.sessions.deleteContexts
* @desc Deletes all active contexts in the specified session.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.environments.users.sessions.deleteContexts(
+ * {
+ * // Required. The name of the session to delete all contexts from. Format:
+ * // `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`.
+ * // If `Environment ID` is not specified we assume default 'draft' environment.
+ * // If `User ID` is not specified, we assume default '-' user.
+ * parent:
+ * 'projects/my-project/agent/environments/my-environment/users/my-user/sessions/my-session',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.environments.users.sessions.deleteContexts
* @memberOf! ()
*
@@ -5473,6 +6760,76 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.environments.users.sessions.detectIntent
* @desc Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.environments.users.sessions.detectIntent(
+ * {
+ * // Required. The name of the session this query is sent to. Format:
+ * // `projects//agent/sessions/`, or
+ * // `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume
+ * // default 'draft' environment. If `User ID` is not specified, we are using
+ * // "-". It's up to the API caller to choose an appropriate `Session ID` and
+ * // `User Id`. They can be a random number or some type of user and session
+ * // identifiers (preferably hashed). The length of the `Session ID` and
+ * // `User ID` must not exceed 36 characters.
+ * session:
+ * 'projects/my-project/agent/environments/my-environment/users/my-user/sessions/my-session',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "inputAudio": "my_inputAudio",
+ * // "outputAudioConfig": {},
+ * // "outputAudioConfigMask": "my_outputAudioConfigMask",
+ * // "queryInput": {},
+ * // "queryParams": {}
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "outputAudio": "my_outputAudio",
+ * // "outputAudioConfig": {},
+ * // "queryResult": {},
+ * // "responseId": "my_responseId",
+ * // "webhookStatus": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.environments.users.sessions.detectIntent
* @memberOf! ()
*
@@ -5610,6 +6967,69 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.environments.users.sessions.contexts.create
* @desc Creates a context. If the specified context already exists, overrides the context.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.environments.users.sessions.contexts.create(
+ * {
+ * // Required. The session to create a context for.
+ * // Format: `projects//agent/sessions/` or
+ * // `projects//agent/environments//users//sessions/`.
+ * // If `Environment ID` is not specified, we assume default 'draft'
+ * // environment. If `User ID` is not specified, we assume default '-' user.
+ * parent:
+ * 'projects/my-project/agent/environments/my-environment/users/my-user/sessions/my-session',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "lifespanCount": 0,
+ * // "name": "my_name",
+ * // "parameters": {}
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "lifespanCount": 0,
+ * // "name": "my_name",
+ * // "parameters": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.environments.users.sessions.contexts.create
* @memberOf! ()
*
@@ -5694,6 +7114,55 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.environments.users.sessions.contexts.delete
* @desc Deletes the specified context.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.environments.users.sessions.contexts.delete(
+ * {
+ * // Required. The name of the context to delete. Format:
+ * // `projects//agent/sessions//contexts/`
+ * // or `projects//agent/environments//users//sessions//contexts/`.
+ * // If `Environment ID` is not specified, we assume default 'draft'
+ * // environment. If `User ID` is not specified, we assume default '-' user.
+ * name:
+ * 'projects/my-project/agent/environments/my-environment/users/my-user/sessions/my-session/contexts/my-context',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.environments.users.sessions.contexts.delete
* @memberOf! ()
*
@@ -5765,6 +7234,59 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.environments.users.sessions.contexts.get
* @desc Retrieves the specified context.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.environments.users.sessions.contexts.get(
+ * {
+ * // Required. The name of the context. Format:
+ * // `projects//agent/sessions//contexts/`
+ * // or `projects//agent/environments//users//sessions//contexts/`.
+ * // If `Environment ID` is not specified, we assume default 'draft'
+ * // environment. If `User ID` is not specified, we assume default '-' user.
+ * name:
+ * 'projects/my-project/agent/environments/my-environment/users/my-user/sessions/my-session/contexts/my-context',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "lifespanCount": 0,
+ * // "name": "my_name",
+ * // "parameters": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.environments.users.sessions.contexts.get
* @memberOf! ()
*
@@ -5845,6 +7367,63 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.environments.users.sessions.contexts.list
* @desc Returns the list of all contexts in the specified session.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.environments.users.sessions.contexts.list(
+ * {
+ * // Optional. The maximum number of items to return in a single page. By
+ * // default 100 and at most 1000.
+ * pageSize: 'placeholder-value',
+ * // Optional. The next_page_token value returned from a previous list request.
+ * pageToken: 'placeholder-value',
+ * // Required. The session to list all contexts from.
+ * // Format: `projects//agent/sessions/` or
+ * // `projects//agent/environments//users//sessions/`.
+ * // If `Environment ID` is not specified, we assume default 'draft'
+ * // environment. If `User ID` is not specified, we assume default '-' user.
+ * parent:
+ * 'projects/my-project/agent/environments/my-environment/users/my-user/sessions/my-session',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "contexts": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.environments.users.sessions.contexts.list
* @memberOf! ()
*
@@ -5946,6 +7525,82 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.environments.users.sessions.contexts.patch
* @desc Updates the specified context.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.environments.users.sessions.contexts.patch(
+ * {
+ * // Required. The unique identifier of the context. Format:
+ * // `projects//agent/sessions//contexts/`,
+ * // or `projects//agent/environments//users//sessions//contexts/`.
+ * //
+ * // The `Context ID` is always converted to lowercase, may only contain
+ * // characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
+ * //
+ * // If `Environment ID` is not specified, we assume default 'draft'
+ * // environment. If `User ID` is not specified, we assume default '-' user.
+ * //
+ * // The following context names are reserved for internal use by Dialogflow.
+ * // You should not use these contexts or create contexts with these names:
+ * //
+ * // * `__system_counters__`
+ * // * `*_id_dialog_context`
+ * // * `*_dialog_params_size`
+ * name:
+ * 'projects/my-project/agent/environments/my-environment/users/my-user/sessions/my-session/contexts/my-context',
+ * // Optional. The mask to control which fields get updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "lifespanCount": 0,
+ * // "name": "my_name",
+ * // "parameters": {}
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "lifespanCount": 0,
+ * // "name": "my_name",
+ * // "parameters": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.environments.users.sessions.contexts.patch
* @memberOf! ()
*
@@ -6118,6 +7773,69 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.environments.users.sessions.entityTypes.create
* @desc Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.environments.users.sessions.entityTypes.create(
+ * {
+ * // Required. The session to create a session entity type for.
+ * // Format: `projects//agent/sessions/` or
+ * // `projects//agent/environments//users//
+ * // sessions/`.
+ * // If `Environment ID` is not specified, we assume default 'draft'
+ * // environment. If `User ID` is not specified, we assume default '-' user.
+ * parent:
+ * 'projects/my-project/agent/environments/my-environment/users/my-user/sessions/my-session',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entities": [],
+ * // "entityOverrideMode": "my_entityOverrideMode",
+ * // "name": "my_name"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entities": [],
+ * // "entityOverrideMode": "my_entityOverrideMode",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.create
* @memberOf! ()
*
@@ -6210,6 +7928,56 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.environments.users.sessions.entityTypes.delete
* @desc Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.environments.users.sessions.entityTypes.delete(
+ * {
+ * // Required. The name of the entity type to delete. Format:
+ * // `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`.
+ * // If `Environment ID` is not specified, we assume default 'draft'
+ * // environment. If `User ID` is not specified, we assume default '-' user.
+ * name:
+ * 'projects/my-project/agent/environments/my-environment/users/my-user/sessions/my-session/entityTypes/my-entityType',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.delete
* @memberOf! ()
*
@@ -6281,6 +8049,60 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.environments.users.sessions.entityTypes.get
* @desc Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.environments.users.sessions.entityTypes.get(
+ * {
+ * // Required. The name of the session entity type. Format:
+ * // `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`.
+ * // If `Environment ID` is not specified, we assume default 'draft'
+ * // environment. If `User ID` is not specified, we assume default '-' user.
+ * name:
+ * 'projects/my-project/agent/environments/my-environment/users/my-user/sessions/my-session/entityTypes/my-entityType',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entities": [],
+ * // "entityOverrideMode": "my_entityOverrideMode",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.get
* @memberOf! ()
*
@@ -6369,6 +8191,63 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.environments.users.sessions.entityTypes.list
* @desc Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.environments.users.sessions.entityTypes.list(
+ * {
+ * // Optional. The maximum number of items to return in a single page. By
+ * // default 100 and at most 1000.
+ * pageSize: 'placeholder-value',
+ * // Optional. The next_page_token value returned from a previous list request.
+ * pageToken: 'placeholder-value',
+ * // Required. The session to list all session entity types from.
+ * // Format: `projects//agent/sessions/` or
+ * // `projects//agent/environments//users//
+ * // sessions/`.
+ * // If `Environment ID` is not specified, we assume default 'draft'
+ * // environment. If `User ID` is not specified, we assume default '-' user.
+ * parent:
+ * 'projects/my-project/agent/environments/my-environment/users/my-user/sessions/my-session',
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "nextPageToken": "my_nextPageToken",
+ * // "sessionEntityTypes": []
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.list
* @memberOf! ()
*
@@ -6471,6 +8350,75 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.environments.users.sessions.entityTypes.patch
* @desc Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.environments.users.sessions.entityTypes.patch(
+ * {
+ * // Required. The unique identifier of this session entity type. Format:
+ * // `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`.
+ * // If `Environment ID` is not specified, we assume default 'draft'
+ * // environment. If `User ID` is not specified, we assume default '-' user.
+ * //
+ * // `` must be the display name of an existing entity
+ * // type in the same agent that will be overridden or supplemented.
+ * name:
+ * 'projects/my-project/agent/environments/my-environment/users/my-user/sessions/my-session/entityTypes/my-entityType',
+ * // Optional. The mask to control which fields get updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entities": [],
+ * // "entityOverrideMode": "my_entityOverrideMode",
+ * // "name": "my_name"
+ * // }
+ * },
+ * }
+ * );
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entities": [],
+ * // "entityOverrideMode": "my_entityOverrideMode",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.patch
* @memberOf! ()
*
@@ -6651,6 +8599,62 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.intents.batchDelete
* @desc Deletes intents in the specified agent. Operation
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.intents.batchDelete({
+ * // Required. The name of the agent to delete all entities types for. Format:
+ * // `projects//agent`.
+ * parent: 'projects/my-project/agent',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "intents": []
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.intents.batchDelete
* @memberOf! ()
*
@@ -6733,6 +8737,66 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.intents.batchUpdate
* @desc Updates/Creates multiple intents in the specified agent. Operation
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.intents.batchUpdate({
+ * // Required. The name of the agent to update or create intents in.
+ * // Format: `projects//agent`.
+ * parent: 'projects/my-project/agent',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "intentBatchInline": {},
+ * // "intentBatchUri": "my_intentBatchUri",
+ * // "intentView": "my_intentView",
+ * // "languageCode": "my_languageCode",
+ * // "updateMask": "my_updateMask"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "done": false,
+ * // "error": {},
+ * // "metadata": {},
+ * // "name": "my_name",
+ * // "response": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.intents.batchUpdate
* @memberOf! ()
*
@@ -6815,6 +8879,100 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.intents.create
* @desc Creates an intent in the specified agent.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.intents.create({
+ * // Optional. The resource view to apply to the returned intent.
+ * intentView: 'placeholder-value',
+ * // Optional. The language used to access language-specific data.
+ * // If not specified, the agent's default language is used.
+ * // For more information, see
+ * // [Multilingual intent and entity
+ * // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
+ * languageCode: 'placeholder-value',
+ * // Required. The agent to create a intent for.
+ * // Format: `projects//agent`.
+ * parent: 'projects/my-project/agent',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "defaultResponsePlatforms": [],
+ * // "displayName": "my_displayName",
+ * // "events": [],
+ * // "followupIntentInfo": [],
+ * // "inputContextNames": [],
+ * // "isFallback": false,
+ * // "messages": [],
+ * // "mlDisabled": false,
+ * // "name": "my_name",
+ * // "outputContexts": [],
+ * // "parameters": [],
+ * // "parentFollowupIntentName": "my_parentFollowupIntentName",
+ * // "priority": 0,
+ * // "resetContexts": false,
+ * // "rootFollowupIntentName": "my_rootFollowupIntentName",
+ * // "trainingPhrases": [],
+ * // "webhookState": "my_webhookState"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "action": "my_action",
+ * // "defaultResponsePlatforms": [],
+ * // "displayName": "my_displayName",
+ * // "events": [],
+ * // "followupIntentInfo": [],
+ * // "inputContextNames": [],
+ * // "isFallback": false,
+ * // "messages": [],
+ * // "mlDisabled": false,
+ * // "name": "my_name",
+ * // "outputContexts": [],
+ * // "parameters": [],
+ * // "parentFollowupIntentName": "my_parentFollowupIntentName",
+ * // "priority": 0,
+ * // "resetContexts": false,
+ * // "rootFollowupIntentName": "my_rootFollowupIntentName",
+ * // "trainingPhrases": [],
+ * // "webhookState": "my_webhookState"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.intents.create
* @memberOf! ()
*
@@ -6901,6 +9059,49 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.intents.delete
* @desc Deletes the specified intent and its direct or indirect followup intents.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.intents.delete({
+ * // Required. The name of the intent to delete. If this intent has direct or
+ * // indirect followup intents, we also delete them.
+ * // Format: `projects//agent/intents/`.
+ * name: 'projects/my-project/agent/intents/my-intent',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.intents.delete
* @memberOf! ()
*
@@ -6972,6 +9173,75 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.intents.get
* @desc Retrieves the specified intent.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.intents.get({
+ * // Optional. The resource view to apply to the returned intent.
+ * intentView: 'placeholder-value',
+ * // Optional. The language used to access language-specific data.
+ * // If not specified, the agent's default language is used.
+ * // For more information, see
+ * // [Multilingual intent and entity
+ * // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
+ * languageCode: 'placeholder-value',
+ * // Required. The name of the intent.
+ * // Format: `projects//agent/intents/`.
+ * name: 'projects/my-project/agent/intents/my-intent',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "action": "my_action",
+ * // "defaultResponsePlatforms": [],
+ * // "displayName": "my_displayName",
+ * // "events": [],
+ * // "followupIntentInfo": [],
+ * // "inputContextNames": [],
+ * // "isFallback": false,
+ * // "messages": [],
+ * // "mlDisabled": false,
+ * // "name": "my_name",
+ * // "outputContexts": [],
+ * // "parameters": [],
+ * // "parentFollowupIntentName": "my_parentFollowupIntentName",
+ * // "priority": 0,
+ * // "resetContexts": false,
+ * // "rootFollowupIntentName": "my_rootFollowupIntentName",
+ * // "trainingPhrases": [],
+ * // "webhookState": "my_webhookState"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.intents.get
* @memberOf! ()
*
@@ -7054,6 +9324,64 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.intents.list
* @desc Returns the list of all intents in the specified agent.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.intents.list({
+ * // Optional. The resource view to apply to the returned intent.
+ * intentView: 'placeholder-value',
+ * // Optional. The language used to access language-specific data.
+ * // If not specified, the agent's default language is used.
+ * // For more information, see
+ * // [Multilingual intent and entity
+ * // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
+ * languageCode: 'placeholder-value',
+ * // Optional. The maximum number of items to return in a single page. By
+ * // default 100 and at most 1000.
+ * pageSize: 'placeholder-value',
+ * // Optional. The next_page_token value returned from a previous list request.
+ * pageToken: 'placeholder-value',
+ * // Required. The agent to list all intents from.
+ * // Format: `projects//agent`.
+ * parent: 'projects/my-project/agent',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "intents": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.intents.list
* @memberOf! ()
*
@@ -7155,6 +9483,104 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.intents.patch
* @desc Updates the specified intent.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.intents.patch({
+ * // Optional. The resource view to apply to the returned intent.
+ * intentView: 'placeholder-value',
+ * // Optional. The language used to access language-specific data.
+ * // If not specified, the agent's default language is used.
+ * // For more information, see
+ * // [Multilingual intent and entity
+ * // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
+ * languageCode: 'placeholder-value',
+ * // Optional. The unique identifier of this intent.
+ * // Required for Intents.UpdateIntent and Intents.BatchUpdateIntents
+ * // methods.
+ * // Format: `projects//agent/intents/`.
+ * name: 'projects/my-project/agent/intents/my-intent',
+ * // Optional. The mask to control which fields get updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "action": "my_action",
+ * // "defaultResponsePlatforms": [],
+ * // "displayName": "my_displayName",
+ * // "events": [],
+ * // "followupIntentInfo": [],
+ * // "inputContextNames": [],
+ * // "isFallback": false,
+ * // "messages": [],
+ * // "mlDisabled": false,
+ * // "name": "my_name",
+ * // "outputContexts": [],
+ * // "parameters": [],
+ * // "parentFollowupIntentName": "my_parentFollowupIntentName",
+ * // "priority": 0,
+ * // "resetContexts": false,
+ * // "rootFollowupIntentName": "my_rootFollowupIntentName",
+ * // "trainingPhrases": [],
+ * // "webhookState": "my_webhookState"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "action": "my_action",
+ * // "defaultResponsePlatforms": [],
+ * // "displayName": "my_displayName",
+ * // "events": [],
+ * // "followupIntentInfo": [],
+ * // "inputContextNames": [],
+ * // "isFallback": false,
+ * // "messages": [],
+ * // "mlDisabled": false,
+ * // "name": "my_name",
+ * // "outputContexts": [],
+ * // "parameters": [],
+ * // "parentFollowupIntentName": "my_parentFollowupIntentName",
+ * // "priority": 0,
+ * // "resetContexts": false,
+ * // "rootFollowupIntentName": "my_rootFollowupIntentName",
+ * // "trainingPhrases": [],
+ * // "webhookState": "my_webhookState"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.intents.patch
* @memberOf! ()
*
@@ -7403,6 +9829,52 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.sessions.deleteContexts
* @desc Deletes all active contexts in the specified session.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.sessions.deleteContexts({
+ * // Required. The name of the session to delete all contexts from. Format:
+ * // `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`.
+ * // If `Environment ID` is not specified we assume default 'draft' environment.
+ * // If `User ID` is not specified, we assume default '-' user.
+ * parent: 'projects/my-project/agent/sessions/my-session',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.sessions.deleteContexts
* @memberOf! ()
*
@@ -7479,6 +9951,73 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.sessions.detectIntent
* @desc Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.sessions.detectIntent({
+ * // Required. The name of the session this query is sent to. Format:
+ * // `projects//agent/sessions/`, or
+ * // `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume
+ * // default 'draft' environment. If `User ID` is not specified, we are using
+ * // "-". It's up to the API caller to choose an appropriate `Session ID` and
+ * // `User Id`. They can be a random number or some type of user and session
+ * // identifiers (preferably hashed). The length of the `Session ID` and
+ * // `User ID` must not exceed 36 characters.
+ * session: 'projects/my-project/agent/sessions/my-session',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "inputAudio": "my_inputAudio",
+ * // "outputAudioConfig": {},
+ * // "outputAudioConfigMask": "my_outputAudioConfigMask",
+ * // "queryInput": {},
+ * // "queryParams": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "outputAudio": "my_outputAudio",
+ * // "outputAudioConfig": {},
+ * // "queryResult": {},
+ * // "responseId": "my_responseId",
+ * // "webhookStatus": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.sessions.detectIntent
* @memberOf! ()
*
@@ -7616,6 +10155,66 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.sessions.contexts.create
* @desc Creates a context. If the specified context already exists, overrides the context.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.sessions.contexts.create({
+ * // Required. The session to create a context for.
+ * // Format: `projects//agent/sessions/` or
+ * // `projects//agent/environments//users//sessions/`.
+ * // If `Environment ID` is not specified, we assume default 'draft'
+ * // environment. If `User ID` is not specified, we assume default '-' user.
+ * parent: 'projects/my-project/agent/sessions/my-session',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "lifespanCount": 0,
+ * // "name": "my_name",
+ * // "parameters": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "lifespanCount": 0,
+ * // "name": "my_name",
+ * // "parameters": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.sessions.contexts.create
* @memberOf! ()
*
@@ -7700,6 +10299,52 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.sessions.contexts.delete
* @desc Deletes the specified context.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.sessions.contexts.delete({
+ * // Required. The name of the context to delete. Format:
+ * // `projects//agent/sessions//contexts/`
+ * // or `projects//agent/environments//users//sessions//contexts/`.
+ * // If `Environment ID` is not specified, we assume default 'draft'
+ * // environment. If `User ID` is not specified, we assume default '-' user.
+ * name: 'projects/my-project/agent/sessions/my-session/contexts/my-context',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {}
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.sessions.contexts.delete
* @memberOf! ()
*
@@ -7771,6 +10416,56 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.sessions.contexts.get
* @desc Retrieves the specified context.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.sessions.contexts.get({
+ * // Required. The name of the context. Format:
+ * // `projects//agent/sessions//contexts/`
+ * // or `projects//agent/environments//users//sessions//contexts/`.
+ * // If `Environment ID` is not specified, we assume default 'draft'
+ * // environment. If `User ID` is not specified, we assume default '-' user.
+ * name: 'projects/my-project/agent/sessions/my-session/contexts/my-context',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "lifespanCount": 0,
+ * // "name": "my_name",
+ * // "parameters": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.sessions.contexts.get
* @memberOf! ()
*
@@ -7851,6 +10546,60 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.sessions.contexts.list
* @desc Returns the list of all contexts in the specified session.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.sessions.contexts.list({
+ * // Optional. The maximum number of items to return in a single page. By
+ * // default 100 and at most 1000.
+ * pageSize: 'placeholder-value',
+ * // Optional. The next_page_token value returned from a previous list request.
+ * pageToken: 'placeholder-value',
+ * // Required. The session to list all contexts from.
+ * // Format: `projects//agent/sessions/` or
+ * // `projects//agent/environments//users//sessions/`.
+ * // If `Environment ID` is not specified, we assume default 'draft'
+ * // environment. If `User ID` is not specified, we assume default '-' user.
+ * parent: 'projects/my-project/agent/sessions/my-session',
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "contexts": [],
+ * // "nextPageToken": "my_nextPageToken"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.sessions.contexts.list
* @memberOf! ()
*
@@ -7952,6 +10701,79 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.sessions.contexts.patch
* @desc Updates the specified context.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.sessions.contexts.patch({
+ * // Required. The unique identifier of the context. Format:
+ * // `projects//agent/sessions//contexts/`,
+ * // or `projects//agent/environments//users//sessions//contexts/`.
+ * //
+ * // The `Context ID` is always converted to lowercase, may only contain
+ * // characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
+ * //
+ * // If `Environment ID` is not specified, we assume default 'draft'
+ * // environment. If `User ID` is not specified, we assume default '-' user.
+ * //
+ * // The following context names are reserved for internal use by Dialogflow.
+ * // You should not use these contexts or create contexts with these names:
+ * //
+ * // * `__system_counters__`
+ * // * `*_id_dialog_context`
+ * // * `*_dialog_params_size`
+ * name: 'projects/my-project/agent/sessions/my-session/contexts/my-context',
+ * // Optional. The mask to control which fields get updated.
+ * updateMask: 'placeholder-value',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "lifespanCount": 0,
+ * // "name": "my_name",
+ * // "parameters": {}
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "lifespanCount": 0,
+ * // "name": "my_name",
+ * // "parameters": {}
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.sessions.contexts.patch
* @memberOf! ()
*
@@ -8124,6 +10946,66 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.sessions.entityTypes.create
* @desc Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.sessions.entityTypes.create({
+ * // Required. The session to create a session entity type for.
+ * // Format: `projects//agent/sessions/` or
+ * // `projects//agent/environments//users//
+ * // sessions/`.
+ * // If `Environment ID` is not specified, we assume default 'draft'
+ * // environment. If `User ID` is not specified, we assume default '-' user.
+ * parent: 'projects/my-project/agent/sessions/my-session',
+ *
+ * // Request body metadata
+ * requestBody: {
+ * // request body parameters
+ * // {
+ * // "entities": [],
+ * // "entityOverrideMode": "my_entityOverrideMode",
+ * // "name": "my_name"
+ * // }
+ * },
+ * });
+ * console.log(res.data);
+ *
+ * // Example response
+ * // {
+ * // "entities": [],
+ * // "entityOverrideMode": "my_entityOverrideMode",
+ * // "name": "my_name"
+ * // }
+ * }
+ *
+ * main().catch(e => {
+ * console.error(e);
+ * throw e;
+ * });
+ *
* @alias dialogflow.projects.agent.sessions.entityTypes.create
* @memberOf! ()
*
@@ -8216,6 +11098,54 @@ export namespace dialogflow_v2 {
/**
* dialogflow.projects.agent.sessions.entityTypes.delete
* @desc Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
+ * @example
+ * // Before running the sample:
+ * // - Enable the API at:
+ * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com
+ * // - Login into gcloud by running:
+ * // `$ gcloud auth application-default login`
+ * // - Install the npm module by running:
+ * // `$ npm install googleapis`
+ *
+ * const {google} = require('googleapis');
+ * const dialogflow = google.dialogflow('v2');
+ *
+ * async function main() {
+ * const auth = new google.auth.GoogleAuth({
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
+ * scopes: [
+ * 'https://www.googleapis.com/auth/cloud-platform',
+ * 'https://www.googleapis.com/auth/dialogflow',
+ * ],
+ * });
+ *
+ * // Acquire an auth client, and bind it to all future calls
+ * const authClient = await auth.getClient();
+ * google.options('auth', authClient);
+ *
+ * // Do the magic
+ * const res = await dialogflow.projects.agent.sessions.entityTypes.delete({
+ * // Required. The name of the entity type to delete. Format:
+ * // `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users/